Index: trunk/WikiWord/WikiWordBuilder4Biography/src/main/java/de/brightbyte/wikiword/biography/wikis/WikiConfiguration_dewiki.java |
— | — | @@ -2,11 +2,14 @@ |
3 | 3 | |
4 | 4 | import java.util.regex.Pattern; |
5 | 5 | |
| 6 | +import de.brightbyte.wikiword.ConceptType; |
6 | 7 | import de.brightbyte.wikiword.analyzer.WikiConfiguration; |
7 | 8 | import de.brightbyte.wikiword.analyzer.extractor.CategoryPatternParameterExtractor; |
8 | 9 | import de.brightbyte.wikiword.analyzer.extractor.PagePropertyValueExtractor; |
9 | 10 | import de.brightbyte.wikiword.analyzer.extractor.TemplateParameterExtractor; |
10 | 11 | import de.brightbyte.wikiword.analyzer.matcher.ExactNameMatcher; |
| 12 | +import de.brightbyte.wikiword.analyzer.sensor.HasPropertySensor; |
| 13 | +import de.brightbyte.wikiword.analyzer.sensor.HasTemplateLikeSensor; |
11 | 14 | import de.brightbyte.wikiword.analyzer.template.DefaultTemplateParameterPropertySpec; |
12 | 15 | |
13 | 16 | public class WikiConfiguration_dewiki extends WikiConfiguration { |
— | — | @@ -18,9 +21,9 @@ |
19 | 22 | propertyExtractors.add( new CategoryPatternParameterExtractor("^Gestorben_(\\d+(_v\\._Chr\\.)?)$", "$1", 0, "person-death-date") ); |
20 | 23 | |
21 | 24 | propertyExtractors.add( new CategoryPatternParameterExtractor("^Maler_(der|des)_(.+)$", "$2", 0, "artist-group") ); |
22 | | - propertyExtractors.add( new CategoryPatternParameterExtractor("^(Maler|Bildhauer|Fotograf)(_|$)", "$2", 0, "artist-group") ); |
23 | | - propertyExtractors.add( new CategoryPatternParameterExtractor("^.*[^_](maler|bildhauer|fotograf)$", "$2", 0, "artist-group") ); |
24 | | - propertyExtractors.add( new CategoryPatternParameterExtractor("^.*([-_\\wäöü]+)(maler|bildhauer|fotograf)$", "$1", 0, "artist-group") ); |
| 25 | + propertyExtractors.add( new CategoryPatternParameterExtractor("^(Maler|Bildhauer|Fotograf)(_|$).*$", "$1", 0, "artist-group") ); |
| 26 | + propertyExtractors.add( new CategoryPatternParameterExtractor("^.*[^_](maler|bildhauer|fotograf)$", "$1", 0, "artist-group").setCapitalize(true) ); |
| 27 | + propertyExtractors.add( new CategoryPatternParameterExtractor("^.*?([-_\\wäöü]+)(maler|bildhauer|fotograf)$", "$2", 0, "artist-group") ); |
25 | 28 | |
26 | 29 | propertyExtractors.add( new TemplateParameterExtractor(new ExactNameMatcher("Personendaten"), |
27 | 30 | new DefaultTemplateParameterPropertySpec("NAME", "person-sortname").setStripMarkup(true), |
— | — | @@ -43,7 +46,11 @@ |
44 | 47 | //TODO: {{BAM|Kohl|Helmut}} |
45 | 48 | |
46 | 49 | pageTermExtractors.add( new PagePropertyValueExtractor("person-sortname") ); |
47 | | - pageTermExtractors.add( new PagePropertyValueExtractor("person-name") ); |
| 50 | + pageTermExtractors.add( new PagePropertyValueExtractor("person-name") ); |
| 51 | + |
| 52 | + conceptTypeSensors.add( new HasPropertySensor<ConceptType>(ConceptType.PERSON, "person-name") ); |
| 53 | + conceptTypeSensors.add( new HasPropertySensor<ConceptType>(ConceptType.PERSON, "person-birth-date") ); |
| 54 | + conceptTypeSensors.add( new HasPropertySensor<ConceptType>(ConceptType.PERSON, "artist-group") ); |
48 | 55 | } |
49 | 56 | |
50 | 57 | } |