Skip to content
Permalink
Browse files

[EM] Extend possibilities to extract the language (#1515)

  • Loading branch information...
zuphilip authored and adam3smith committed Jan 7, 2018
1 parent f4a0d8e commit 7081d6b524772e408189266e83dd1ed069e99a6f
Showing with 36 additions and 14 deletions.
  1. +1 −2 Denik CZ.js
  2. +9 −5 DigiZeitschriften.js
  3. +22 −5 Embedded Metadata.js
  4. +4 −2 HighBeam.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2018-01-02 12:20:19"
"lastUpdated": "2018-01-07 09:27:42"
}

/*
@@ -93,7 +93,6 @@ function scrape(doc, url) {
// translator.setDocument(doc);

translator.setHandler('itemDone', function (obj, item) {
item.language = "cs";
if (authorsMeta) {
// multiple authors are not handled correctly by EM and
// we want to exclude generic names like "Redakce"
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsv",
"lastUpdated": "2016-09-12 20:57:07"
"lastUpdated": "2018-01-07 09:28:38"
}

/*
@@ -139,9 +139,10 @@ var testCases = [
}
],
"date": "1997",
"ISSN": "0001-9054",
"language": "de",
"libraryCatalog": "DigiZeitschriften",
"pages": "117-143",
"ISSN": "0001-9054",
"publicationTitle": "Aequationes Mathematicae",
"url": "http://www.digizeitschriften.de/dms/img/?PPN=PPN356261603_0054&DMDID=dmdlog15",
"volume": "54",
@@ -171,9 +172,10 @@ var testCases = [
}
],
"date": "1997",
"ISSN": "0001-9054",
"language": "de",
"libraryCatalog": "DigiZeitschriften",
"pages": "117-143",
"ISSN": "0001-9054",
"publicationTitle": "Aequationes Mathematicae",
"url": "http://www.digizeitschriften.de/en/dms/img/?PPN=GDZPPN002612097",
"volume": "54",
@@ -207,9 +209,10 @@ var testCases = [
"creatorType": "author"
}
],
"ISSN": "0003-9268",
"language": "de",
"libraryCatalog": "DigiZeitschriften",
"pages": "68-77",
"ISSN": "0003-9268",
"publicationTitle": "Archiv für mathematische Logik und Grundlagenforschung",
"url": "http://www.digizeitschriften.de/dms/img/?PPN=PPN379931524_0002&DMDID=dmdlog10",
"volume": "2",
@@ -239,9 +242,10 @@ var testCases = [
}
],
"date": "1997",
"ISSN": "0001-9054",
"language": "de",
"libraryCatalog": "DigiZeitschriften",
"pages": "117-143",
"ISSN": "0001-9054",
"publicationTitle": "Aequationes Mathematicae",
"url": "http://www.digizeitschriften.de/dms/img/?PPN=GDZPPN002612097",
"volume": "54",
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2017-11-25 17:49:05"
"lastUpdated": "2018-01-07 09:42:13"
}

/*
@@ -616,10 +616,15 @@ function addLowQualityMetadata(doc, newItem) {
}

if(!newItem.url) {
newItem.url = ZU.xpathText(doc, '//head/link[@rel="canonical"]/@href');
newItem.url = ZU.xpathText(doc, '//head/link[@rel="canonical"]/@href') || doc.location.href;
}
if(!newItem.url) {
newItem.url = doc.location.href;

if (!newItem.language) {
newItem.language = ZU.xpathText(doc, '//x:meta[@name="language"]/@content', namespaces) ||
ZU.xpathText(doc, '//x:meta[@name="lang"]/@content', namespaces) ||
ZU.xpathText(doc, '//x:meta[@http-equiv="content-language"]/@content', namespaces) ||
ZU.xpathText(doc, '//html/@lang') ||
doc.documentElement.getAttribute('xml:lang');
}


@@ -932,6 +937,7 @@ var testCases = [
"date": "2011",
"abstractNote": "Why wait for federal action on incentives to reduce energy use and address Greenhouse Gas (GHG) reductions (e.g. CO2), when we can take personal actions right now in our private lives and in our communities? One such initiative by private citizens working with Portsmouth NH officials resulted in the installation of energy reducing lighting products on Court St. and the benefits to taxpayers are still coming after over 4 years of operation. This citizen initiative to save money and reduce CO2 emissions, while only one small effort, could easily be duplicated in many towns and cities. Replacing old lamps in just one street fixture with a more energy efficient (Non-LED) lamp has resulted after 4 years of operation ($\\sim $15,000 hr. life of product) in real electrical energy savings of $>$ {\\$}43. and CO2 emission reduction of $>$ 465 lbs. The return on investment (ROI) was less than 2 years. This is much better than any financial investment available today and far safer. Our street only had 30 such lamps installed; however, the rest of Portsmouth (population 22,000) has at least another 150 street lamp fixtures that are candidates for such an upgrade. The talk will also address other energy reduction measures that green the planet and also put more green in the pockets of citizens and municipalities.",
"conferenceName": "Climate Change and the Future of Nuclear Power",
"language": "en",
"libraryCatalog": "scholarworks.umass.edu",
"shortTitle": "Session F",
"url": "http://scholarworks.umass.edu/climate_nuclearpower/2011/nov19/34",
@@ -970,6 +976,7 @@ var testCases = [
"ISSN": "1947-508X",
"abstractNote": "The purpose of this paper is to examine the contemporary role of an eighteenth century bounty proclamation issued on the Penobscot Indians of Maine. We focus specifically on how the changing cultural context of the 1755 Spencer Phips Bounty Proclamation has transformed the document from serving as a tool for sanctioned violence to a tool of decolonization for the Indigenous peoples of Maine. We explore examples of the ways indigenous and non-indigenous people use the Phips Proclamation to illustrate past violence directed against Indigenous peoples. This exploration is enhanced with an analysis of the re-introduction of the Phips Proclamation using concepts of decolonization theory.",
"issue": "1",
"language": "en",
"libraryCatalog": "scholarworks.umass.edu",
"pages": "2",
"publicationTitle": "Landscapes of Violence",
@@ -1007,6 +1014,7 @@ var testCases = [
],
"date": "2012",
"abstractNote": "This thesis examines decentralized meta-reasoning. For a single agent or multiple agents, it may not be enough for agents to compute correct decisions if they do not do so in a timely or resource efficient fashion. The utility of agent decisions typically increases with decision quality, but decreases with computation time. The reasoning about one's computation process is referred to as meta-reasoning. Aspects of meta-reasoning considered in this thesis include the reasoning about how to allocate computational resources, including when to stop one type of computation and begin another, and when to stop all computation and report an answer. Given a computational model, this translates into computing how to schedule the basic computations that solve a problem. This thesis constructs meta-reasoning strategies for the purposes of monitoring and control in multi-agent settings, specifically settings that can be modeled by the Decentralized Partially Observable Markov Decision Process (Dec-POMDP). It uses decision theory to optimize computation for efficiency in time and space in communicative and non-communicative decentralized settings. Whereas base-level reasoning describes the optimization of actual agent behaviors, the meta-reasoning strategies produced by this thesis dynamically optimize the computational resources which lead to the selection of base-level behaviors.",
"language": "en",
"libraryCatalog": "scholarworks.umass.edu",
"university": "University of Massachusetts Amherst",
"url": "http://scholarworks.umass.edu/open_access_dissertations/508",
@@ -1135,9 +1143,16 @@ var testCases = [
{
"itemType": "webpage",
"title": "Junot Díaz: My stories come from trauma",
"creators": [],
"creators": [
{
"firstName": "Gregg",
"lastName": "Barrios",
"creatorType": "author"
}
],
"date": "2012-10-10 15:36:00",
"abstractNote": "The effervescent author of \"This is How You Lose Her\" explains the darkness coursing through his fiction",
"language": "en",
"shortTitle": "Junot Díaz",
"url": "https://www.salon.com/2012/10/10/junot_diaz_my_stories_come_from_trauma/",
"websiteTitle": "Salon",
@@ -1169,6 +1184,7 @@ var testCases = [
"date": "2013-12-22T11:58:34+00:00",
"abstractNote": "Northwestern University recently condemned the American Studies Association boycott of Israel. Unlike some other schools that quit their institutional membership in the ASA over the boycott, Northwestern has not. Many of my Northwestern colleagues were about to start urging a similar withdrawal.\nThen we learned from our administration that despite being listed as in institutional member by the ASA, the university has, after checking, concluded it has no such membership, does not plan to get one, and is unclear why the ASA would list us as institutional member.\nApparently, at least several other schools listed by the ASA as institutional members say they have no such relationship.\nThe ASA has been spending a great deal of energy on political activism far from its mission, but apparently cannot keep its books in order. The association has yet to explain how it has come to list as institutional members so many schools that know nothing about such a membership. The ASA’s membership rolls may get much shorter in the coming weeks even without any quitting.\nHow this confusion came to arise is unclear. ASA membership, like that of many academic organizations, comes with a subscription to their journal. Some have suggested that perhaps the ASA also counts as members any institution whose library happened to subscribe to the journal, ie tacking on membership to a subscription, rather than vice versa. This would not be fair on their part. A library may subscribe to all sorts of journals for academic research purposes (ie Pravda), without endorsing the organization that publishes it. That is the difference between subscription and membership.\nI eagerly await the ASA’s explanation of the situation. [...]",
"blogTitle": "The Volokh Conspiracy",
"language": "en-US",
"url": "http://volokh.com/2013/12/22/northwestern-cant-quit-asa-boycott-member/",
"attachments": [
{
@@ -1480,6 +1496,7 @@ var testCases = [
"DOI": "10.1353/kri.2008.0061",
"ISSN": "1538-5000",
"issue": "4",
"language": "en",
"libraryCatalog": "muse.jhu.edu",
"pages": "627-656",
"publicationTitle": "Kritika: Explorations in Russian and Eurasian History",
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2016-08-27 15:17:28"
"lastUpdated": "2018-01-07 09:32:09"
}

/*
@@ -142,6 +142,7 @@ var testCases = [
],
"date": "2000-12-10",
"abstractNote": "In the years leading up to the bacteria poisoning of thousands of\nresidents of Walkerton, Ont., who drank contaminated drinking water,\nthose responsible for water safety were routinely falsifying water\ntests and were drinking beer on the job, according to testimony at\nan inquiry.\nIn May, seven people died and more than 2,000 people became\nviolently ill when a deadly strain of E. coli bacteria from cow\nmanure made its way into the town's drinking water system.\nLast week, at the judicial inquiry into the disaster, Frank\nKoebel, the town's public utilities foreman, testified that water\nsamples he labeled as coming from various locations actually came\nfrom just one source: the Walkerton pump house. …",
"language": "en",
"libraryCatalog": "www.highbeam.com",
"publicationTitle": "The Buffalo News (Buffalo, NY)",
"url": "https://www.highbeam.com/doc/1P2-23197647.html",
@@ -172,6 +173,7 @@ var testCases = [
],
"date": "2016-03-01",
"abstractNote": "INTRODUCTION Kenya has an estimated population of over 41 million people who are made up of about 42 distinct communities [1]. Its population is made up of about 47.7% Protestants, 28.4% Roman Catholics, 9% of Indigenous beliefs, 11.2% Muslims, 1% Bahais, 0.04% Hindu and about 2.6% of other faiths [2]. More than 80% of the country's land mass is made up of what is often referred to as the arid and semi-arid lands (ASAL), which is where about 30% of the country's population lives [2]). The ASAL regions are characterized by a sparse human population distribution, low and unpredictable rainfall, usually 5-300 mm/year [3]. More than 70% of the country's livestock population is in the ASAL and most are reared by nomadic pastoralist communities including the Boran, Gabbra, Rendille, various Somali subgroups, the Samburu, Turkana, Maasai, Pokot, and the Orma. The country's livestock population is composed mainly of goats, sheep, cattle, camels, chicken, pigs and donkeys. Pigs are reared for commerce by a small number of farmers and usually within a 100-km radius of the major cities. To meet the food acceptability and religious requirements of the Kenya Muslims, the animal for food must be slaughtered by a Muslim to make its meat Halal. Poultry are mainly the traditional breeds of chicken that are kept using low-cost range management systems to supply subsistence food needs. However, commercial poultry keeping based on exotic breeds is an important economic activity in the country. Chicken eggs are an important item of commerce and food in Kenya. The population of geese, ducks and ostriches is insignificant. The beef cattle kept on private ranches in the ASAL zones, supply a significant amount of beef for consumers in major urban centres in the country. In the 2009 National Population and Household Census, Kenya was reported to have 3,355,407 exotic cattle, 14,112,367 indigenous cattle, 17,129,606 sheep, 27,740,153 goats and 2,971,111camels [2]. Other animals counted in the 2009 Population and Household Census included 334,689 pigs, 25,756,487 indigenous chicken, 6,071,042 commercial chicken, and 1,832,519 donkeys. The former Western Province with 16% of the total national population of chicken (both indigenous and commercial), leads in this livestock category. The Rift Valley region, where the Turkana, Maasai, Pokot and Samburu pastoralists live had 42.8% of the total national cattle population, 28.8% of the national indigenous cattle population and 54.6% of the Rift Valley region's total cattle population. The two regions of Rift Valley and Northeastern had 58.7, 70.5, 77.9, and 89.8% of the total national cattle, goat, sheep, and camel population, respectively [2]. Northeastern Province had the lowest pig population which stood at only 68 pigs, representing 0.02% of Kenya's pig population according to the 2009 Population and Household census, as it has the second highest Muslim population after Kenya's Coastal strip [2]. The production of total meat, mutton and goat meat, poultry, pork, milk and eggs in Kenya in 2002 stood at 452.6x103 metric tons (mT), 5.7x103 mT, 54x103 MT, 2841x106 litres and 60.6 million eggs [4], respectively, with most of the beef, goat meat and mutton coming from the ASAL. The per capita production of total meat, beef, mutton and goat meat, poultry and milk stood at 14.3 kg/yr, 10 kg, 1.0 kg and 90 liters/yr in 2002 [4]. For the purpose of this article, small stock refers to goats, and sheep, while large slaughter stock refers to donkeys, cattle, and camels. In this article also, no discussion will be made specifically on chicken or other poultry, fish and related sources of meat. The text focuses on meats in general and without emphasis on the white or red type. It is a mini-review of the literature on animal welfare requirements, animal handling and meat quality as it applies to the Kenyan situation. METHODS AND PROCEDURES A semi-structured questionnaire to establish the manner of animal slaughter in 10 Kenyan communities was administered to groups of 10-15 members of a community as focus groups. The communities surveyed were: nomadic pastoralists-the Turkana, Boran, Samburu, Pokot, Somali, and the Maasai, while the farming communities surveyed were the Kuria, Luo, Kalenjin, and Kikuyu. The total number of respondents who took part in the survey was 124. A few individual interviews were also conducted with a few members of some of the communities. The questionnaire and focus group discussions also set out to establish the extent of knowledge of the relationship of animal welfare and handling procedures, and slaughter practices as they would influence meat quality. Limitations of the study 1. A small sample of communities was surveyed for their slaughter practices (10 out of a possible 42), although the author believes the slaughter and animal handling practices of those communities who were not surveyed would not have been different from the findings of the study. 2. The influence of religion on slaughter practices was documented only for the Muslims as it proved difficult to interview believers of other faiths. 3. More nomadic communities were surveyed than the farmer-communities; this was because the nomadic pastoralists provide most of the slaughter stock and keep most of the livestock population of Kenya, except for pigs and poultry. RESULTS 1. For the Turkana and Pokot communities, the spear is reserved for use by adult, initiated and circumcised males, while the knife is mandatorily used by females and young uncircumcised males for animal slaughter. Where a Muslim has to share the meat, they let the male Muslim slaughter the animal. The Turkana and Pokot males slaughter the animal for public feasts while females can use the kitchen knife to slaughter small stock for domestic consumption. However, for large stock such as cattle, donkey and the camel, males slaughter them due to their sizes which females may find difficult to manage. …",
"language": "en",
"libraryCatalog": "www.highbeam.com",
"publicationTitle": "African Journal of Food, Agriculture, Nutrition and Development",
"shortTitle": "A Preliminary Survey of Animal Handling and Cultural Slaughter Practices among Kenyan Communities",
@@ -193,4 +195,4 @@ var testCases = [
"items": "multiple"
}
]
/** END TEST CASES **/
/** END TEST CASES **/

0 comments on commit 7081d6b

Please sign in to comment.
You can’t perform that action at this time.