r50464 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50463‎ | r50464 | r50465 >
Date:22:13, 10 May 2009
Author:daniel
Status:deferred
Tags:
Comment:
FOOD tweak
Modified paths:
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/analyzer/sensor/HasCategoryLikeSensor.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder4LifeScience/src/main/java/de/brightbyte/wikiword/lifescience/wikis/WikiConfiguration_enwiki.java (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWordBuilder4LifeScience/src/main/java/de/brightbyte/wikiword/lifescience/wikis/WikiConfiguration_enwiki.java
@@ -636,12 +636,13 @@
637637 conceptTypeSensors.add( new HasCategorySensor<ConceptType>(LifeScienceConceptType.CHEMICAL, "Chemical_elements"));
638638
639639 conceptTypeSensors.add( new HasTemplateLikeSensor<ConceptType>(LifeScienceConceptType.DISEASE, "^(Infobox_Disease|Infobox_Symptom|SignSymptom_infobox|DiseaseDisorder_infobox)$", 0, null));
640 - conceptTypeSensors.add( new HasCategoryLikeSensor<ConceptType>(LifeScienceConceptType.DISEASE, "(_diseases|_disorders)$", 0));
 640+ conceptTypeSensors.add( new HasCategoryLikeSensor<ConceptType>(LifeScienceConceptType.DISEASE, "(_diseases|_disorders)$", 0, false));
641641
642642 conceptTypeSensors.add( new HasTemplateLikeSensor<ConceptType>(LifeScienceConceptType.ORGAN, "^Infobox_(Brain|Nerve|Muscle|Vein|Artery|Bone|Anatomy|Ligament|Lymph)$", 0, null));
643643 conceptTypeSensors.add( new HasTemplateLikeSensor<ConceptType>(LifeScienceConceptType.ORGAN, "_glands$|^SUNYAnatomy|^(BUHistology|AnatomyAtlasesMicroscopic|Gray's|Anatomy-stub)$", 0, null));
644644
645645 conceptTypeSensors.add( new HasTemplateLikeSensor<ConceptType>(LifeScienceConceptType.FOOD, "Nutritional_value", 0, null));
 646+ conceptTypeSensors.add( new HasCategoryLikeSensor<ConceptType>(LifeScienceConceptType.FOOD, "(_|$)([Ff]oods|[Vv]egetables|[Ff]ruits)", 0, false));
646647
647648 conceptTypeSensors.add( new HasTemplateSensor<ConceptType>(ConceptType.LIFEFORM, "Taxobox"));
648649 conceptTypeSensors.add( new HasPropertySensor<ConceptType>(ConceptType.LIFEFORM, "GrovesId"));
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/analyzer/sensor/HasCategoryLikeSensor.java
@@ -14,9 +14,13 @@
1515 protected NameMatcher matcher;
1616
1717 public HasCategoryLikeSensor(V value, String pattern, int flags) {
18 - this(value, new PatternNameMatcher(pattern, flags | Pattern.MULTILINE, false));
 18+ this(value, pattern, flags, false);
1919 }
2020
 21+ public HasCategoryLikeSensor(V value, String pattern, int flags, boolean anchored) {
 22+ this(value, new PatternNameMatcher(pattern, flags | Pattern.MULTILINE, anchored));
 23+ }
 24+
2125 public HasCategoryLikeSensor(V value, NameMatcher matcher) {
2226 super(value);
2327 this.matcher = matcher;

Status & tagging log