File tree 1 file changed +2
-9
lines changed
lib/application/japanese_text_processing
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,6 @@ List<String> getDeconjugatedTerms(String word){
21
21
List <TokenNode > nodes = GetIt .I <Mecab >().parse (word)..removeLast ();
22
22
List <TokenNode > maxLengthWord = selectMaxLengthWord (nodes);
23
23
24
- print (maxLengthWord.map ((e) {
25
- for (var i = 0 ; i < e.features.length; i++ ) {
26
- print ("$i ${e .features [i ]}" );
27
- }
28
- }).toList ());
29
-
30
24
for (int i = maxLengthWord.length- 1 ; i >= 0 ; i-- ){
31
25
// deconjugate the full word by only modifying the ending
32
26
if (! compareMecabOut (maxLengthWord[i].features, [inflectionDependentWord])){
@@ -42,11 +36,10 @@ List<String> getDeconjugatedTerms(String word){
42
36
.map ((List <String > f) => f..insert (0 , nodes[i].surface))
43
37
.toList ();
44
38
}
45
-
46
39
}
47
40
}
48
41
49
42
// remove duplicates
50
- print ( "TestL $ deconjugations " );
51
- return deconjugations. map ((e) => e. join (), ).toList ();
43
+ return deconjugations. map ((e) => e. join ())
44
+ . toSet ( ).toList ();
52
45
}
You can’t perform that action at this time.
0 commit comments