Index: trunk/WikiWord/WikiWordBuilder4LifeScience/src/main/java/de/brightbyte/wikiword/lifescience/wikis/WikiConfiguration_enwiki.java |
— | — | @@ -636,12 +636,13 @@ |
637 | 637 | conceptTypeSensors.add( new HasCategorySensor<ConceptType>(LifeScienceConceptType.CHEMICAL, "Chemical_elements")); |
638 | 638 | |
639 | 639 | 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)); |
641 | 641 | |
642 | 642 | conceptTypeSensors.add( new HasTemplateLikeSensor<ConceptType>(LifeScienceConceptType.ORGAN, "^Infobox_(Brain|Nerve|Muscle|Vein|Artery|Bone|Anatomy|Ligament|Lymph)$", 0, null)); |
643 | 643 | conceptTypeSensors.add( new HasTemplateLikeSensor<ConceptType>(LifeScienceConceptType.ORGAN, "_glands$|^SUNYAnatomy|^(BUHistology|AnatomyAtlasesMicroscopic|Gray's|Anatomy-stub)$", 0, null)); |
644 | 644 | |
645 | 645 | 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)); |
646 | 647 | |
647 | 648 | conceptTypeSensors.add( new HasTemplateSensor<ConceptType>(ConceptType.LIFEFORM, "Taxobox")); |
648 | 649 | 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 @@ |
15 | 15 | protected NameMatcher matcher; |
16 | 16 | |
17 | 17 | public HasCategoryLikeSensor(V value, String pattern, int flags) { |
18 | | - this(value, new PatternNameMatcher(pattern, flags | Pattern.MULTILINE, false)); |
| 18 | + this(value, pattern, flags, false); |
19 | 19 | } |
20 | 20 | |
| 21 | + public HasCategoryLikeSensor(V value, String pattern, int flags, boolean anchored) { |
| 22 | + this(value, new PatternNameMatcher(pattern, flags | Pattern.MULTILINE, anchored)); |
| 23 | + } |
| 24 | + |
21 | 25 | public HasCategoryLikeSensor(V value, NameMatcher matcher) { |
22 | 26 | super(value); |
23 | 27 | this.matcher = matcher; |