File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
tests/TextAnalysis/NGrams Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 13
13
"psr-4" : {
14
14
"TextAnalysis\\ " : " src/"
15
15
},
16
- "files" : [" src/helpers/storage.php" , " src/helpers/print.php" , " simplified.php" ]
16
+ "files" : [" src/helpers/storage.php" , " src/helpers/print.php" , " src/helpers/ simplified.php" ]
17
17
},
18
18
"autoload-dev" : {
19
19
"files" : [" tests/TestBaseCase.php" ]
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ public function testBiGram()
16
16
$ tokens = ["one " ,"two " ,"three " ];
17
17
$ expected = ["one two " ,"two three " ];
18
18
$ bigrams = NGramFactory::create ($ tokens );
19
- $ this ->assertEquals ($ expected , $ bigrams );
19
+ $ this ->assertEquals ($ expected , $ bigrams );
20
+ $ this ->assertEquals ($ expected , bigrams ($ tokens ));
20
21
}
21
22
22
23
public function testTriGram ()
@@ -25,5 +26,7 @@ public function testTriGram()
25
26
$ expected = ["one two three " ,"two three four " ];
26
27
$ bigrams = NGramFactory::create ($ tokens , NGramFactory::TRIGRAM );
27
28
$ this ->assertEquals ($ expected , $ bigrams );
29
+ $ this ->assertEquals ($ expected , trigrams ($ tokens ));
30
+
28
31
}
29
32
}
You can’t perform that action at this time.
0 commit comments