public function test__surfaceFormOnOneStem_2_morphemes() { $stem = 'aariaq'; $morpheme1 = LinguisticObjects::getObject('galaq/1nn'); $morpheme2 = LinguisticObjects::getObject('it/tn-nom-p'); $radicaux = $this->object->_surfaceFormOnOneStem($stem, array($morpheme1, $morpheme2)); $att = array('aariagalait'); $this->assertEquals($att, $radicaux, ""); }
public function __construct($list_of_morpheme_ids) { $logger = Logger::getLogger('Word.__construct'); $list_of_morphemes = array(); foreach ($list_of_morpheme_ids as $a_morpheme_id) { $logger->debug("\$a_morpheme_id= '{$a_morpheme_id}'"); $object = LinguisticObjects::getObject($a_morpheme_id); $logger->debug("id de l'objet : '" . $object->id() . "'"); array_push($list_of_morphemes, $object); } $this->morphemes = $list_of_morphemes; }
public function ___test_attribut() { $id = 'uumi/1v'; $rv = LinguisticObjects::getObject($id); $type = $rv->attribute('type'); $type_att = 'v'; $this->assertEquals($type_att, $type, ""); }
<?php require_once "linguisticobjects/LinguisticObjects.php"; require_once "lib/log4php/Logger.php"; Logger::configure(getenv('PHP_INUKTITUT') . '/log4php.properties.xml'); $logger = Logger::getLogger('getAllTransitiveVerbs'); $roots = LinguisticObjects::listOfRoots(); foreach ($roots as $a_root_id) { $logger->debug("\$a_root_id= {$a_root_id}"); $root_object = LinguisticObjects::getObject($a_root_id); if ($root_object->type() === 'v') { if ($root_object->isTransitiveVerb()) { $en_meaning = $root_object->getEnglishMeaning(); echo "{$a_root_id} --- {$en_meaning}\n"; } } }