Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/analyzer/WikiTextAnalyzer.java |
— | — | @@ -1900,9 +1900,17 @@ |
1901 | 1901 | |
1902 | 1902 | for (int i = ccc.length-1; i >= 0; i--) { //NOTE: most specific last, because last write wins. |
1903 | 1903 | if (!stop.add(ccc[i])) continue; |
| 1904 | + WikiConfiguration conf; |
1904 | 1905 | |
1905 | | - ctor = ccc[i].getConstructor(new Class[] { }); |
1906 | | - WikiConfiguration conf = (WikiConfiguration)ctor.newInstance(new Object[] { } ); |
| 1906 | + try { |
| 1907 | + ctor = ccc[i].getConstructor(new Class[] { }); |
| 1908 | + conf = (WikiConfiguration)ctor.newInstance(new Object[] { } ); |
| 1909 | + } |
| 1910 | + catch (NoSuchMethodException ex) { |
| 1911 | + ctor = ccc[i].getConstructor(new Class[] { String.class }); |
| 1912 | + conf = (WikiConfiguration)ctor.newInstance(new Object[] { language.getCorpus().getLanguage() } ); |
| 1913 | + } |
| 1914 | + |
1907 | 1915 | analyzer.configure(conf, language.tweaks); |
1908 | 1916 | } |
1909 | 1917 | |