Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/analyzer/WikiConfiguration.java |
— | — | @@ -492,6 +492,7 @@ |
493 | 493 | propertyExtractors.addAll(with.propertyExtractors); |
494 | 494 | pageTermExtractors.addAll(with.pageTermExtractors); |
495 | 495 | redirectExtractors.addAll(with.redirectExtractors); |
| 496 | + aliasExtractors.addAll(with.aliasExtractors); |
496 | 497 | supplementNameExtractors.addAll(with.supplementNameExtractors); |
497 | 498 | supplementedConceptExtractors.addAll(with.supplementedConceptExtractors); |
498 | 499 | |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/analyzer/extractor/TemplateParameterValueExtractor.java |
— | — | @@ -8,7 +8,6 @@ |
9 | 9 | import de.brightbyte.wikiword.analyzer.AnalyzerUtils; |
10 | 10 | import de.brightbyte.wikiword.analyzer.WikiPage; |
11 | 11 | import de.brightbyte.wikiword.analyzer.mangler.Mangler; |
12 | | -import de.brightbyte.wikiword.analyzer.matcher.ExactNameMatcher; |
13 | 12 | import de.brightbyte.wikiword.analyzer.matcher.NameMatcher; |
14 | 13 | import de.brightbyte.wikiword.analyzer.matcher.PatternNameMatcher; |
15 | 14 | import de.brightbyte.wikiword.analyzer.template.TemplateData; |
— | — | @@ -22,7 +21,7 @@ |
23 | 22 | protected Mangler mangler = null; |
24 | 23 | |
25 | 24 | public TemplateParameterValueExtractor(String template, int flags, String parameter) { |
26 | | - this(new ExactNameMatcher(template), parameter); |
| 25 | + this(new PatternNameMatcher(template, flags, true), parameter); |
27 | 26 | } |
28 | 27 | |
29 | 28 | public TemplateParameterValueExtractor(Pattern template, String parameter) { |
— | — | @@ -56,7 +55,7 @@ |
57 | 56 | if (prefix!=null) v = prefix+v; |
58 | 57 | if (v!=null) { |
59 | 58 | if (mangler!=null) v = mangler.mangle(v); |
60 | | - AnalyzerUtils.addToSet(into, v); |
| 59 | + into = AnalyzerUtils.addToSet(into, v); |
61 | 60 | } |
62 | 61 | } |
63 | 62 | } |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/analyzer/WikiTextAnalyzer.java |
— | — | @@ -839,7 +839,7 @@ |
840 | 840 | */ |
841 | 841 | public WikiLink getAliasFor() { |
842 | 842 | if (!aliasForKnown) { |
843 | | - aliasFor = extractRedirectLink( this ); |
| 843 | + aliasFor = extractAliasLink( this ); |
844 | 844 | aliasForKnown = true; |
845 | 845 | } |
846 | 846 | |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/ConceptImporter.java |
— | — | @@ -278,7 +278,7 @@ |
279 | 279 | |
280 | 280 | //if the cat page contains a reference to the main topic page, store it. |
281 | 281 | WikiTextAnalyzer.WikiLink aliasFor = analyzerPage.getAliasFor(); |
282 | | - storeConceptAlias(rcId, conceptId, name, -1, aliasFor.getTargetConcept().toString(), AliasScope.CATEGORY); |
| 282 | + if (aliasFor!=null) storeConceptAlias(rcId, conceptId, name, -1, aliasFor.getTargetConcept().toString(), AliasScope.CATEGORY); |
283 | 283 | |
284 | 284 | List<WikiTextAnalyzer.WikiLink> links = analyzerPage.getLinks(); |
285 | 285 | linkTracker.step(links.size()); |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/wikis/WikiConfiguration_enwiki.java |
— | — | @@ -179,7 +179,7 @@ |
180 | 180 | disambigStripSectionPattern = sectionPattern("See also", 0); |
181 | 181 | //FIXME: disambig pages marked with {{shipindex}} are tabular! |
182 | 182 | |
183 | | - aliasExtractors.add( new TemplateParameterValueExtractor("Catmore?", 0, "1") ); //FIXME: testme |
| 183 | + aliasExtractors.add( new TemplateParameterValueExtractor("Catmore2?", 0, "1") ); //FIXME: testme |
184 | 184 | aliasExtractors.add( new TemplateParameterValueExtractor("Catmore1", 0, "1").setManger( new RegularExpressionMangler("^.*\\[\\[ *(.+?) *(\\||\\]\\])", "$1", 0) ) ); |
185 | 185 | //TODO: Catmoresub |
186 | 186 | |