Index: trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/disambig/CoherenceDisambiguator.java |
— | — | @@ -21,7 +21,6 @@ |
22 | 22 | import de.brightbyte.data.measure.Similarity; |
23 | 23 | import de.brightbyte.util.PersistenceException; |
24 | 24 | import de.brightbyte.util.SanityException; |
25 | | -import de.brightbyte.wikiword.disambig.Disambiguator.Disambiguation; |
26 | 25 | import de.brightbyte.wikiword.model.ConceptFeatures; |
27 | 26 | import de.brightbyte.wikiword.model.PhraseNode; |
28 | 27 | import de.brightbyte.wikiword.model.TermReference; |
— | — | @@ -271,7 +270,7 @@ |
272 | 271 | return getBestInterpretation(root, meanings, context, interpretations, similarities, features); |
273 | 272 | } |
274 | 273 | |
275 | | - protected <X extends TermReference>Map<X, List<? extends C>> getMeanings(Collection<X> terms, Map<X, C> known) throws PersistenceException { |
| 274 | + protected <X extends TermReference>Map<X, List<? extends C>> getMeanings(Collection<X> terms, Map<String, C> known) throws PersistenceException { |
276 | 275 | Map<X, List<? extends C>> meanings = super.getMeanings(terms, known); |
277 | 276 | pruneMeanings(meanings); |
278 | 277 | return meanings; |
Index: trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/disambig/AbstractDisambiguator.java |
— | — | @@ -100,12 +100,12 @@ |
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
104 | | - protected <X extends TermReference>Map<X, List<? extends C>> getMeanings(PhraseNode<X> root, Map<X, C> known) throws PersistenceException { |
| 104 | + protected <X extends TermReference>Map<X, List<? extends C>> getMeanings(PhraseNode<X> root, Map<String, C> known) throws PersistenceException { |
105 | 105 | Collection<X> terms = getTerms(root, Integer.MAX_VALUE); |
106 | 106 | return getMeanings(terms, known); |
107 | 107 | } |
108 | 108 | |
109 | | - protected <X extends TermReference>Map<X, List<? extends C>> getMeanings(Collection<X> terms, Map<X, C> known) throws PersistenceException { |
| 109 | + protected <X extends TermReference>Map<X, List<? extends C>> getMeanings(Collection<X> terms, Map<String, C> known) throws PersistenceException { |
110 | 110 | Collection<X> todo = terms; |
111 | 111 | |
112 | 112 | if (meaningOverrides!=null || known!=null) { |
— | — | @@ -139,13 +139,13 @@ |
140 | 140 | return meanings; |
141 | 141 | } |
142 | 142 | |
143 | | - public <X extends TermReference>Disambiguation<X, C> disambiguate(List<X> terms, Map<X, C> known, Collection<? extends C> context) throws PersistenceException { |
| 143 | + public <X extends TermReference>Disambiguation<X, C> disambiguate(List<X> terms, Map<String, C> known, Collection<? extends C> context) throws PersistenceException { |
144 | 144 | PhraseNode<X> root = new TermListNode<X>(terms, 0); |
145 | 145 | Map<X, List<? extends C>> meanings = getMeanings(terms, known); |
146 | 146 | return doDisambiguate(root, meanings, context); |
147 | 147 | } |
148 | 148 | |
149 | | - public <X extends TermReference>Disambiguation<X, C> disambiguate(PhraseNode<X> root, Map<X, C> known, Collection<? extends C> context) throws PersistenceException { |
| 149 | + public <X extends TermReference>Disambiguation<X, C> disambiguate(PhraseNode<X> root, Map<String, C> known, Collection<? extends C> context) throws PersistenceException { |
150 | 150 | Collection<X> terms = getTerms(root, Integer.MAX_VALUE); |
151 | 151 | Map<X, List<? extends C>> meanings = getMeanings(terms, known); |
152 | 152 | return doDisambiguate(root, meanings, context); |
Index: trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/disambig/Disambiguator.java |
— | — | @@ -166,8 +166,8 @@ |
167 | 167 | |
168 | 168 | public void setTrace(Output trace); |
169 | 169 | |
170 | | - public <X extends TermReference>Disambiguation<X, C> disambiguate(List<X> terms, Map<X, C> known, Collection<? extends C> context) throws PersistenceException; |
171 | | - public <X extends TermReference>Disambiguation<X, C> disambiguate(PhraseNode<X> root, Map<X, C> known, Collection<? extends C> context) throws PersistenceException; |
| 170 | + public <X extends TermReference>Disambiguation<X, C> disambiguate(List<X> terms, Map<String, C> known, Collection<? extends C> context) throws PersistenceException; |
| 171 | + public <X extends TermReference>Disambiguation<X, C> disambiguate(PhraseNode<X> root, Map<String, C> known, Collection<? extends C> context) throws PersistenceException; |
172 | 172 | |
173 | 173 | public boolean exploresAllSequences(); |
174 | 174 | |