@@ -32,44 +32,44 @@ public function testBigrams()
32
32
$ this ->assertEquals ($ ngrams ['know<>something ' ], array ( 0 =>2 , 1 => 3 , 2 => 2 ));
33
33
34
34
//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 );
37
37
38
38
//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 );
41
41
42
42
//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 );
45
45
46
46
//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 );
49
49
50
50
//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 );
53
53
54
54
//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 );
57
57
58
58
//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 );
61
61
62
62
//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 );
65
65
66
66
//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 );
69
69
70
70
//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 );
73
73
}
74
74
75
75
public function testTrigrams ()
@@ -81,11 +81,11 @@ public function testTrigrams()
81
81
$ this ->assertEquals ($ ngrams ['the<>know<>something ' ], array ( 0 => 1 , 1 => 4 , 2 => 3 , 3 => 2 , 4 => 1 , 5 => 1 , 6 => 2 ));
82
82
83
83
//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 );
86
86
87
87
//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 );
90
90
}
91
91
}
0 commit comments