@@ -32,44 +32,44 @@ public function testBigrams()
3232 $ this ->assertEquals ($ ngrams ['know<>something ' ], array ( 0 =>2 , 1 => 3 , 2 => 2 ));
3333
3434 //test tmi measure
35- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'tmi ' , 2 );
36- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 0.1612 );
35+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'tmi ' , 2 );
36+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 0.1612 );
3737
3838 //test ll measure
39- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'll ' , 2 );
40- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 13.8516 );
39+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'll ' , 2 );
40+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 13.8516 );
4141
4242 //test pmi measure
43- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'pmi ' , 2 );
44- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 4.3692 );
43+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'pmi ' , 2 );
44+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 4.3692 );
4545
4646 //test dice measure
47- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'dice ' , 2 );
48- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 0.8000 );
47+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'dice ' , 2 );
48+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 0.8000 );
4949
5050 //test x2 measure
51- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'x2 ' , 2 );
52- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 40.6444 );
51+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'x2 ' , 2 );
52+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 40.6444 );
5353
5454 //test tscore measure
55- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'tscore ' , 2 );
56- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 1.3458 );
55+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'tscore ' , 2 );
56+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 1.3458 );
5757
5858 //test phi measure
59- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'phi ' , 2 );
60- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 0.6556 );
59+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'phi ' , 2 );
60+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 0.6556 );
6161
6262 //test odds measure
63- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'odds ' , 2 );
64- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 118.0000 );
63+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'odds ' , 2 );
64+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 118.0000 );
6565
6666 //test leftFisher measure
67- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'leftFisher ' , 2 );
68- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 1.0000 );
67+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'leftFisher ' , 2 );
68+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 1.0000 );
6969
7070 //test rightFisher measure
71- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'rightFisher ' , 2 );
72- $ this ->assertEquals (round ($ ngrams_stats ['know<>something ' ], 4 ), 0.0016 );
71+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'rightFisher ' , 2 );
72+ $ this ->assertEquals (round ($ ngramsStats ['know<>something ' ], 4 ), 0.0016 );
7373 }
7474
7575 public function testTrigrams ()
@@ -81,11 +81,11 @@ public function testTrigrams()
8181 $ this ->assertEquals ($ ngrams ['the<>know<>something ' ], array ( 0 => 1 , 1 => 4 , 2 => 3 , 3 => 2 , 4 => 1 , 5 => 1 , 6 => 2 ));
8282
8383 //test tmi measure
84- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'tmi ' , 3 );
85- $ this ->assertEquals (round ($ ngrams_stats ['the<>know<>something ' ], 4 ), 0.2002 );
84+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'tmi ' , 3 );
85+ $ this ->assertEquals (round ($ ngramsStats ['the<>know<>something ' ], 4 ), 0.2002 );
8686
8787 //test ll measure
88- $ ngrams_stats = StatisticFacade::calculate ($ ngrams , 'll ' , 3 );
89- $ this ->assertEquals (round ($ ngrams_stats ['the<>know<>something ' ], 4 ), 16.9283 );
88+ $ ngramsStats = StatisticFacade::calculate ($ ngrams , 'll ' , 3 );
89+ $ this ->assertEquals (round ($ ngramsStats ['the<>know<>something ' ], 4 ), 16.9283 );
9090 }
9191}
0 commit comments