<?php

// TITLE:  linguisticTest.php
// TYPE:   excutable
// AUTHOR: Ryan Lin
// DATE:   12/04/2008
// ABOUT:  Testing the functions in Linguistics.php
// ================================================================================
/*
error_reporting(E_ALL);
ini_set('display_errors','1');
*/
require_once '../Linguistics.php';
$linguistics = new Linguistics();
$a = 'The case against Flex-based application UIs
02-Feb-2009   --   Comments -- none yet

We\'re starting to see more vendors coming out with Flex-based user interfaces, sometimes extending them as full-blown desktop applications using the AIR runtime. For example, Documentum\'s D6 Web Publisher comes with a standalone Flex interface for certain tasks.

To me, turning to Flex for a content management interface is a cop-out. It creates nice demoware for the vendor, but long-term problems for you. I can see why Flex is alluring for vendors: maintaining consistent, cross-browser compatibility (especially with AJAX) is hard and expensive. But why does that mean that you the customer must give up the simplicity and supportability of a native browser-based interface?

Flex is essentially another semi-thick client akin to Java applets (or ActiveX controls). Let\'s review why the business world didn\'t like applets for application user interfaces when they were pervasive within enterprise web applications earlier this decade.

They almost always violate web accessibility guidelines. Sure, many thin-client application interfaces are not compliant either, but at least you have the opportunity to make them compliant -- and many platforms (e.g., Plone) do so.

They create support nightmares. Things like automatic updates, license-checking, and incompatibilities with the underlying virtual machine lead to many a help-desk call. As my colleague Kas notes, with AIR instead of applets you are just replacing Sun\'s virtual machine with Adobe\'s. The potential for trouble remains.

They are prone to performance problems. Flex applications are prone to the same memory leaks and CPU spikes that bedeviled applets for years. To be sure, I\'ve seen some fat and ugly JavaScript-based interfaces too, but at least everyone can debug those openly. We\'ve also had customers tell us that their Flex interfaces are unusually chatty on their networks.

You can\'t easily modify them. The vendor sets a unified interface and all their customers have to live with it. That might work for a one-dimensional tool, like a Twitter client, but what about more heterogeneous, multidimensional environments?
					</td>
				</tr>
				<tr>
					<th>
						a keyword from the text:
					</th>
					<td>
						<input type="text" name="keyword" />
					</td>
				</tr>
				<tr>
					<th></th>
					<td>
						<input type="submit" value="analyze" />
					</td>
				</tr>
			</table>
		</form>
<?php 
} else {
    $linguistics = new Linguistics();
    printf('<h3>original text</h3>%s<hr />', $_POST['text']);
    printf('<h3>goodness of "%s": %f</h3>', $_POST['keyword'], $linguistics->goodness($_POST['keyword'], $_POST['text']));
}
?>
		
		
		
</body>
</html>
<?php

// TITLE:  linguisticTest.php
// TYPE:   excutable
// AUTHOR: Ryan Lin
// DATE:   12/04/2008
// ABOUT:  Testing the functions in Linguistics.php
// ================================================================================
/*
error_reporting(E_ALL);
ini_set('display_errors','1');
*/
require_once '../Linguistics.php';
$linguistics = new Linguistics();
$a = 'Adobe is bad. It sucks. I hate it.';
$b = 'Adobe is not bad. It does not suck. I don\'t hate it';
$g = 'Adobe is good. It is great. I love it.';
$h = 'Adobe is very good. It is so great. I love it.';
$o = 'Adobe sucks. I love Adobe.';
$p = 'Adobe is hardly ever respectable.';
$c = 'My spelleeng iss horibel. I am nott a trustwoorthy persun';
$d = 'My spelling is good. My posts can be trusted';
$e = 'I am bad at " punctuation ) and (cannot) be "trusted"';
$f = 'I am good at "punctuation" and (can) "be" trusted.';
$i = 'i rush when typing... often i don\'t capitalize!! don\'t trust me?!?! I only capitalize one sentence';
$j = 'I am a careful writer! I take my time to capitalize. Trust me!';
$k = 'With the economy deteriorating rapidly, the nation’s employers shed 533,000 jobs in November, the 11th consecutive monthly decline, the government reported Friday morning, and the unemployment rate rose to 6.7 percent.';
$m = 'old ur breath and copy this and then paste it to another vid. if u dont let ur breath go ur a gd kisser. (i managed) ';
$n = 'do you like sci-fi? watch Firefly.
do you like westerns? watch Firefly.
do you like space? watch Firefly.