|
4 | 4 | import edu.illinois.cs.cogcomp.core.datastructures.textannotation.*;
|
5 | 5 | import edu.illinois.cs.cogcomp.lbjava.nlp.Word;
|
6 | 6 | import edu.illinois.cs.cogcomp.lbjava.parse.LinkedVector;
|
7 |
| -import edu.illinois.cs.cogcomp.ner.LbjTagger.Data; |
8 |
| -import edu.illinois.cs.cogcomp.ner.LbjTagger.NERDocument; |
9 |
| -import edu.illinois.cs.cogcomp.ner.LbjTagger.NEWord; |
| 7 | +import edu.illinois.cs.cogcomp.ner.LbjTagger.*; |
10 | 8 | import org.jetbrains.annotations.NotNull;
|
11 | 9 | import org.slf4j.Logger;
|
12 | 10 | import org.slf4j.LoggerFactory;
|
@@ -42,7 +40,7 @@ public static Data loaddataFromTAs(List<TextAnnotation> tas) throws Exception {
|
42 | 40 | * @param ta a text annotation
|
43 | 41 | * @return NERDocument
|
44 | 42 | */
|
45 |
| - public static NERDocument getNerDocument(TextAnnotation ta) { |
| 43 | + public static NERDocument getNerDocument(TextAnnotation ta, ParametersForLbjCode cp) { |
46 | 44 | // convert this data structure into one the NER package can deal with.
|
47 | 45 | ArrayList<LinkedVector> sentences = new ArrayList<>();
|
48 | 46 | String[] tokens = ta.getTokens();
|
@@ -87,11 +85,11 @@ public static NERDocument getNerDocument(TextAnnotation ta) {
|
87 | 85 | }
|
88 | 86 |
|
89 | 87 | if (w.length() > 0) {
|
90 |
| - //NEWord.addTokenToSentence(words, w, tag); |
| 88 | + NEWord.addTokenToSentence(words, w, tag, cp); |
91 | 89 |
|
92 |
| - NEWord word=new NEWord(new Word(w),null,tag); |
| 90 | + //NEWord word = new NEWord(new Word(w),null,tag); |
93 | 91 |
|
94 |
| - NEWord.addTokenToSentence(words, word); |
| 92 | + //NEWord.addTokenToSentence(words, word); |
95 | 93 |
|
96 | 94 |
|
97 | 95 | tokenindices[neWordIndex] = tokenIndex;
|
|
0 commit comments