-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtest.php
More file actions
31 lines (22 loc) · 968 Bytes
/
test.php
File metadata and controls
31 lines (22 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require("word_processor.php");
$language = "Telugu";
$words = array('అమ్మ', 'అరక', 'స్త్రీ', 'ఆస్ట్రేలియా', 'ఆనందమకరందము');
//$language = "English";
//$words = array('mother', 'tool', 'cow', 'australia', 'happiness');
foreach ($words as $x) {
// create a word processor
$x_wp = new wordProcessor($x, $language);
// now, we can call any method on x_wp
echo "<br>";
echo "<br> given word = ", $x;
echo "<br> logical length = ", $x_wp->getLength();
echo "<br> code point length = ", $x_wp->getCodePointLength();
echo "<br> word weight = ", $x_wp->getWordWeight($language);
echo "<br> word strength = ", $x_wp->getWordStrength($language);
echo "<br> word level = ", $x_wp->getWordLevel($language);
echo "<br> logical characters = ";
print_r($x_wp->getLogicalChars());
echo "<br> code points = ";
print_r($x_wp->getCodePoints());
}