# This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # You should have received a copy of the GNU General Public License # along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA "SAT/EN - Simple Articulated Text / English" from allegra import sat ARTICULATE = sat.ARTICULATE_ASCII_Head + ( # Conjonctions de Subordination sat.articulators_re( ('comme', 'lorsque', 'puisque', 'quand', 'que', 'quoique', 'si')), # Conjonctions de Coordination sat.articulators_re(( 'mais', 'ou', 'et', 'donc', 'or', 'ni', 'car', 'cependant', 'néanmoins', 'toutefois', )), # Prépositions sat.articulators_re((
# # writing a natural language lexer as a stack of RE is both practical # and effective: CPython's SRE library is compliant and fast, and a # stack is one of the easiest programming pattern possible. # # yet the result are surprisingly good for such vocabulary and formal # pattern articulation (punctuation, case, etc). with as little loss # as possible a SAT lexer can produce very well-articulated Public # Names, but only time and test will tell which RE stack will prevail # or carve a contextual niche and which one will be abandonned. ARTICULATE = sat.ARTICULATE_ASCII_Head + ( # Subordinating Conjunctions sat.articulators_re (( 'after', 'although', 'because', 'before', 'once', 'since', 'though', 'till', 'unless', 'until', 'when', 'whenever', 'where', 'whereas', 'wherever', 'while', 'as', 'even', 'if', 'that', 'than', )), # Coordinating and Correlative Conjunctions sat.articulators_re (( 'and', 'or', 'not', 'but', 'yet', 'for', 'so', 'both', 'either', 'nor', 'neither', 'whether', )), # Prepositions: Locators in Time and Place sat.articulators_re (( 'in', 'at', 'on', 'to', )), # Articles sat.articulators_re (( 'a', 'an', 'the',
# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # You should have received a copy of the GNU General Public License # along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA "SAT/EN - Simple Articulated Text / English" from allegra import sat ARTICULATE = sat.ARTICULATE_ASCII_Head + ( # Conjonctions de Subordination sat.articulators_re (( 'comme', 'lorsque', 'puisque', 'quand', 'que', 'quoique', 'si' )), # Conjonctions de Coordination sat.articulators_re (( 'mais', 'ou', 'et', 'donc', 'or', 'ni', 'car', 'cependant', 'néanmoins', 'toutefois', )), # Prépositions sat.articulators_re (( 'devant', 'derrière', 'après', # le rang 'dans', 'en', 'chez', 'sous', # le lieu 'avant', 'après', 'depuis', 'pendant', # le temps 'avec', 'selon', 'de', # la manière 'vu', 'envers', 'pour', 'à', 'sans', 'sauf' # ? dispersés )), # Articles