Skip to content

Instantly share code, notes, and snippets.

@drgomesp
Last active December 14, 2015 15:08
Show Gist options
  • Save drgomesp/5105186 to your computer and use it in GitHub Desktop.
Save drgomesp/5105186 to your computer and use it in GitHub Desktop.
Grammer - A grammer analyzer library for PHP
<?php
$s = Grammer\Syntax::analyze('Marcos e Paulo gostam de estudar todos os dias.');
var_dump($s);
/**
* array(
* 0: Compound_Subject(
* value: Marcos e Paulo
* 0: Proper_Name(
* value: Marcos
* )
* 1: Proper_Name(
* value: Paulo
* )
* )
* 1: Verbal_Predicate(
* value: gostam de estudar todos os dias
* 0: Verb(
* value: gostam
* )
* 1: Indirect_Object(
* value: de estudar
* )
* 2: Temporal_Adjunct(
* value: todos os dias
* )
* )
* )
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment