Revision: 314c0db4137a
Branch: default
Author: Michael Gasser <
gas...@cs.indiana.edu>
Date: Mon Feb 10 21:51:55 2014 UTC
Log: New L3Lite subproject: stripped down version of L3, eventually
easy to create and modify, hybrid, adaptable to other DG frameworks
http://code.google.com/p/hltdi-l3/source/detail?r=314c0db4137a
Added:
/l3lite/__init__.py
/l3lite/entry.py
/l3lite/language.py
/lite.py
Deleted:
/l3xdg/variable.pyx
/l3xdg/variable.so
Modified:
/l3xdg/dimension.py
/l3xdg/languages/gn/FST/n.fst
/l3xdg/languages/gn/FST/nG.fst
/l3xdg/languages/gn/
chunk.gr
/l3xdg/languages/gn/n_chunk.inst
/l3xdg/node.py
/l3xdg/variable.py
/l3xdg/xdg.py
=======================================
--- /dev/null
+++ /l3lite/__init__.py Mon Feb 10 21:51:55 2014 UTC
@@ -0,0 +1,5 @@
+"""Do-it-yourself L3. Create simple bilingual lexicons and grammars for
language pairs."""
+
+__all__ = ['language']
+
+from .language import *
=======================================
--- /dev/null
+++ /l3lite/entry.py Mon Feb 10 21:51:55 2014 UTC
@@ -0,0 +1,197 @@
+#
+# L3Lite entries: words, grammatical morphemes, lexemes, lexical classes
+#
+########################################################################
+#
+# This file is part of the HLTDI L^3 project
+# for parsing, generation, translation, and computer-assisted
+# human translation.
+#
+# Copyright (C) 2014, HLTDI <
gas...@cs.indiana.edu>
+#
+# This program is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# This program 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. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <
http://www.gnu.org/licenses/>.
+#
+# =========================================================================
+
+# 2014.02.10
+# -- Created
+# Possible subclasses: Lex (word, lexeme, class), Gram
+
+class Entry:
+ """The central unit in L3Lite, containing lexical and grammatical
+ constraints that are instantiated during processing."""
+
+ ID = 0
+
+ def __init__(self, name, language, cls=None):
+ """Initialize name and features:
+ trans, depsin, depsout, grams, agr, gov, order, class, count."""
+
self.name = name
+ self.language = language
+ self.depsin = None
+ self.depsout = None
+ self.trans = None
+ self.order = None
+ self.agr = None
+
self.gov = None
+ self.grams = None
+ self.cls = cls
+ self.count = 1
+
self.id = Entry.ID
+ Entry.ID += 1
+
+ def __repr__(self):
+ """Print name."""
+ return '<{}:{}>'.format(
self.name,
self.id)
+
+ ### Translations (word, gram, lexeme entries)
+
+ def get_trans(self, language, create=False):
+ """Get the translation dict for language in word/lexeme/gram entry.
+ Create it if it doesn't exit and create is True."""
+ if self.trans is None:
+ self.trans = {}
+ if language not in self.trans and create:
+ self.trans[language] = {}
+ return self.trans.get(language)
+
+ def add_trans(self, language, trans, count=1):
+ """Add translation to the translation dictionary dictionary for
language,
+ initializing its count."""
+ transdict = self.get_trans(language, create=True)
+ transdict[trans] = count
+
+ def update_trans(self, language, trans, count=1):
+ """Update the count of translation."""
+ transdict = self.get_trans(language)
+ if trans not in transdict:
+ s = "Attempting to update non-existent translation {} for {}"
+ raise(EntryError(s.format(trans,
self.name)))
+ transdict[trans] += count
+
+ ## Dependencies (word, lexeme, class entries)
+
+ def get_depin(self, label, create=False):
+ """Get the dict of features of incoming dependencies with label,
creating
+ the dict if it's not there and create is True."""
+ if self.depsin is None:
+ self.depsin = {}
+ if create and label not in self.depsin:
+ self.depsin[label] = {}
+ self.language.record_label(label)
+ return self.depsin.get(label)
+
+ def add_depin(self, label, feats):
+ """Assign feats (a dictionary) to features for incoming
dependencies with label,
+ or update the current features."""
+ d = self.get_depin(label, create=True)
+ d.update(feats)
+
+ def get_depout(self, label, create=False):
+ """Get the dict of features of outgoing dependencies with label,
creating
+ the dict if it's not there and create is True."""
+ if self.depsout is None:
+ self.depsout = {}
+ if create and label not in self.depsout:
+ self.depsout[label] = {}
+ self.language.record_label(label)
+ return self.depsout.get(label)
+
+ def add_depout(self, label, feats):
+ """Assign feats (a dictionary) to features for outgoing
dependencies with label,
+ or update the current features."""
+ d = self.get_depout(label, create=True)
+ d.update(feats)
+
+ ## Dependency features
+ ## A dict with keys
+ ## 'min', 'max', 'dflt', 'maxdist'
+
+ def set_deps_feat(self, featdict, key, value):
+ featdict[key] = value
+
+ def get_deps_feat(self, featdict, key):
+ return featdict.get(key)
+
+ ## Order constraints
+ ## A constraint is a tuple of dependency labels and '^' representing
the head
+
+ def get_order(self, create=False):
+ """Get the set of order constraint tuples, creating the set if
it's not there
+ and create is True."""
+ if self.order is None and create:
+ self.order = set()
+ return self.order
+
+ def add_order(self, constraint):
+ """Add an order constraint tuple to the set of order
constraints."""
+ order_constraints = self.get_order(create=True)
+ order_constraints.add(constraint)
+ self.language.record_order(constraint)
+
+ ## Grammatical features associated with words, classes, and lexemes
+
+ def get_gram(self, feature, create=False):
+ """Get the possible values and their counts for grammatical
feature."""
+ if self.grams is None:
+ self.grams = {}
+ if feature not in self.grams and create:
+ self.grams[feature] = {}
+ return self.grams.get(feature)
+
+ def set_gram(self, feat, values):
+ """Set possible values and their counts for grammatical feature.
+ values is a dict of values and their counts."""
+ if self.grams is None:
+ self.grams = {}
+ if feat in self.grams:
+ s = "Entry for {} already has a constraint for feature {}"
+ raise(EntryError(s.format(
self.name, feat)))
+ self.grams[feat] = values
+
+ def update_gram_value(self, feat, value, count=1):
+ gram = self.get_gram(feat, create=True)
+ if value in gram:
+ gram[value] += count
+ else:
+ gram[value] = count
+
+ ## Agreement and government
+
+ ## An agreement constraint requires a dependency label, a head
feature, and
+ ## and a dependent feature.
+
+ def add_agr(self, deplabel, head_feat, dep_feat):
+ """Add an agreement constraint to the list of constraints in the
entry."""
+ if self.agr is None:
+ self.agr = []
+ self.agr.append((deplabel, head_feat, dep_feat))
+
+ ## A government constraint requires a dependency label, a dependent
feature,
+ ## and a dependent value.
+
+ def add_gov(self, deplabel, dep_feat, dep_value):
+ if
self.gov is None:
+
self.gov = []
+ self.gov.append((deplabel, dep_feat, dep_value))
+
+class EntryError(Exception):
+ '''Class for errors encountered when attempting to update an entry.'''
+
+ def __init__(self, value):
+ self.value = value
+
+ def __str__(self):
+ return repr(self.value)
+
=======================================
--- /dev/null
+++ /l3lite/language.py Mon Feb 10 21:51:55 2014 UTC
@@ -0,0 +1,168 @@
+#
+# L3Lite languages: dictionaries of lexical/grammatical entries
+#
+########################################################################
+#
+# This file is part of the HLTDI L^3 project
+# for parsing, generation, translation, and computer-assisted
+# human translation.
+#
+# Copyright (C) 2014, HLTDI <
gas...@cs.indiana.edu>
+#
+# This program is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# This program 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. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <
http://www.gnu.org/licenses/>.
+#
+# =========================================================================
+
+# 2014.02.09
+# -- Created
+# 2014.02.10
+# -- Made entries a separate class.
+
+from .entry import *
+
+class Language:
+ """Dictionaries of words, lexemes, grammatical features, and
+ lexical classes."""
+
+ def __init__(self,
+ name, abbrev,
+ words=None, lexemes=None, grams=None, classes=None):
+ """Initialize dictionaries and names."""
+
self.name = name
+ self.abbrev = abbrev
+ self.words = words or {}
+ # Combine with words in a single lexicon?
+ self.lexemes = lexemes or {}
+ self.grams = grams or {}
+ self.classes = classes or {}
+ # Record possibilities for dependency labels, feature values,
order constraints
+ self.possible = {}
+
+ def __repr__(self):
+ """Print name."""
+ return '<<{}>>'.format(
self.name)
+
+ ### Basic setters. Create entries (dicts) for item. For debugging
purposes, include name
+ ### in entry.
+
+ def add_word(self, word, cls=None):
+ entry = Entry(word, self, cls=cls)
+ if word in self.words:
+ self.words[word].append(entry)
+ else:
+ self.words[word] = [entry]
+ return entry
+
+ def add_lexeme(self, lexeme, cls=None):
+ entry = Entry(lexeme, self, cls=cls)
+ if lexeme in self.lexemes:
+ s = "Lexeme {} already in dictionary"
+ raise(LanguageError(s.format(lexeme)))
+ self.lexemes[lexeme] = entry
+ return entry
+
+ def add_class(self, cls):
+ entry = Entry(cls, self)
+ if cls in self.classes:
+ s = "Class {} already in dictionary"
+ raise(LanguageError(s.format(cls)))
+ self.classes[cls] = entry
+ return entry
+
+ def add_gram(self, gram, feature, count=1):
+ """A gram, for example, 'plural', must have a feature, for example,
+ 'number'."""
+ entry = Entry(gram, self)
+ if gram in self.lexemes:
+ s = "Grammatical morpheme {} already in dictionary"
+ raise(LanguageError(s.format(gram)))
+ self.grams[gram] = entry
+ entry.feature = feature
+ self.grams[gram] = entry
+ self.record_gram(gram, feature, count)
+ return entry
+
+ def record_gram(self, name, feature, count):
+ """Record the gram value and its count under its feature name."""
+ if 'features' not in self.possible:
+ self.possible['features'] = {}
+ if feature not in self.possible['features']:
+ self.possible['features'][feature] = {}
+ self.possible['features'][feature][name] = count
+
+ def get_possible_feat_values(self, feature):
+ """Possible values and associated counts for grammatical
feature."""
+ if 'features' not in self.possible:
+ self.possible['features'] = {}
+ return self.possible['features'].get(feature)
+
+ ### Basic getters.
+
+ def get_words(self, word):
+ """Returns a list of word entries."""
+ return self.words.get(word)
+
+ def get_class(self, cls):
+ """Returns a single class entry."""
+ return self.classes.get(cls)
+
+ def get_gram(self, gram):
+ """Returns a single gram feature value entry."""
+ return self.grams.get(gram)
+
+ def get_lexeme(self, lexeme):
+ """Returns a single lexeme entry."""
+ return self.lexemes.get(lexeme)
+
+ ## Dependencies (word, lexeme, class entries)
+
+ def record_label(self, label):
+ """Record the dependency label in the set of possible labels."""
+ if 'deplabels' not in self.possible:
+ self.possible['deplabels'] = set()
+ self.possible['deplabels'].add(label)
+
+ def get_possible_labels(self):
+ return self.possible.get('deplabels')
+
+ ## Order constraints
+ ## A constraint is a tuple of dependency labels and '^' representing
the head
+
+ def record_order(self, constraint):
+ """Record the constraint tuple in the set of possible constraints
for the language."""
+ if 'order' not in self.possible:
+ self.possible['order'] = set()
+ self.possible['order'].add(constraint)
+
+ def get_possible_orders(self):
+ return self.possible.get('order')
+
+ ## Agreement constraints
+
+ def record_agr(self, constraint):
+ """An agreement constraint is a tuple consisting of
+ dep label, head feature, dependent feature."""
+ if 'agr' not in self.possible:
+ self.possible['agr'] = set()
+ self.possible['agr'].add(constraint)
+
+class LanguageError(Exception):
+ '''Class for errors encountered when attempting to update the
language.'''
+
+ def __init__(self, value):
+ self.value = value
+
+ def __str__(self):
+ return repr(self.value)
+
=======================================
--- /dev/null
+++ /lite.py Mon Feb 10 21:51:55 2014 UTC
@@ -0,0 +1,62 @@
+#!/usr/bin/env python3
+
+# L3Lite. Parsing and translation with dependency grammars.
+#
+########################################################################
+#
+# This file is part of the HLTDI L^3 project
+# for parsing, generation, translation, and computer-assisted
+# human translation.
+#
+# Copyright (C) 2014, HLTDI <
gas...@cs.indiana.edu>
+#
+# This program is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# This program 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. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <
http://www.gnu.org/licenses/>.
+#
+# =========================================================================
+
+# 2014.02.09
+# -- Created
+
+__version__ = 0.1
+
+import l3lite
+
+# Profiling
+#import cProfile
+#import pstats
+
+def language(name, abbrev):
+ return l3lite.Language(name, abbrev)
+
+def eg():
+ e = l3lite.Language('español', 'spa')
+ g = l3lite.Language('guarani', 'grn')
+ mm = e.add_word('mujer', cls='sus_fem')
+ kk = g.add_word('kuña')
+ mm.add_trans('grn', 'kuña')
+ mm.add_trans('grn', 'kuñakarai')
+ e.add_gram('plural', 'número')
+ e.add_gram('singular', 'número')
+ e.add_gram('presente', 'tiempo')
+ e.add_gram('pretérito', 'tiempo')
+ mm.add_depin('sj', {'min': 0, 'max': 1, 'dflt': 0})
+ mm.add_depin('oj', {'min': 0, 'max': 1, 'dflt': 0})
+ mm.add_depout('det', {'min': 0, 'max': 1, 'dflt': 1})
+ mm.set_gram('número', {'singular': 1})
+ mm.add_order(('det', '^'))
+ return e, g
+
+if __name__ == "__main__":
+ print('L^3 Lite, version {}\n'.format(__version__))
+
=======================================
--- /l3xdg/variable.pyx Sun Jun 30 06:36:14 2013 UTC
+++ /dev/null
@@ -1,1572 +0,0 @@
-# Implementation of variables and domain stores, as described in
-#
-# Müller, T. (2001). Constraint propagation in Mozart. PhD Dissertation,
-# Universität des Saarlandes.
-#
-########################################################################
-#
-# This file is part of the HLTDI L^3 project
-# for parsing, generation, and translation within the
-# framework of Extensible Dependency Grammar.
-#
-# Copyright (C) 2010, 2011, 2012, 2013
-# The HLTDI L^3 Team <
gas...@cs.indiana.edu>
-#
-# This program is free software: you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# This program 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. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <
http://www.gnu.org/licenses/>.
-#
-# 2010.07.24 (MG)
-# -- Initially determined variables introduced (subclasses of
-# DeterminedVariable; constants)
-# 2010.08.07 (MG)
-# -- Variables can now be traced.
-# 2010.08.12 (MG)
-# -- determine() can now take an int or set so that it can apply to
-# either an int or set variable
-# 2010.08.15 (MG)
-# -- equals() and cant_equal() permit IVars to be "equal" to SVars
-# 2010.08.16 (MG)
-# -- Added pattern option to equals() predicates for pattern matching
-# with feature values (tuples); used mainly in EqualitySelection
-# 2010.08.17 (MG)
-# -- Moved pattern functions to static methods in Variable:
-# patmatch, patequate
-# 2010.10.24 (MG)
-# -- Pattern methods now use unify_fs (in lex).
-# 2010.10.26 (MG)
-# -- Fixed pattern methods (equate, patequate, cant_equal)
-# so they use unification instead of strict equality
-# 2010.10.31
-# -- determine_min() assigns IVar or SVar its minimum value.
-# 2010.11.12
-# -- strengthen_upper() has test of whether it is compatible with
-# current lower bound.
-# 2010.11.12
-# -- strengthen_upper() has pattern option so it works with
-# unification over agrs
-# 2010.12.12
-# -- pattern option added to SVar.determine(): value is determined at the
unification
-# of the given value and the current upper domain of the variables.
Used in
-# UnionSelection when pattern is True (for GovernmentPrinciple at
least).
-# 2010.12.18
-# -- equate() does not cause determined variable to change its value, e.g.,
-# IVar with value () does not change to value of variable that it
unifies with.
-# 2011.02.23
-# -- Fixed IVar.discard_upper so it discards all values instead of just
first.
-# 2011.02.25
-# -- Some tweaking of feature matching possibilities.
elim_specializations() can
-# be called in some cases. Probably still some outstanding issues.
-# 2011.04.19
-# -- Maximum set cardinality (MAX) increased to 20; should really depend
on the sentence.
-# 2011.04.22
-# -- Variables can be "peripheral": they do not have to be determined for
a DStore
-# to be determined. DStore has a method is_determined that takes this
into account.
-# 2011.04.24
-# -- Peripheral variables are those with a weight below
Variable.weight_thresh. Weights
-# are set when principles are instantiated.
-# 2011.04.25
-# -- DStore.is_determined() checks whether all non-peripheral variables
are determined,
-# (undetermined contains only peripheral variables).
-# 2011.05.15
-# -- cant_equal_value() handles pattern matching (I think).
-# 2011.05.20
-# -- Another fix to cant_equal_value().
-# 2011.05.21
-# -- Fixes related to constraints between cardinality bounds and domain
bounds for set
-# variables (in determined(), strengthen_upper(), strength_lower()).
-# 2011.11.11
-# -- Variable events
-# 2011.12.02
-# -- New low-level variable methods for determining the variables: det().
-# 2011.12.05
-# -- Added variable methods to kill their projectors (in the solver, could
also be the
-# dstore).
-# 2012.09.15
-# -- Changed cant_equal_value (only used for Government Principles) so
that it
-# returns False if the lower bound of the variable is empty.
-# 2012.09.25
-# -- Changed cant_equal and equate to fix lingering bugs in
EqualitySelection with
-# propagators (but not projectors).
-# 2012.09.29
-# -- Changed IVar.equal() so that the variable cannot be changed if the
lower bound
-# of the other variable is empty.
-# 2012.10.15
-# -- Yet another fix to cant_equal() to make EqualitySelection work with
propagators.
-# 2013.04.05
-# -- equate() and cant_equal() take mapped arguments for mappings between
languages
-# so that equality is more sophisticated than just simple equality.
-
-import random
-# For extracting stuff from variable names
-import re
-from .lex import unify_fs, unify_values, unify_fssets, elim_specializations
-
-# Later make these constants depend on the XDG problem.
-MIN = 0
-# Not clear what this maximum number of values should actually be...
-MAX = 200
-ALL = set(range(MAX))
-NONE = set()
-
-class DStore:
- """Domain store holding domains for variables. (Really the domains are
held in
- dicts kept by the variables.)"""
-
- def __init__(self, name='', level=0, problem=None, parent=None):
- """This store is a strengthening of parent store if there is
one."""
- self.problem = problem
- self.parent = parent
- self.children = []
-
self.name = name
- self.level = level
- # Undetermined variables
- self.undetermined = []
-
- def __repr__(self):
- return '<DS {}/{}>'.format(
self.name, self.level)
-
- def is_determined(self):
- """Are all variables in dstore determined that need to be
determined?"""
- for v in self.undetermined:
- if not v.is_peripheral():
- return False
- if self.undetermined:
- print('{} is determined with {} undetermined
variables'.format(self, len(self.undetermined)))
- return True
-
- def get_undet(self):
- return [v for v in self.undetermined if not v.is_peripheral()]
-
- def print_undet(self):
- """Show domains for undetermined variables."""
- undet = self.undetermined
- if undet:
- print(' {} undetermined variables:'.format(self))
- if len(undet) > 25:
- print(' {} variables'.format(len(undet)))
- else:
- for var in undet:
- var.pprint(self, 4)
-
- def clone(self, constraint=None, name='', project=False, verbosity=0):
- """Create a new dstore by applying the basic constraint
- to the bindings in this store."""
- new_store = DStore(name=name or
self.name, level=self.level+1,
- problem=self.problem, parent=self)
- self.children.append(new_store)
- new_store.undetermined = self.undetermined[:]
- if not project:
- constraint.infer(dstore=new_store, verbosity=0, tracevar=[])
- for var in constraint.variables:
- # See if the new variable(?s) is now determined
- var.determined(dstore=new_store, verbosity=0)
- return new_store
-
-DS0 = DStore(name='top')
-
-class Variable:
- """Abstract class for variables."""
-
- # Threshold for "peripheral" variables
- weight_thresh = .5
-
- def __init__(self, name, problem=None, dstores=None, rootDS=None,
- # 2011.04.24
- # Variables with low weights are "peripheral".
- weight=1):
-
self.name = name
- self.problem = problem
- if problem:
- self.problem.add_variable(self)
- self.value = None
- self.max = problem.sentence_length if problem else MAX
- # Normally initialize with a top-level domain store
- self.rootDS = rootDS or DS0
- # Values of this variable in different domain stores
- self.dstores = dstores or {self.rootDS: {}}
- # Add the variable to the list of undetermined variables for
- # the dstore
- self.rootDS.undetermined.append(self)
- self.weight = weight
- # List of propagators that this variable is a parameter for
- self.propagators = []
- # Set of variables that this variable interacts with
- self.variables = set()
-
- ## Four ways a variable may cause a constraint to fail
- def bound_fail(self, dstore=None):
- """Fail if the lower bound is a superset of the upper bound."""
- raise NotImplementedError("{} is an abstract
class".format(self.__class__.__name__))
-
- def card_fail(self, dstore=None):
- """Fail if the lower cardinality bound is greater than the upper
cardinality bound."""
- raise NotImplementedError("{} is an abstract
class".format(self.__class__.__name__))
-
- def upper_bound_card_fail(self, dstore=None):
- """Fail if length of upper bound conflicts with lower cardinality
bound."""
- raise NotImplementedError("{} is an abstract
class".format(self.__class__.__name__))
-
- def lower_bound_card_fail(self, dstore=None):
- """Fail if length of lower bound conflicts with upper cardinality
bound."""
- raise NotImplementedError("{} is an abstract
class".format(self.__class__.__name__))
-
- def fail(self, dstore=None):
- """Fail one or the other way, or, for IVars, if the domain is
empty."""
- raise NotImplementedError("{} is an abstract
class".format(self.__class__.__name__))
-
- def cost(self, dstore=None):
- """Distance from current state to determined state."""
- raise NotImplementedError("{} is an abstract
class".format(self.__class__.__name__))
-
- def equals(self, var, dstore=None, pattern=False):
- """Does this variable have the same value as var in dstore?
- var could be an SVar."""
- raise NotImplementedError("{} is an abstract
class".format(self.__class__.__name__))
-
- def kill_projectors(self, solver=None):
- """Kill all of this variable's projectors."""
- raise NotImplementedError("{} is an abstract
class".format(self.__class__.__name__))
-
- def all_projectors(self):
- """All projectors for this variable."""
- raise NotImplementedError("{} is an abstract
class".format(self.__class__.__name__))
-
- def get_name(self):
- '''Function used in sorting lists of variables.'''
- return
self.name
-
- def all_equal(self, variables, dstore=None, pattern=False):
- """Do all of these variables have the same value as this in
dstore?"""
- return all([self.equals(var, dstore=dstore, pattern=pattern) for
var in variables])
-
- def is_peripheral(self):
- """Is this variable non-essential in solutions?"""
- return self.weight < self.weight_thresh
-
- def get_dstore(self, dstore):
- """Returns the dictionary of value and domain(s) for dstore."""
- dstore = dstore or self.rootDS
- return self.dstores.get(dstore, {})
-
- def add_dstore(self, dstore):
- """Adds a domain store to the dstores dict."""
- self.dstores[dstore] = {}
-
- def get(self, dstore, feature, default=None):
- """Returns a value for feature associated with dstore, recursively
- checking dstore's parent is nothing is found."""
- dstore_dict = self.dstores.get(dstore, {})
- x = dstore_dict.get(feature, None)
- if x != None:
- return x
- parent = dstore.parent
- if parent:
- return self.get(parent, feature, default=default)
- return default
-
- def set(self, dstore, feature, value):
- """Sets feature to be value in dstore, creating a dict for dstore
if one doesn't exist."""
- dstore = dstore or self.rootDS
- dsdict = self.dstores.get(dstore, None)
- if dsdict == None:
- dsdict = {'value': None}
- self.dstores[dstore] = dsdict
- dsdict[feature] = value
-
- def get_value(self, dstore=None):
- """Return the value of the variable in dstore."""
- dstore = dstore or self.rootDS
- return self.get(dstore, 'value', None)
-
- def set_value(self, value, dstore=None):
- """Sets the value of the variable in dstore."""
- self.set(dstore, 'value', value)
-
- def is_determined(self, dstore=None):
- """Is the variable already determined?"""
- return self.get_value(dstore=dstore) is not None
-
- def init_values(self, dstore=None):
- '''Reinitialize the values and bounds on it.'''
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def incr_rights(self, index):
- """Increment count of projector right-hand sides."""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def get_undecided(self, dstore=None):
- """Returns values that may or may not be in the variable."""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def determined(self, dstore=None, verbosity=0, constraint=None):
- '''If the variable is determined and doesn't have a value, assign
the value.'''
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def det(self, dstore=None, verbosity=0, constraint=None):
- '''Like determined but does not check for failure.'''
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def clash(self, dstore=None):
- '''Is there a clash, given the bounds on the variable's value?'''
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def determine(self, value, dstore=None, constraint=None):
- '''Sets the value of the variable to value.'''
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def determine_min(self, dstore=None, constraint=None):
- '''Sets the value of the variable to its minimum value.'''
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def equate(self, var, mapped=None, pattern=False, dstore=None,
constraint=None, reduce=False):
- '''Sets the value of the variable to value.'''
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def get_lower(self, dstore=None):
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def get_upper(self, dstore=None):
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def get_lower_card(self, dstore=None):
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def get_upper_card(self, dstore=None):
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def get_undecided(self, dstore=None):
- """Returns the set of values that may or may not be in the
variable."""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def strengthen_upper(self, upper2, dstore=None, pattern=False,
constraint=None,
- reduce=False):
- """Strengthens the upper bound by intersecting it with upper2."""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def discard_upper(self, value, dstore=None, constraint=None):
- """Discard set or element from upper bound."""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def strengthen_lower(self, lower2, dstore=None, constraint=None):
- """Strengthens the lower bound by unioning it with lower2."""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def strengthen_lower_card(self, lower2, dstore=None, constraint=None):
- """Raises the lower bound on the cardinality of the set."""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def strengthen_upper_card(self, upper2, dstore=None, constraint=None):
- """Lowers the upper bound on the cardinality of the set."""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def is_true(self, dstore=None):
- """Is the variable not empty or not 0?"""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
- def is_false(self, dstore=None):
- """Is the variable empty or 0?"""
- raise NotImplementedError("%s is an abstract class" %
self.__class__.__name__)
-
-# def combine_projectors(self):
-# """Combine right-hand sides of projector(s) to yield complex
projector."""
-# pass
-
- @staticmethod
- def get_princ(var):
- """Returns the principle abbreviation portion from a variable
name."""
- m = re.search("\|(.*?):",
var.name)
- if m:
- return m.groups()[0]
-
- @staticmethod
- def string_values(value):
- return '{}'.format(value.__repr__() if value != None else '')
-
- @staticmethod
- def string_range(lower, upper):
- s = '{'
- for i,v in enumerate(upper):
- if i != 0:
- s += ','
- if v not in lower:
- s += '({})'.format(v)
- else:
- s += '{}'.format(v)
- return s + '}'
-
- # Later put in a separate Pattern class
- @staticmethod
- def patmatch(p1, p2):
- """Do the two patterns (tuples) match?"""
- if not p1 or not p2:
- # Empty tuple matches anything
- return True
- else:
- return unify_fs(p1, p2)
-
- @staticmethod
- def patequate(pset1, pset2, reduce=False):
- """Constrain pattern set1 to be equal to pattern set2."""
- if pset2 == set() or () in pset2:
- # Since () and set() match anything in pset1, we can't
constrain it
- # further.
- return pset1
- else:
- return unify_fssets(pset1, pset2, elim_specs=reduce)
-
-class IVar(Variable):
- """Finite integer variable."""
-
- def __init__(self, name='', init_domain=None, problem=None,
- dstores=None, rootDS=None,
- weight=1):
- Variable.__init__(self, name, problem=problem,
- dstores=dstores, rootDS=rootDS,
- weight=weight)
- self.init_domain = init_domain or ALL.copy()
- if any([isinstance(x, tuple) for x in self.init_domain]) and \
- any([isinstance(x, int) for x in self.init_domain]):
- print('Warning: mixed domain {}: {}'.format(self,
self.init_domain))
- # Use default value when value of variable is irrelevant
- self.default_value = min(self.init_domain)
- self.init_values(dstore=self.rootDS)
- self.event = None
- self.projectors = []
- self.rights = 0
- # Compound projectors
- self.comp_proj = None
-
- def __repr__(self):
- dom = self.get_domain()
-# return '#{0}:{1}'.format(
self.name, Variable.string_values(dom))
- return '#{}'.format(
self.name)
-
- def all_projectors(self):
- """All projectors for this variable."""
- return self.projectors
-
- def cost(self, dstore=None):
- """Cost is one less than length of domain."""
- return len(self.get_domain(dstore=dstore)) - 1
-
- def incr_rights(self, index):
- self.rights += 1
-
- def kill_projectors(self, solver=None):
- """Kill all of this variable's projectors."""
- if solver:
- solver.newly_determined.add(self)
-# for p in self.projectors:
-# solver.dying_projectors.add(p)
-
-# def combine_projectors(self):
-# """Combine right-hand sides of projector(s) to yield complex
projector."""
-# proj = CompIntProj(self, [proj.right for proj in self.projectors],
-# recursive=any([proj.recursive for proj in
self.projectors]))
-# self.comp_proj = proj
-
- def set_event(self, event, card=0, end=0):
- self.event = event
-
- def get_event(self, card=0, end=0):
- return self.event
-
- def bound_fail(self, dstore=None):
- """IVars don't have bounds, so can never fail this way."""
- return False
-
- def card_fail(self, dstore=None):
- """IVars don't have cardinality, so can never fail this way."""
- return False
-
- def upper_bound_card_fail(self, dstore=None):
- """IVars don't have cardinality bounds."""
- return False
-
- def lower_bound_card_fail(self, dstore=None):
- """IVars don't have cardinality bounds."""
- return False
-
- def fail(self, dstore=None):
- """IVars fail if their domain is empty."""
- return not self.get_domain(dstore=dstore)
-
- def pprint(self, dstore=None, spaces=0, end='\n'):
- string = '{0}#{1}:{2}'.format(spaces*' ',
-
self.name,
- self.get_value(dstore=dstore) if
self.is_determined(dstore=dstore) \
- else
Variable.string_values(self.get_domain(dstore=dstore)))
- print(string)
- #, end=end)
-
- def get_domain(self, dstore=None):
- dstore = dstore or self.rootDS
- return self.get(dstore, 'dom', set())
-
- def get_undecided(self, dstore=None):
- """Same as the domain for IVars."""
- return self.get_domain(dstore=dstore)
-
- def set_domain(self, domain, dstore=None):
- self.set(dstore, 'dom', domain)
-
- def init_values(self, dstore=None):
- # Start over with domain as value of set
- self.set_domain(self.init_domain, dstore=dstore)
- self.set_value(None, dstore=dstore)
-
- def det(self, check=False, dstore=None, verbosity=0):
- '''Attempt to determine variable.'''
- if verbosity > 1:
- print('Attempting to determine {} for dstore {}'.format(self,
dstore))
- print(' domain {}'.format(self.get_domain(dstore=dstore)))
- if not check or len(self.get_domain(dstore=dstore)) == 1:
- val = list(self.get_domain(dstore=dstore))[0]
- self.set_value(val, dstore=dstore)
- if dstore and self in dstore.undetermined:
- dstore.undetermined.remove(self)
-# if verbosity > 1:
-# print('Determining {} at {}'.format(self, value))
- return True
- return False
-
- def determined(self, dstore=None, verbosity=0, constraint=None):
- val = self.get_value(dstore=dstore)
- if val != None:
- return val
- if len(self.get_domain(dstore=dstore)) == 1:
- val = list(self.get_domain(dstore=dstore))[0]
- self.set_value(val, dstore=dstore)
- if dstore and self in dstore.undetermined:
- dstore.undetermined.remove(self)
- if verbosity > 1:
- print(' {} is determined at {}'.format(self, val))
- return val
- return False
-
- def clash(self, dstore=None):
- return len(self.get_domain(dstore=dstore)) == 0
-
- ## Methods that can change the variable's domain
-
- def determine(self, value, dstore=None, constraint=None):
- """Determine variable at value, returning True if it changes
- in the process."""
- val = self.get_value(dstore=dstore)
- if val != None:
- # Variable is already determined
- return False
- if constraint:
- print(' {} determining {} as {}'.format(constraint, self,
value))
- orig_domain = self.get_domain(dstore=dstore)
- self.set_domain({value}, dstore=dstore)
- self.set_value(value, dstore=dstore)
- if dstore and self in dstore.undetermined:
- dstore.undetermined.remove(self)
- if orig_domain != self.get_domain(dstore=dstore):
- return True
- return False
-
-# def determine_dflt(self, dstore=None, constraint=None):
-# value = self.default_value # min(self.get_domain(dstore=dstore))
-# return self.determine(value, dstore=dstore, constraint=constraint)
-
- def equals(self, var, dstore=None, pattern=False):
- """Does this variable have the same value as var in dstore?
- var could be an SVar.
- If pattern is True, use 'pattern matching' criteria.
- """
- value = self.get_value(dstore=dstore)
- if value != None:
- var_val = var.get_value(dstore=dstore)
- if var_val == None:
- return False
- if isinstance(var, SVar):
- if var.get_lower_card(dstore=dstore) > 1:
- return False
- # Use single value in SVar to compare to self
- var_val = list(var_val)[0] if var_val else ()
- if pattern:
- return Variable.patmatch(value, var_val)
- if value == var_val:
- return True
- return False
-
- def cant_equal_value(self, value, dstore=None, pattern=False):
- """Is it impossible for variable to have value?
- Pattern matching may be wrong!"""
- domain = self.get_domain(dstore=dstore)
- if not isinstance(value, set):
- value = {value}
- if pattern and (not domain or unify_fssets(value, domain)):
-# if pattern and (not domain or () in domain):
- return False
- if not domain & value:
- return True
- return False
-
- def cant_equal(self, var, dstore=None, mapped=None, pattern=False):
- """Is it impossible for self and var to be equal within dstore?"""
-# print('Can', self, 'equal', var, '?')
-# print(' Mapped', mapped)
- domain = self.get_domain(dstore=dstore)
-
- if isinstance(var, SVar):
-# print(' domain', domain, 'upper',
var.get_upper(dstore=dstore))
-# print(' intersection', domain & var.get_upper(dstore=dstore))
- lcard = var.get_lower_card(dstore=dstore)
- # var must be length 1 or 0
- if lcard > 1:
- return True
- # but if it can be 0, then we don't know anything, so return
False
- elif lcard == 0:
- return False
- # there must be unifying elements in self's domain and
- # var's upper bound if either is not empty
- var_upper = var.get_upper(dstore=dstore)
- if mapped:
- var_upper = mapped
- if pattern:
- if not var.get_lower(dstore=dstore) \
- and var_upper \
- and () not in var_upper \
- and not unify_fssets(var_upper, domain):
- return True
- elif not var_upper:
- # If var is empty, equality is meaningless
- return False
- elif not domain or not var_upper:
-# print(' not domain or not upper')
- return True
- elif not (domain & var_upper):
-# print(' empty intersection')
- return True
- else:
- var_domain = var.get_domain(dstore=dstore)
- if mapped:
- var_upper = mapped
- if pattern and not domain or not var_domain:
- return False
- # Domains must share something
- elif not unify_fssets(var_domain, domain):
- return True
-
- return False
-
- def equate(self, var, mapped=None, pattern=False, dstore=None,
constraint=None, reduce=False):
- """Attempt to equate self with var."""
- sv = isinstance(var, SVar)
- if sv:
- values = var.get_upper(dstore=dstore)
- else:
- values = var.get_domain(dstore=dstore)
- if mapped:
- values = mapped
- if pattern:
- domain = self.get_domain(dstore=dstore)
- new_domain = Variable.patequate(domain, values)
- if len(new_domain) < len(domain):
- if isinstance(self, Determined):
- # Don't change the value of an IVar that's determined
as long as
- # it matches the given value
- return True
- if constraint:
- string = ' {} equating {} with {}; domain1 {},
domain2 {} new domain {}'
- print(string.format(constraint, self, var, domain,
values, new_domain))
- self.set_domain(new_domain, dstore=dstore)
- # This may determine self
- self.determined(dstore=dstore, verbosity=(1 if constraint
else 0), constraint=constraint)
- return True
- elif not values:
- # If the set of values for the other variable is empty, we
can't change this variable.
- return False
- elif sv and not var.get_lower(dstore=dstore):
- # Added 2012.09.29
- # If the seq variable can be empty, then we can't constrain
self yet
- return False
- else:
- return self.strengthen(values, dstore=dstore,
constraint=constraint)
-
- def strengthen(self, values, dstore=None, constraint=None, det=False):
- """Strengthens the domain by intersecting it with values."""
- if not isinstance(values, set):
- values = {values}
- dom = self.get_domain(dstore=dstore)
- if not dom.issubset(values):
- if constraint:
- string = ' {} strengthening {}, domain {} intersected
with {}'
- print(string.format(constraint, self,
self.get_domain(dstore=dstore), values))
- new_domain = dom & values
- self.set_domain(new_domain, dstore=dstore)
- if det and len(new_domain) == 1:
-# print('Determining', self)
- value = list(new_domain)[0]
- self.set_value(value, dstore=dstore)
- if dstore and self in dstore.undetermined:
- dstore.undetermined.remove(self)
- return True
- return False
-
- def discard_value(self, value, dstore=None, constraint=None):
- dom = self.get_domain(dstore=dstore)
- if value in dom:
- if constraint:
- print(' {} discarding {} from {}'.format(constraint,
value, dom))
- self.set(dstore, 'dom', dom - {value})
- return True
- return False
-
- def is_true(self, dstore=None):
- """Is the variable not 0?"""
- return 0 not in self.get_domain(dstore=dstore)
-
- def is_false(self, dstore=None):
- """Is the variable empty or 0?"""
- return self.get_value(dstore=dstore) is 0 or
self.get_domain(dstore=dstore) == {0}
-
- ### SVar methods which need to make sense for IVars when they appear
in selection
- ### constraints
-
- def get_lower(self, dstore=None):
- if self.is_determined(dstore=dstore):
- return self.get_domain(dstore=dstore)
- return set()
-
- def get_upper(self, dstore=None):
- return self.get_domain(dstore=dstore)
-
- def get_lower_card(self, dstore=None):
- return 1
-
- def get_upper_card(self, dstore=None):
- return 1
-
- def get_undecided(self, dstore=None):
- """Returns the set of values that may or may not be in the
variable."""
- return self.get_domain(dstore=dstore)
-
- def strengthen_upper(self, upper2, dstore=None, pattern=False,
constraint=None,
- reduce=False):
- """Strengthens the upper bound by intersecting it with upper2."""
- return self.strengthen(upper2, dstore=dstore,
constraint=constraint)
-
- def discard_upper(self, value, dstore=None, constraint=None):
- """Discard set or element from upper bound."""
-# value = list(value)[0] if isinstance(value, set) else value
-# return self.discard_value(value, dstore=dstore,
constraint=constraint)
- value = value if isinstance(value, set) else {value}
- dom = self.get_domain(dstore=dstore)
- if value & dom:
- new_dom = dom - value
- # If value and upper overlap
- if constraint:
- print(' {} discarding {} from {}'.format(constraint,
value, self))
- self.set(dstore, 'dom', new_dom)
- return True
- return False
-
- def strengthen_lower(self, lower2, dstore=None, constraint=None):
- """Strengthens the lower bound by unioning it with lower2."""
- return False
-
- def strengthen_lower_card(self, lower2, dstore=None, constraint=None):
- """Raises the lower bound on the cardinality of the set."""
- return False
-
- def strengthen_upper_card(self, upper2, dstore=None, constraint=None):
- """Lowers the upper bound on the cardinality of the set."""
- return False
-
-class SVar(Variable):
- """Set variable with a lower bound (the current value of the set) and
an upper bound
- on its elements and lower and upper bounds on its cardinality."""
-
- def __init__(self, name='',
- lower_domain=None, upper_domain=None,
- lower_card=0, upper_card=MAX,
- soft_lower_card=None, soft_upper_card=None,
- problem=None, dstores=None, rootDS=None,
- weight=1):
- Variable.__init__(self, name, problem=problem,
- dstores=dstores, rootDS=rootDS,
- weight=weight)
- self.max_set = problem.max_set if problem else ALL
- if lower_domain != None:
- self.lower_domain = lower_domain
- else:
- self.lower_domain = set()
- if upper_domain != None:
- self.upper_domain = upper_domain
- else:
- self.upper_domain = ALL.copy()
- self.init_lower_card = max(lower_card, len(self.lower_domain))
- self.init_upper_card = min(upper_card, len(self.upper_domain))
- self.soft_lower_card = soft_lower_card
- self.soft_upper_card = soft_upper_card
- self.init_values(dstore=self.rootDS)
- self.events = [None, None, None, None]
- self.projectors = [[], [], [], []]
- self.rights = [0, 0, 0, 0]
- # Compound projectrs
- self.comp_proj = [None] * 4
-
- def __repr__(self):
- return '${}'.format(
self.name)
-
- ## Initializing bounds
-
- def init_values(self, dstore=None):
- self.set_lower(self.lower_domain, dstore=dstore)
- self.set_upper(self.upper_domain, dstore=dstore)
- self.set_lower_card(self.init_lower_card, dstore=dstore)
- self.set_upper_card(self.init_upper_card, dstore=dstore)
- self.set_value(None, dstore=dstore)
-
- def set_lower(self, lower, dstore=None):
- self.set(dstore, 'lower', lower)
-
- def set_upper(self, upper, dstore=None):
- self.set(dstore, 'upper', upper)
-
- def set_lower_card(self, lower_card, dstore=None):
- self.set(dstore, 'lower_card', lower_card)
-
- def set_upper_card(self, upper_card, dstore=None):
- self.set(dstore, 'upper_card', upper_card)
-
- # Soft cardinality bounds
-
- def get_soft_card(self, upper=False):
- if upper:
- return self.get_soft_upper_card()
- else:
- return self.get_soft_lower_card()
-
- def get_soft_lower_card(self):
- return self.soft_lower_card
-
- def get_soft_upper_card(self):
- return self.soft_upper_card
-
- def all_projectors(self):
- """All projectors for this variable."""
- return self.projectors[0] + self.projectors[1] +
self.projectors[2] + self.projectors[3]
-
- def incr_rights(self, index):
- self.rights[index] += 1
-
- def cost(self, dstore=None):
- """Cost is difference between upper and lower bounds.
- (Could also be difference between upper and lower cardinality
bounds.)
- """
- return len(self.get_upper(dstore=dstore)) -
len(self.get_lower(dstore=dstore))
-
- def kill_projectors(self, solver=None):
- """Kill all of this variable's projectors."""
- if solver:
- solver.newly_determined.add(self)
-# for pp in self.projectors:
-# solver.dying_projectors.update(pp)
-
-## if solver:
-## for projs in self.projectors:
-## for p in projs:
-## if p.recursive:
-## solver.recursive_projectors.add(p)
-## else:
-## solver.dead_projectors.add(p)
-#extend([p for p in projs if not p.recursive])
-
- ## Events
- ## self.events: [bottom_bound, top_bound, bottom_card, top_card]
-
- def set_event(self, event, card=0, end=0):
- self.events[card * 2 + end] = event
-
- def get_event(self, card=0, end=0):
- return self.events[card * 2 + end]
-
- ## Three ways a variable may cause a constraint to fail
- def bound_fail(self, dstore=None):
- """Fail if the lower bound includes any elements not in the upper
bound."""
- return self.get_lower(dstore=dstore) -
self.get_upper(dstore=dstore)
-
- def card_fail(self, dstore=None):
- """Fail if the lower cardinality bound is greater than the upper
cardinality bound."""
- return self.get_lower_card(dstore=dstore) >
self.get_upper_card(dstore=dstore)
-
- def upper_bound_card_fail(self, dstore=None):
- """Fail if the length of upper bound < lower card."""
- return len(self.get_upper(dstore=dstore)) <
self.get_lower_card(dstore=dstore)
-
- def lower_bound_card_fail(self, dstore=None):
- """Fail if length of lower bound > upper card."""
- return len(self.get_lower(dstore=dstore)) >
self.get_upper_card(dstore=dstore)
-
- def fail(self, dstore=None):
- """Fail in one of three ways."""
- return self.bound_fail(dstore=dstore) or
self.card_fail(dstore=dstore)
-# or self.bound_card_fail(dstore=dstore)
-
- def pprint(self, dstore=None, spaces=0, end='\n'):
- string = '{0}${1}:{2}|{3},{4}|'.format(spaces*' ',
-
self.name,
-
Variable.string_range(self.get_lower(dstore=dstore),
-
self.get_upper(dstore=dstore)),
-
self.get_lower_card(dstore=dstore),
-
self.get_upper_card(dstore=dstore))
- print(string)
- #, end=end)
-
- @staticmethod
- def fromIVar(ivar):
- iv_det = ivar.determined(dstore=ivar.rootDS)
- if iv_det is not False:
- val = {ivar.get_value(dstore=ivar.rootDS)}
- lower = val
- upper = val
- else:
- lower = set()
- upper = ivar.init_domain
-
- svar = SVar(name='=' +
ivar.name, lower_domain=lower,
upper_domain=upper,
- lower_card=1, upper_card=1, problem=ivar.problem,
- rootDS=ivar.rootDS)
-
- if iv_det is not False:
- # ivar is determined, so svar must be too
- svar.determine(upper, dstore=ivar.rootDS)
-
- return svar
-
- def equals(self, var, dstore=None, pattern=False):
- """Does this variable have the same value as var in dstore?
- var could be an IVar."""
- value = self.get_value(dstore=dstore)
- var_val = var.get_value(dstore=dstore)
- is_ivar = isinstance(var, IVar)
- if value != None and var_val != None:
- if pattern:
- if len(value) > 1:
- # Pattern matching only works for single tuples
- return False
- else:
- value = () if not value else list(value)[0]
- if not is_ivar:
- var_val = () if not var_val else list(var_val)[0]
- return Variable.patmatch(value, var_val)
- elif is_ivar:
- var_val = {var_val} if var_val else set()
- if value == var_val:
- return True
- return False
-
- def cant_equal_value(self, value, dstore=None, pattern=False):
- """Is it impossible for variable to have value?
- Only used in SimpleEqualitySelection which is only used in the
- two Government principles.
- Pattern matching may be wrong!!!"""
- if not isinstance(value, set):
- value = {value}
- upper = self.get_upper(dstore=dstore)
- lower = self.get_lower(dstore=dstore)
- # If it's possible that the variable is empty, it can equal
anything
- # (by definition??).
- if not lower:
- return False
- if pattern and unify_fssets(value, upper):
- return False
- if upper and not value & upper:
- return True
- return False
-
- def cant_equal(self, var, dstore=None, mapped=None, pattern=False):
- """Is it impossible for self and var to be equal within dstore?"""
- print('Can {} equal {}?'.format(self, var))
- print(' mapped {}'.format(mapped))
- upper = self.get_upper(dstore=dstore)
- if isinstance(var, IVar):
***The diff for this file has been truncated for email.***
=======================================
--- /l3xdg/variable.so Thu Aug 29 17:00:30 2013 UTC
+++ /dev/null
File is too large to display a diff.
=======================================
--- /l3xdg/dimension.py Wed Feb 5 00:32:05 2014 UTC
+++ /l3xdg/dimension.py Mon Feb 10 21:51:55 2014 UTC
@@ -1285,15 +1285,15 @@
# [(node_index, value), ...]
if pre_agr:
for pre_index, pre_value in pre_agr:
-# pre_index, pre_value = pre_agr
if pre_index == node_index:
agrvars[feat] =
DetIVar('{}{}{}'.format(self.var_pre, node_index, feat), pre_value)
-# agrvalues[feat] = {pre_value}
entry_agrs = [self._get_agrs(node, index, feat) for index
in range(len(node.entries))]
entry_agrs = set(itertools.chain(*entry_agrs))
+ # Somehow rank the possible agreement feature values
agr_vals = [entry.get_dimattrib(abbrev, 'agrs').get(feat,
DFLT_FV_SET) for entry in node.entries]
# print('Node {}, feat {}, agr_vals {}'.format(node, feat,
agr_vals))
- agr_vals = set().union(*agr_vals)
+ agr_vals = list(itertools.chain.from_iterable(agr_vals))
+# set().union(*agr_vals)
# All possible values
agrvalues[feat] = agr_vals
if entry_agrs and feat not in agrvars:
=======================================
--- /l3xdg/languages/gn/FST/n.fst Sat Dec 7 02:32:54 2013 UTC
+++ /l3xdg/languages/gn/FST/n.fst Mon Feb 10 21:51:55 2014 UTC
@@ -1,6 +1,6 @@
-features={'pl': [True, False], 'poses': ['int', 'ext'], 'adj': [True,
False], 'fut': [True, False], 'grd':
['compsup', 'compinf', 'supis', 'sup', 'ultsup', 'supsup'], 'concom':
[True, False], 'dim': [True, False], 'conjet': [True, False], 'restr':
[True, False], 'pas': [True, False], 'afir': [True, False], 'pos':
['n'], 'narver': [True, False], 'neg': [True, False], 'caso':
['icha', 'gua', 're', 'rendape', 'ypype', 've', 'pype', 'rã', 'vo', 'ichagua', 'pe', 'ndi', 'gui', 'ari'], 'inter':
[True, False]}
+features={'grd':
['sup', 'supis', 'ultsup', 'supsup', 'compinf', 'compsup'], 'narver':
[True, False], 'conjet': [True, False], 'restr': [True, False], 'caso':
['vo', 'ndi', 'icha', 'rã', 'rendape', 'pe', 'ichagua', 're', 'gui', 'gua', 'pype', 'ypype', 've', 'ari'], 'neg':
[True, False], 'afir': [True, False], 'concom': [True, False], 'dim':
[True, False], 'fut': [True, False], 'pas': [True, False], 'pos':
['n'], 'adj': [True, False], 'poses': ['int', 'ext'], 'pl': [True,
False], 'inter': [True, False]}
defaultFS=[-adj,-afir,caso=None,-concom,-conjet,-dim,-fut,grd=None,-inter,-narver,-neg,-pas,-pl,-restr]
-{'@n':
frozenset({'ỹ', 'Ỹ', 'ñ', 'õ', 'ũ', 'Ũ', '<ñ', 'm', 'n', 'ã', 'Mb', 'nt', 'Ñ', 'Õ', 'nd', 'ng', 'M', 'N', 'Ã', 'Nt', 'ẽ', 'Ẽ', 'ĩ', 'Ĩ', 'Ng', 'Nd', 'ĝ', 'Ĝ', 'mb'}), '@V':
frozenset({'É', 'ú', 'ý', 'ó', 'é', 'Á', 'Ú', 'í', 'á', 'Í', 'Ó', 'Ý'}), '@i':
frozenset({'i', 'ĩ', 'í'}), '@N':
frozenset({'ỹ', 'ũ', 'ẽ', 'Ẽ', 'Ũ', 'Õ', 'õ', 'ĩ', 'Ĩ', 'Ỹ', 'ã', 'Ã'}), '@M':
frozenset({'ỹ', 'ũ', 'M', 'ẽ', 'Ẽ', 'Ũ', 'ñ', 'Õ', 'N', 'õ', 'Ñ', 'ĩ', 'Ĩ', '<ñ', 'm', 'n', 'Ỹ', 'ĝ', 'ã', 'Ã', 'Ĝ'}), '.':
frozenset({'y', 'ỹ', 'ú', 'ý', 'J', 'Ỹ', 'ñ', 'p', 'ó', 'r', 'õ', 't', 'v', 'é', 'h', 'k', 'j', 'í', 'l', 'o', 'n', 'á', 'Nd', 'ã', 'ch', 'e', 'g', 'Mb', 'nt', 'X', 'Ú', 'Ý', '^', 'Ñ', 'P', 'Ó', 'R', 'U', 'T', 'V', 'nd', '<j', 'K', 'ng', 'Í', 'L', 'O', 'N', 'A', 'M', 'i', 'B', 'E', 's', 'G', 'Nt', 'Y', 'H', 'ẽ', 'Ẽ', 'u', 'Õ', 'ĩ', 'Á', 'Ng', '!', 'Ũ', '<h', 'Ã', "'", 'ũ', 'Ch', 'ĝ', 'Ĝ', 'Ĩ', 'Rr', 'rr', '<ñ', 'É', 'm', 'I', 'a', 'S', 'mb'}), '@v':
frozenset({'y', 'ỹ', 'ú', 'ý', 'Ỹ', 'Õ', 'ó', 'õ', 'é', 'a', 'í', 'o', 'á', 'ã', 'e', 'Y', 'É', 'Ú', 'Ý', 'Ó', 'U', 'I', 'Í', 'O', 'A', 'i', 'E', 'ẽ', 'Ẽ', 'u', 'ĩ', 'Á', 'Ũ', 'Ã', 'ũ', 'Ĩ'}), '@W':
frozenset({'y', 'ỹ', 'ú', 'ý', 'Ỹ', 'Õ', 'ó', 'õ', 'é', 'a', 'í', 'o', 'á', 'ã', 'e', 'Y', 'É', 'Ú', 'Ý', 'Ó', 'U', 'I', 'Í', 'O', 'A', 'i', 'E', 'ẽ', 'Ẽ', 'u', 'ĩ', 'Á', 'Ũ', 'Ã', 'ũ', 'Ĩ'}), '@u':
frozenset({'ú', 'Á', 'U', 'A', 'u', 'Ũ', 'ũ', 'á', 'Ú', 'a', 'ã', 'Ã'}), '@c':
frozenset({'J', 'ñ', 'p', 's', 'r', 't', 'v', 'h', 'k', 'j', 'm', 'l', 'n', 'ch', 'g', 'Mb', 'nt', 'X', '^', 'Ñ', 'P', 'S', 'R', 'T', 'V', 'nd', '<j', 'K', 'ng', 'M', 'L', 'N', 'B', '<h', 'G', 'Nt', 'H', 'Nd', 'Ng', '!', "'", 'Ch', 'ĝ', 'Ĝ', 'Rr', 'rr', '<ñ', 'I', 'mb'}), '@o':
frozenset({'y', 'ĩ', 'ý', 'O', 'ỹ', 'Ỹ', 'Õ', 'ó', 'õ', 'Y', 'i', 'Ĩ', 'í', 'o', 'Í', 'I', 'Ó', 'Ý'})}
+{'@v':
frozenset({'u', 'õ', 'ó', 'ý', 'y', 'Ỹ', 'ú', 'e', 'a', 'ã', 'í', 'o', 'ũ', 'Ũ', 'U', 'Ó', 'Ý', 'é', 'Y', 'Ú', 'E', 'A', 'Ã', 'Ẽ', 'Í', 'Á', 'O', 'I', 'Õ', 'ẽ', 'ỹ', 'ĩ', 'Ĩ', 'É', 'i', 'á'}), '@W':
frozenset({'u', 'õ', 'ó', 'ý', 'y', 'Ỹ', 'ú', 'e', 'a', 'ã', 'í', 'o', 'ũ', 'Ũ', 'U', 'Ó', 'Ý', 'é', 'Y', 'Ú', 'E', 'A', 'Ã', 'Ẽ', 'Í', 'Á', 'O', 'I', 'Õ', 'ẽ', 'ỹ', 'ĩ', 'Ĩ', 'É', 'i', 'á'}), '@u':
frozenset({'u', 'U', 'Ú', 'ú', 'á', 'ã', 'Á', 'a', 'A', 'ũ', 'Ũ', 'Ã'}), '@M':
frozenset({'õ', 'Õ', 'Ñ', 'M', 'ñ', 'Ã', 'ẽ', 'ĩ', 'ỹ', 'Ỹ', 'Ũ', 'ĝ', '<ñ', 'ã', 'Ẽ', 'm', 'N', 'n', 'ũ', 'Ĩ', 'Ĝ'}), '@c':
frozenset({'t', 'Rr', 'v', 'ñ', 'p', 's', 'r', '<j', '<h', 'g', '<ñ', 'ch', 'm', 'l', 'n', 'h', 'k', 'j', 'T', 'V', 'Mb', 'P', 'S', 'R', 'nd', 'ng', 'X', 'G', 'B', 'nt', 'L', 'N', 'I', 'H', 'K', 'J', 'Ng', 'Nd', 'Ch', 'M', "'", '!', 'Nt', 'Ñ', 'rr', 'ĝ', 'Ĝ', 'mb', '^'}), '@N':
frozenset({'õ', 'Õ', 'Ã', 'ẽ', 'ĩ', 'ỹ', 'Ỹ', 'Ũ', 'ã', 'Ẽ', 'ũ', 'Ĩ'}), '@n':
frozenset({'õ', 'ñ', 'ỹ', 'Ỹ', '<ñ', 'ã', 'm', 'n', 'ũ', 'Ũ', 'Õ', 'Mb', 'nd', 'ng', 'Nd', 'Ã', 'nt', 'N', 'ẽ', 'Ẽ', 'Ng', 'M', 'Nt', 'Ñ', 'ĩ', 'Ĩ', 'ĝ', 'Ĝ', 'mb'}), '@o':
frozenset({'õ', 'Õ', 'Y', 'Ó', 'ó', 'ý', 'ĩ', 'I', 'y', 'Ỹ', 'Ĩ', 'Í', 'ỹ', 'í', 'o', 'i', 'O', 'Ý'}), '.':
frozenset({'u', 'õ', 'Rr', 'v', 'ñ', 'p', 'ó', 'r', 'ý', '<h', 'y', 'Ỹ', 'ú', 'e', 'm', 'g', '<ñ', 'a', 'ã', 'ch', 'í', 'l', 'o', 'n', 'ũ', 'h', 'k', 'j', 'U', '^', 'V', 'Mb', 's', 'Ó', 'R', 'nd', 'é', 'ng', 'Y', 'X', 'Ú', 'E', '<j', 'G', 'A', 'Ã', 'B', 'nt', 'Á', 'O', 'N', 'I', 'H', 'K', 'J', 'Õ', 'Ng', 'Ũ', 'T', 'ẽ', 'ỹ', 'Ch', 't', 'Í', "'", '!', 'Nd', 'L', 'Nt', 'Ñ', 'ĩ', 'Ĩ', 'P', 'rr', 'M', 'S', 'ĝ', 'É', 'i', 'Ý', 'mb', 'Ĝ', 'á', 'Ẽ'}), '@V':
frozenset({'Ó', 'ó', 'ý', 'É', 'ú', 'Í', 'á', 'í', 'Á', 'Ú', 'é', 'Ý'}), '@i':
frozenset({'í', 'ĩ', 'i'})}
->0
37->
42->
@@ -58,19705 +58,19700 @@
1369->
1656->
2019->
-3216->
-3752->
-6900->
-6909->
-6916->
-6921->
-6922->
-6926->
-6937->
-6946->
-6951->
-6952->
-6970->
-6986->
-7022->
-7036->
-7041->
-7060->
-7065->
-7080->
-7147->
-7155->
-7256->
-7324->
-7329->
-7335->
-7363->
-7398->
-7403->
-7404->
-7408->
-7412->
-7430->
-7442->
-7465->
-7521->
-7530->
-7546->
-7570->
-7587->
-7619->
-7634->
-7743->
-7824->
-7829->
-7835->
-7863->
-7898->
-7903->
-7904->
-7908->
-7912->
-7930->
-7942->
-7965->
-8474->
-8479->
-8518->
-8523->
-8524->
-8534->
-8554->
-8579->
-8588->
-8595->
-8600->
-8601->
-8610->
-8638->
-8652->
-8666->
-8671->
-8805->
-8900->
-8905->
-8944->
-8949->
-8950->
-8960->
-8980->
-10956->
-11265->
-11661->
-4744->4745 [e]
-10364->10365 [:] [-conjet]
-4832->9 [:] [pos='n']
-10643->10644 [r]
-11457->11458 [a]
-10788->10655 [:]
-10787->10780 [r:]
-10787->10779 [m:]
-10789->10689 [p:]
-10789->10692 [r:]
-5401->1353 [:] [pos='n']
-6413->6414 [a]
-10728->10729 [a:]
[caso='icha',grd='compsup'];[caso='icha',grd=None];[caso='icha',grd='compinf']
-991->963 [v:]
-285->301 [v:]
-285->286 [:]
-289->291 [:]
-289->292 [:] [-inter]
-286->289 [:] [-narver,-restr]
-289->290 [:]
-11626->11628 [t]
-11632->10870 [:] [pos='n']
-4610->4611 [ã]
-768->769 [:]
-11383->10488 [:] [pos='n']
-11384->10507 [:] [pos='n']
-11380->11384 [ý:y]
-11380->11383 [ú:u]
-1498->1476 [y:]
-1498->1477 [y:]
-1498->1499 [:]
-1498->1500 [:]
-2362->2830 [v]
-743->653 [:]
-3661->3662 [a]
-6569->6570 [a]
-1409->1108 [':]
-11381->9861 [:] [pos='n']
-11382->10502 [:] [pos='n']
-2844->2847 [ú:u]
-935->1080 [':]
-5935->5936 [i]
-10636->7636 [':]
-5385->5386 [:]
-5934->5935 [ã]
-1410->1080 [':]
-5965->1383 [:] [pos='n']
-4366->1308 [:] [pos='n']
-2082->2083 [e]
-9589->9590 [r]
-8399->8400 [r:]
-2784->1325 [:] [pos='n']
-1368->1369 [:] [-inter]
-2307->2309 [ý:y]
-1129->1130 [i:]
-11627->10865 [:] [pos='n']
-4503->4504 [a:á]
-10972->10719 [:]
-7175->7177 [á:] [caso='gua']
-9391->9392 [a]
-510->511 [:]
-2307->2308 [y]
-5668->5669 [o]
-4697->4698 [r]
-11375->11376 [:]
-9791->9796 [k]
-9825->9075 [:] [pos='n']
-9823->8448 [:] [pos='n']
-9791->9822 [ý:y]
-9791->9792 [:]
-2287->2324 [U:u]
-2287->2332 [Y:y]
-2287->6419 [ã]
-2287->6410 [á]
-6978->6917 [:]
-1123->931 [p:]
-7209->6901 [v:]
-2849->2850 [i]
-2840->1287 [:] [pos='n']
-2839->2840 [:]
-2839->2849 [m]
-5130->2063 [:] [pos='n']
-3765->3766 [:] [-narver,-restr]
-6365->1287 [:] [pos='n']
-6366->1292 [:] [pos='n']
-5667->5671 [k]
-4513->4514 [e]
-7727->7289 [:]
-7727->7297 [:]
-5672->9 [:] [pos='n']
-3765->288 [:]
-5667->5668 [']
-5667->5674 [p]
-10730->10731 [:] [grd=None]
-6192->1298 [:] [pos='n']
-3962->3963 [u]
-3961->9 [:] [pos='n']
-10584->10589 [é:e]
-8648->8649 [:] [-conjet]
-10589->10590 [:] [pos='n']
-5535->5536 [a]
-3698->3699 [r]
-10520->7688 [':]
-3880->3881 [s]
-2586->9 [:] [pos='n']
-1221->1222 [i:]
-1217->1218 [i:] [+dim]
-1223->1224 [i:] [+dim]
-3699->3700 [i]
-10677->10671 [:] [-neg]
-3878->3879 [ĩ]
-11608->11609 [e]
-3578->3579 [a]
-3882->2075 [:] [pos='n']
-3881->3882 [a]
-3877->3878 [t]
-3876->3877 [a]
-4723->4724 [a]
-10849->10850 [:] [-pl]
-2276->2278 [í:i]
-5630->5631 [k]
-4339->4367 [á]
-10229->10204 [':]
-8367->8368 [:]
-2727->2728 [a]
-7802->7985 [':]
-9144->9153 [á:a]
-8866->8823 [:]
-1404->1405 [v:]
-10441->9975 [i:]
-7516->7138 [:]
-10162->7712 [nd:]
-8375->334 [:] [-adj,caso='re',grd=None,-neg,-pl,pos='n',poses=None]
-7818->7832 [:] [-narver,-restr]
-7869->7815 [:]
-8866->8819 [:]
-10858->10860 [g]
-8866->8829 [:]
-10850->10851 [:] [-fut,-pas]
-9144->9145 [a]
-8367->8369 [k:]
-7651->7620 [:]
-10478->10428 [:]
-8548->8549 [a:] [grd='supis']
-9133->9155 [í:i]
-1487->1488 [:] [-adj]
-1487->1394 [:]
-11712->10488 [:] [pos='n']
-10363->10340 [i:] [+afir]
-7469->7453 [':]
-10972->10688 [nd:]
-11151->10586 [:] [pos='n']
-11072->11073 [a]
-11071->11072 [h]
-1488->1439 [y:]
-1488->1422 [i:]
-1488->1418 [g:]
-1488->1427 [nd:]
-7740->7741 [:]
-11534->11535 [ĩ]
-5457->5458 [p]
-4522->4523 [a]
-11990->320 [:] [-adj,caso='re',grd=None,-neg,-pl,pos='n',poses=None]
-5681->2006 [:] [pos='n']
-8241->551 [:] [-adj,caso='rendape',grd=None,-neg,-pl,pos='n',poses=None]
-11042->11043 [r]
-5682->2022 [:] [pos='n']
-8233->8235 [k:]
-8235->8236 [u:]
-5677->5678 [n]
-5678->5679 [u]
-2229->2231 [ch]
-408->409 [u:]
-7211->6954 [v:]
-8240->8241 [:]
-5266->1292 [:] [pos='n']
-12217->12218 [a:]
-3409->1292 [:] [pos='n']
-569->532 [á:] [caso='gua']
-9448->9459 [u:ú]
-6625->6628 [a]
-6625->6684 [p]
-660->325 [:]
-1008->1009 [r:]
-1007->1008 [i:]
-1078->1049 [:] [-narver,-restr]
-10561->10562 [:] [-conjet]
-1013->1014 [v:]
-1073->1074 [v:]
-3608->3609 [p]
-180->169 [e:] [grd='compsup']
-196->197 [e:] [+neg]
-4253->1298 [:] [pos='n']
-4252->9 [:] [pos='n']
-7950->7913 [v:]
-7876->7877 [t:]
-7887->7888 [o:] [+concom]
-7470->7477 [:]
-7543->7533 [v:]
-7543->7544 [:]
-7545->7546 [:] [-inter]
-7544->7545 [:] [-narver,-restr]
-8387->8388 [i:]
-1549->1550 [:] [-dim]
-1587->1149 [k:]
-7106->7031 [:]
-10155->10094 [e:]
-7105->7081 [v:]
-7104->7105 [:] [-conjet]
-7104->7095 [:]
-11652->11656 [:] [grd=None]
-934->1108 [':]
-934->1095 [':]
-2873->2874 [r]
-7105->7089 [v:]
-3524->3525 [y]
-11524->11526 [r]
-11764->11765 [a]
-11765->10835 [:] [pos='n']
-3350->3351 [a]
-3349->3350 [h]
-3135->3136 [u]
-3136->3137 [ã]
-11749->11759 [t]
-11749->11751 [k]
-11751->11752 [u]
-12161->12162 [a]
-11761->10488 [:] [pos='n']
-11763->11764 [r]
-11749->11750 [:]
-11750->10502 [:] [pos='n']
-4987->4988 [a]
-8740->8744 [:] [grd=None]
-4019->4020 [a]
-282->283 [:]
-9917->9918 [s:]
-4973->4977 [ý]
-4032->4033 [y]
-9145->9147 [']
-3415->3416 [:]
-4977->4978 [v]
-4041->4042 [u]
-681->682 [:] [-conjet]
-3385->3415 [ó:o]
-4855->1383 [:] [pos='n']
-889->890 [g:]
-754->832 [':]
-753->754 [:] [caso=None]
-3411->3412 [ĩ]
-1208->1209 [:] [-afir,-concom]
-1648->1649 [:] [caso=None]
-1649->181 [':]
-1648->1234 [:]
-3405->3406 [u]
-7475->7432 [r:]
-3529->3553 [y]
-4664->4740 [i:í]
-4149->4150 [t]
-4664->4736 [e]
-6018->6019 [a:]
-6019->2063 [:] [pos='n',poses=None];[pos='n',poses='int']
-6022->2075 [:] [pos='n',poses=None];[pos='n',poses='int']
-6017->6018 [r:]
-6517->6518 [']
-4151->4153 [j]
-5804->1287 [:] [pos='n']
-2->2279 [é]
-2->2065 [o]
-2->2218 [y]
-765->771 [é:] [grd='compinf']
-12072->174 [:] [+adj,caso=None,grd=None,-neg,+pl,pos='n',poses=None]
-12071->12072 [a:]
-2->2163 [u]
-10947->10948 [:]
-1482->1483 [a:]
-10950->7626 [v:]
-10950->7551 [':]
-6092->6093 [a]
-6345->1298 [:] [pos='n']
-12182->320 [:] [-adj,caso=None,grd=None,-neg,+pl,pos='n',poses=None]
-12180->12210 [y:]
-12180->12193 [i:]
-12210->12211 [p:]
-933->934 [e:] [caso='ypype']
-12180->12182 [:]
-12180->12181 [:]
-12181->320 [:] [-adj,caso=None,grd=None,-neg,+pl,pos='n',poses=None]
-1157->931 [p:]
-11204->11205 [i]
-10704->10665 [:]
-10704->10667 [:]
-9079->8823 [:]
-10054->7043 [nt:]
-10637->7551 [':]
-6888->7764 [r:]
-3496->3497 [ã]
-10343->10344 [r:]
-11067->9999 [v:]
-2795->2797 [é:e]
-2795->2796 [e]
-10344->10345 [a:]
-2797->1325 [:] [pos='n']
+3208->
+3749->
+6897->
+6906->
+6913->
+6918->
+6919->
+6923->
+6934->
+6943->
+6948->
+6949->
+6967->
+6983->
+7019->
+7033->
+7038->
+7057->
+7062->
+7077->
+7144->
+7152->
+7253->
+7321->
+7326->
+7332->
+7360->
+7395->
+7400->
+7401->
+7405->
+7409->
+7427->
+7439->
+7462->
+7518->
+7527->
+7543->
+7567->
+7584->
+7616->
+7631->
+7740->
+7821->
+7826->
+7832->
+7860->
+7895->
+7900->
+7901->
+7905->
+7909->
+7927->
+7939->
+7962->
+8471->
+8476->
+8515->
+8520->
+8521->
+8531->
+8551->
+8576->
+8585->
+8592->
+8597->
+8598->
+8607->
+8635->
+8649->
+8663->
+8668->
+8802->
+8897->
+8902->
+8941->
+8946->
+8947->
+8957->
+8977->
+10953->
+11262->
+11658->
+1498->1474 [i:]
+11813->11816 [é:e]
+7823->7824 [i:]
+817->818 [i:]
+1015->1070 [:] [-conjet]
+6253->6254 [a]
+6251->6252 [y]
+6892->6893 [:] [-afir,-concom]
+6891->6892 [:] [grd=None]
+721->722 [:] [-neg]
+712->720 [:]
+573->535 [i:]
+2525->2526 [i]
+10535->10499 [:] [grd=None,-neg,-pl,pos='n',poses=None]
+11219->11266 [ý:y]
+10432->10433 [v:]
+7012->7013 [t:]
+7108->7109 [t:]
+7503->7185 [o:] [caso='vo']
+7502->7503 [v:]
+3970->3971 [']
+11688->11696 [r]
+5793->1287 [:] [pos='n']
+6879->6880 [e]
+6252->6253 [']
+11817->10504 [:] [pos='n']
+4305->1339 [:] [pos='n']
+4306->1344 [:] [pos='n']
+4009->4010 [y]
+4010->1383 [:] [pos='n']
+4300->4301 [u]
+10761->10732 [p:]
+11564->11565 [a]
+4301->2063 [:] [pos='n']
+4303->2075 [:] [pos='n']
+4302->4303 [u]
+4299->4302 [ý]
+4299->4304 [ỹ]
+4874->9 [:] [pos='n']
+10207->10188 [':]
+5132->5133 [r]
+11057->10567 [y:]
+11057->10566 [y:]
+11482->11483 [v]
+1738->9 [:] [pos='n']
+11057->7662 [nd:]
+11057->10116 [':]
+544->439 [e:]
+11057->10564 [i:]
+1947->1339 [:] [pos='n']
+6380->6381 [:]
+3581->3587 [á:a]
+2208->2210 [g]
+8854->8855 [u:]
+7385->7440 [:] [-conjet]
+10152->10039 [e:]
+7385->7386 [:]
+4001->4002 [']
+7444->7445 [o:]
+7449->7444 [v:]
+7382->7449 [:]
+10152->10091 [e:]
+7440->7420 [v:]
+7440->7410 [v:]
+8855->8861 [é:] [+pas]
+4381->4382 [o]
+11847->10587 [:] [pos='n']
+11042->11050 [é:e]
+9251->8883 [:] [-neg]
+11754->11755 [a]
+5784->5785 [t]
+8867->8861 [é:] [+pas]
+0->11942 [n:nd]
+8300->8310 [k:]
+0->8387 [i:h]
+4934->4935 [ĩ]
+797->384 [:]
+0->12222 [ó:<h]
+0->12074 [o:<h]
+10152->10008 [':]
+5373->5381 [ó:o]
+7721->7722 [g:]
+11842->10643 [:] [pos='n']
+10151->10152 [:] [-neg]
+11948->320 [:] [-adj,caso='ndi',grd=None,-neg,-pl,pos='n',poses=None]
+3302->3318 [h]
+3302->3323 [i]
+3302->3304 [']
+3302->3424 [t]
+9888->9889 [k:]
+1421->1409 [a:]
[caso='icha',grd='sup'];[caso='icha',grd='supis'];[caso='icha',grd='ultsup'];[caso='icha',grd='supsup']
+11668->7260 [:]
+9394->9396 [ý:y]
+1417->1113 [á:]
+4015->4038 [s]
+1420->1421 [ch:]
+1431->1432 [ã:] [caso='rã']
+6758->1383 [:] [pos='n']
+6753->6754 [h]
+10191->10184 [:] [-afir,-concom]
+6752->6753 [i]
+2780->1321 [:] [pos='n']
+2779->2785 [p]
+6666->6667 [y]
+7216->7217 [:]
+7216->7222 [:]
+7216->7227 [:]
+2790->2791 [:]
+2791->1325 [:] [pos='n']
2778->2779 [e]
-2777->2778 [j]
-2794->2795 [p]
2778->2790 [é:e]
-4116->4257 [ñ]
-11386->11387 [r]
-2815->1287 [:] [pos='n']
-2814->2815 [:]
-2816->2818 [ý:y]
-7454->7455 [v:]
-2817->1287 [:] [pos='n']
-2818->1292 [:] [pos='n']
-4530->1339 [:] [pos='n']
-7146->7147 [:] [-inter]
-4529->4531 [í:i]
-7455->7456 [e:] [grd='compinf']
-7571->7572 [a:]
-1587->1158 [r:]
-12192->551 [:] [-adj,caso='rendape',grd=None,-neg,+pl,pos='n',poses=None]
-189->126 [v:]
-7426->7427 [r:]
-10716->10747 [p:]
-1336->1292 [:] [pos='n']
-716->652 [r:]
-715->641 [g:]
-719->657 [ch:]
-717->654 [v:]
-720->662 [v:]
-718->719 [i:]
-9442->9443 [k]
-5131->5164 [í:i]
-7797->8025 [r:]
-6985->6986 [:] [-inter]
-909->877 [e:] [caso='ve']
-9548->8448 [:] [pos='n']
-9543->9544 [t]
-9366->9368 [á:a]
-9382->9383 [y]
-6336->6372 [ú:u]
-6337->6339 [']
-9544->9545 [y]
-9544->9546 [ý:y]
-11496->10865 [:] [pos='n']
-6337->6342 [k]
-8327->8328 [:]
-2531->2532 [i]
-9183->8448 [:] [pos='n']
-2362->2515 [mb]
-6510->6511 [o]
-12012->12013 [:i]
-387->383 [o:] [+inter]
-8416->8417 [y:]
-3->1375 [k]
-12113->12114 [y:]
-10360->7928 [ã:] [+fut]
-10839->10840 [a]
-2798->2819 [y:ý]
-8988->8961 [:]
-1997->1325 [:] [pos='n']
-9254->8886 [:] [-neg]
-9252->9254 [:] [caso=None]
-2102->2103 [a]
-11499->11500 [a]
-9277->9279 [ý:y]
-1785->1786 [a]
-2101->2102 [h]
-5211->5212 [o]
-8034->8018 [e:] [+fut,+pas]
-9173->9175 [á:a]
-9248->9249 [u:]
-9247->9248 [k:]
-2798->2829 [ĩ]
-1996->1321 [:] [pos='n']
-1785->1787 [á:a]
-8209->8210 [e:]
-10101->10102 [r:]
-10137->10108 [r:]
-3505->1292 [:] [pos='n']
-905->906 [i:]
-5938->5944 [ý:y]
-5770->5772 [í:i]
-2921->2927 [p]
-5372->1298 [:] [pos='n']
-28->29 [r:]
-71->33 [k:]
-5368->5369 [e]
-5367->5368 [ng]
-3436->1383 [:] [pos='n']
-10809->10811 [:] [-adj]
-8099->8100 [:]
-8099->8119 [i:]
-8099->8120 [y:]
-723->724 [:] [-afir,-concom]
-9164->9141 [:] [pos='n']
-1396->1402 [:]
-1396->1404 [:]
-8906->8905 [:] [-inter]
-1396->1420 [i:]
-1396->1422 [i:]
-1396->1431 [r:]
-8475->8476 [p:]
-1396->1397 [:]
-1396->1399 [:]
-1231->1182 [v:]
-10033->10034 [e:]
-10034->10035 [r:]
-3359->3361 [á:a]
-920->921 [u:]
-3358->3359 [s]
-3359->3360 [a]
-3354->3358 [u]
-3362->9 [:] [pos='n']
-3354->3355 [p]
-3353->3363 [ú:u]
-4260->4262 [í:i]
-8131->8069 [i:]
-10538->10502 [:] [grd=None,-neg,-pl,pos='n',poses=None]
-11882->9861 [:] [pos='n']
-1994->1995 [u]
-9969->9962 [v:]
-1312->1313 [:]
-4271->1308 [:] [pos='n']
-433->418 [:]
-2704->2705 [a]
-10440->10441 [:] [-neg]
-7028->7030 [é:] [+pas]
-8679->8661 [:]
-10103->10104 [i:]
-2312->2313 [i]
-11163->11164 [r]
-7856->7836 [v:]
-6802->6803 [']
-5345->1292 [:] [pos='n']
-7209->7210 [:]
-11165->10646 [:] [pos='n']
-4262->1292 [:] [pos='n']
-7210->6934 [:]
-2007->2008 [:] [-fut,-pas]
-9790->9791 [a]
-4550->9 [:] [pos='n']
-11122->11139 [t]
-9790->9826 [ú:u]
-8440->4944 [ng]
-9790->9823 [u]
-9790->9824 [á:a]
-4061->9 [:] [pos='n']
-10927->10928 [a]
-8510->8511 [:] [-conjet]
-10441->9950 [':]
-2->2060 [e:é]
-46->36 [p:]
-2839->2844 [k]
-1410->1121 [i:]
-5298->5329 [r]
-1410->1122 [i:]
-1410->1084 [r:]
-1410->1120 [i:]
-2853->1287 [:] [pos='n']
-4068->4069 [ĩ]
-10445->10441 [:] [-neg]
-1416->1108 [':]
+2779->2780 [:]
+10808->10744 [p:]
+10806->10808 [:] [-adj]
+7135->7136 [v:]
+628->631 [:] [-conjet]
+10808->10739 [i:]
+10808->10747 [r:]
+10808->10734 [':]
+8209->551 [:] [-adj,caso='rendape',grd=None,-neg,-pl,pos='n',poses=None]
+1267->1245 [i:]
+1267->1246 [i:]
+12153->3745 [:] [-adj,caso='pe',grd=None,-neg,+pl,pos='n',poses=None]
+10808->10737 [i:]
+8307->8309 [á:]
+8273->8274 [':a]
+5692->5693 [i]
+1946->1948 [í:i]
+9442->9444 [é:e]
+5699->5700 [:]
+5700->1292 [:] [pos='n']
+8279->8280 [a:]
+10916->10920 [ng]
+5693->1517 [:] [pos='n']
+8274->8278 [á:]
+5603->5692 [á]
+5603->5699 [ý:y]
+9788->9789 [:]
+9202->9203 [r:]
+10129->10119 [a:] [caso='ichagua']
+9204->9205 [v:]
+9203->8882 [e:] [caso='re']
+9201->8983 [i:] [caso='gui']
+9205->8983 [o:] [caso='vo']
+9199->9200 [g:]
+7960->7917 [:]
+9198->8882 [e:] [caso='pe']
+9197->9198 [p:]
+8437->2902 [ch]
+8437->5598 [r:s]
+3788->4113 [u]
+3788->4271 [y]
+3788->4041 [e:é]
+3788->4044 [i]
+1245->1195 [ch:]
+1246->1197 [ch:]
+3089->1308 [:] [pos='n']
+3788->3789 [a]
+1740->9 [:] [pos='n']
+1919->1920 [o]
1219->1192 [g:]
-1219->1202 [p:]
-10400->10401 [i:]
-10399->10287 [p:]
-1219->1196 [i:]
-1219->1213 [y:]
-1219->1205 [r:]
-1219->1194 [i:]
-6141->1325 [:] [pos='n']
-6140->1321 [:] [pos='n']
-6139->6140 [e]
-8089->8065 [g:]
-5017->5018 [i]
-6137->1287 [:] [pos='n']
-6136->6137 [o]
-5056->5057 [i]
-10152->10145 [r:]
-10152->10119 [':]
-10152->7665 [nd:]
-10152->10126 [i:]
-512->265 [:]
-512->513 [:] [-inter]
-511->512 [:] [-narver,-restr]
-512->268 [:]
-1329->1330 [:] [pos='n']
-2819->2820 [r]
-2820->2821 [a]
-11519->10586 [:] [pos='n']
-10151->9865 [:]
-10151->10152 [:] [-adj]
-4549->4551 [á:a]
-11536->11537 [e]
-9419->9137 [:] [pos='n']
-9352->9370 [p]
-9352->9400 [s]
-9420->9141 [:] [pos='n']
-9417->9418 [t]
-9352->9405 [t]
-9418->9420 [é:e]
-9421->9089 [:] [pos='n']
-10510->10160 [:]
-2311->1383 [:] [grd=None,-neg,-pl,pos='n',poses=None]
-9352->9357 [h]
-994->995 [o:]
-4137->4138 [e]
-7260->7261 [:] [grd=None]
-12123->12124 [p:]
-4548->4549 [h]
-9711->9261 [:] [pos='n']
-7650->7653 [i:]
-7650->7652 [i:]
-9308->9094 [:] [pos='n']
-9305->9306 [p]
-9304->9305 [o]
-9303->9304 [p]
-4191->4193 [é:e]
-4193->1325 [:] [pos='n']
-4192->1321 [:] [pos='n']
-7649->7627 [':]
-10788->10789 [:] [-adj]
-10789->10679 [g:]
-10789->10688 [nd:]
-8019->7800 [:]
-4833->1298 [:] [pos='n']
-10789->10678 [':]
-8018->8011 [r:]
-5606->5677 [u]
-8018->8010 [m:]
-10978->10823 [e:] [+pas]
-10944->7783 [r:]
-9709->9710 [r]
-7773->7646 [':]
-10478->10450 [i:]
-4897->9 [:] [pos='n']
-4856->4886 [t]
-3648->3650 [ý:y]
-1929->1287 [:] [pos='n']
-9137->8871 [k:]
-10269->10270 [u:]
-10270->10260 [e:] [+pas]
-10270->10265 [é:] [+pas]
-4862->4863 [i]
-4862->4867 [u]
-4856->4857 [j]
-4856->4862 [r]
-10944->7767 [':]
-9697->9699 [k]
-11413->10888 [:] [pos='n']
-749->728 [m:]
-2728->2729 [v]
-4903->4904 [e]
-4903->4910 [é:e]
-4895->1292 [:] [pos='n']
-4894->1287 [:] [pos='n']
-3079->3080 [:]
-3063->3064 [a]
-3191->3192 [:] [-dim]
-4891->4892 [o]
-9973->9875 [t:]
-9875->9876 [e:] [grd='sup']
-10869->10870 [:] [pos='n']
-4910->4911 [:]
-3063->3075 [á:a]
-7697->7513 [p:]
-6483->6484 [a]
-4743->4812 [k]
-57->44 [nt:]
-10587->10272 [r:]
-1432->1095 [':]
-7240->6987 [:]
-5674->5675 [e]
-926->1124 [:] [-adj]
+1219->1201 [nd:]
+1919->1932 [ý:y]
+1932->1933 [:]
+1739->1741 [á:a]
+1741->1298 [:] [pos='n']
+7460->7417 [:]
+7459->7460 [:]
+7459->7420 [v:]
+7459->7410 [v:]
+3628->3642 [g]
+2337->2338 [i]
+7460->7461 [:] [-narver,-restr]
+7460->7418 [:]
+5619->5627 [u]
+7458->7459 [:] [-conjet]
+7458->7428 [:]
+7546->7547 [:] [-narver,-restr]
+7547->6911 [:]
+3890->3892 [r]
+3899->1298 [:] [pos='n']
+3900->3901 [:]
+3880->3900 [ý:y]
+3880->3886 [u]
+3901->1292 [:] [pos='n']
+3880->3899 [á:a]
+3880->3890 [y]
+497->268 [:]
+9610->9616 [á:a]
+794->795 [r:]
+5012->5295 [u]
+5012->5330 [u:ú]
+5012->5332 [y]
+5012->5514 [é]
+5303->1325 [:] [pos='n']
+5012->5121 [i]
+5012->5182 [o]
+5012->5292 [o:ó]
+1395->1396 [a:] [+adj]
+1419->1409 [a:] [caso='gua']
+6397->6398 [nd]
+5299->1321 [:] [pos='n']
+1418->1419 [u:]
+5550->5551 [:]
+1427->1115 [i:] [caso='ndi']
+1430->934 [e:] [caso='pype']
+1884->1885 [e]
+4377->4378 [e]
+2556->2558 [k]
+2558->2559 [y]
+10125->10126 [ch:]
+10480->8134 [ã:] [+fut]
+935->1003 [:]
+935->998 [:]
+2557->1287 [:] [pos='n']
+2559->2560 [t]
+934->935 [:] [-neg]
+934->1108 [':]
+934->1095 [':]
+933->934 [e:] [caso='ypype']
+7564->7568 [v:]
+4280->4281 [a]
+7589->7590 [:] [-conjet]
+11733->11734 [:]
+3851->3852 [e]
+7589->7092 [:]
+3853->1325 [:] [pos='n']
+3789->3849 [i]
+11620->11621 [e]
+10482->8147 [ng:]
+5881->5882 [j]
+10831->10832 [:] [pos='n']
+4929->9 [:] [pos='n']
+11610->9858 [:] [pos='n']
+3496->3497 [v]
+568->569 [u:]
+10889->7643 [':]
+10919->10899 [:] [pos='n']
+10424->10445 [i:]
+569->531 [a:] [caso='gua']
+3756->715 [:]
+569->532 [á:] [caso='gua']
+1498->1428 [p:]
+3756->716 [:]
+532->533 [:] [-neg]
+4105->1298 [:] [pos='n']
+6517->1353 [:] [pos='n']
+2163->2166 [g]
***The diff for this file has been truncated for email.***
=======================================
--- /l3xdg/languages/gn/FST/nG.fst Sat Dec 7 02:32:54 2013 UTC
+++ /l3xdg/languages/gn/FST/nG.fst Mon Feb 10 21:51:55 2014 UTC
@@ -1,6 +1,6 @@
-features={'pl': [True, False], 'poses': ['ext', 'int'], 'adj': [True,
False], 'fut': [True, False], 'grd':
['sup', 'supis', 'ultsup', 'supsup', 'compsup', 'compinf'], 'pas': [True,
False], 'neg': [True, False], 'restr': [True, False], 'conjet': [True,
False], 'pos': ['n'], 'afir': [True, False], 'concom': [True,
False], 'narver': [True, False], 'dim': [True, False], 'caso':
['ichagua', 'icha', 've', 'ndi', 'ari', 'gua', 'ypype', 'pype', 're', 'pe', 'gui', 'vo', 'rendape', 'rã'], 'inter':
[True, False]}
+features={'grd':
['compinf', 'compsup', 'sup', 'supis', 'supsup', 'ultsup'], 'concom':
[True, False], 'narver': [True, False], 'conjet': [True, False], 'restr':
[True, False], 'caso':
['ndi', 'ypype', 'icha', 'gui', 've', 're', 'pe', 'pype', 'gua', 'ichagua', 'ari', 'vo', 'rã', 'rendape'], 'poses':
['ext', 'int'], 'afir': [True, False], 'adj': [True, False], 'dim': [True,
False], 'fut': [True, False], 'pas': [True, False], 'pos': ['n'], 'pl':
[True, False], 'neg': [True, False], 'inter': [True, False]}
defaultFS=[-adj,-afir,caso=None,-concom,-conjet,-dim,-fut,grd=None,-inter,-narver,-neg,-pas,-pl,-restr]
-{'@n':
frozenset({'ỹ', 'Ỹ', 'ñ', 'õ', 'ũ', 'Ũ', '<ñ', 'm', 'n', 'ã', 'Mb', 'nt', 'Ñ', 'Õ', 'nd', 'ng', 'M', 'N', 'Ã', 'Nt', 'ẽ', 'Ẽ', 'ĩ', 'Ĩ', 'Ng', 'Nd', 'ĝ', 'Ĝ', 'mb'}), '@V':
frozenset({'É', 'ú', 'ý', 'ó', 'é', 'Á', 'Ú', 'í', 'á', 'Í', 'Ó', 'Ý'}), '@i':
frozenset({'i', 'ĩ', 'í'}), '@N':
frozenset({'ỹ', 'ũ', 'ẽ', 'Ẽ', 'Ũ', 'Õ', 'õ', 'ĩ', 'Ĩ', 'Ỹ', 'ã', 'Ã'}), '@M':
frozenset({'ỹ', 'ũ', 'M', 'ẽ', 'Ẽ', 'Ũ', 'ñ', 'Õ', 'N', 'õ', 'Ñ', 'ĩ', 'Ĩ', '<ñ', 'm', 'n', 'Ỹ', 'ĝ', 'ã', 'Ã', 'Ĝ'}), '.':
frozenset({'y', 'ỹ', 'ú', 'ý', 'J', 'Ỹ', 'ñ', 'p', 'ó', 'r', 'õ', 't', 'v', 'é', 'h', 'k', 'j', 'í', 'l', 'o', 'n', 'á', 'Nd', 'ã', 'ch', 'e', 'g', 'Mb', 'nt', 'X', 'Ú', 'Ý', '^', 'Ñ', 'P', 'Ó', 'R', 'U', 'T', 'V', 'nd', '<j', 'K', 'ng', 'Í', 'L', 'O', 'N', 'A', 'M', 'i', 'B', 'E', 's', 'G', 'Nt', 'Y', 'H', 'ẽ', 'Ẽ', 'u', 'Õ', 'ĩ', 'Á', 'Ng', '!', 'Ũ', '<h', 'Ã', "'", 'ũ', 'Ch', 'ĝ', 'Ĝ', 'Ĩ', 'Rr', 'rr', '<ñ', 'É', 'm', 'I', 'a', 'S', 'mb'}), '@v':
frozenset({'y', 'ỹ', 'ú', 'ý', 'Ỹ', 'Õ', 'ó', 'õ', 'é', 'a', 'í', 'o', 'á', 'ã', 'e', 'Y', 'É', 'Ú', 'Ý', 'Ó', 'U', 'I', 'Í', 'O', 'A', 'i', 'E', 'ẽ', 'Ẽ', 'u', 'ĩ', 'Á', 'Ũ', 'Ã', 'ũ', 'Ĩ'}), '@W':
frozenset({'y', 'ỹ', 'ú', 'ý', 'Ỹ', 'Õ', 'ó', 'õ', 'é', 'a', 'í', 'o', 'á', 'ã', 'e', 'Y', 'É', 'Ú', 'Ý', 'Ó', 'U', 'I', 'Í', 'O', 'A', 'i', 'E', 'ẽ', 'Ẽ', 'u', 'ĩ', 'Á', 'Ũ', 'Ã', 'ũ', 'Ĩ'}), '@u':
frozenset({'ú', 'Á', 'U', 'A', 'u', 'Ũ', 'ũ', 'á', 'Ú', 'a', 'ã', 'Ã'}), '@c':
frozenset({'J', 'ñ', 'p', 's', 'r', 't', 'v', 'h', 'k', 'j', 'm', 'l', 'n', 'ch', 'g', 'Mb', 'nt', 'X', '^', 'Ñ', 'P', 'S', 'R', 'T', 'V', 'nd', '<j', 'K', 'ng', 'M', 'L', 'N', 'B', '<h', 'G', 'Nt', 'H', 'Nd', 'Ng', '!', "'", 'Ch', 'ĝ', 'Ĝ', 'Rr', 'rr', '<ñ', 'I', 'mb'}), '@o':
frozenset({'y', 'ĩ', 'ý', 'O', 'ỹ', 'Ỹ', 'Õ', 'ó', 'õ', 'Y', 'i', 'Ĩ', 'í', 'o', 'Í', 'I', 'Ó', 'Ý'})}
+{'@v':
frozenset({'u', 'õ', 'ó', 'ý', 'y', 'Ỹ', 'ú', 'e', 'a', 'ã', 'í', 'o', 'ũ', 'Ũ', 'U', 'Ó', 'Ý', 'é', 'Y', 'Ú', 'E', 'A', 'Ã', 'Ẽ', 'Í', 'Á', 'O', 'I', 'Õ', 'ẽ', 'ỹ', 'ĩ', 'Ĩ', 'É', 'i', 'á'}), '@W':
frozenset({'u', 'õ', 'ó', 'ý', 'y', 'Ỹ', 'ú', 'e', 'a', 'ã', 'í', 'o', 'ũ', 'Ũ', 'U', 'Ó', 'Ý', 'é', 'Y', 'Ú', 'E', 'A', 'Ã', 'Ẽ', 'Í', 'Á', 'O', 'I', 'Õ', 'ẽ', 'ỹ', 'ĩ', 'Ĩ', 'É', 'i', 'á'}), '@u':
frozenset({'u', 'U', 'Ú', 'ú', 'á', 'ã', 'Á', 'a', 'A', 'ũ', 'Ũ', 'Ã'}), '@M':
frozenset({'õ', 'Õ', 'Ñ', 'M', 'ñ', 'Ã', 'ẽ', 'ĩ', 'ỹ', 'Ỹ', 'Ũ', 'ĝ', '<ñ', 'ã', 'Ẽ', 'm', 'N', 'n', 'ũ', 'Ĩ', 'Ĝ'}), '@c':
frozenset({'t', 'Rr', 'v', 'ñ', 'p', 's', 'r', '<j', '<h', 'g', '<ñ', 'ch', 'm', 'l', 'n', 'h', 'k', 'j', 'T', 'V', 'Mb', 'P', 'S', 'R', 'nd', 'ng', 'X', 'G', 'B', 'nt', 'L', 'N', 'I', 'H', 'K', 'J', 'Ng', 'Nd', 'Ch', 'M', "'", '!', 'Nt', 'Ñ', 'rr', 'ĝ', 'Ĝ', 'mb', '^'}), '@N':
frozenset({'õ', 'Õ', 'Ã', 'ẽ', 'ĩ', 'ỹ', 'Ỹ', 'Ũ', 'ã', 'Ẽ', 'ũ', 'Ĩ'}), '@n':
frozenset({'õ', 'ñ', 'ỹ', 'Ỹ', '<ñ', 'ã', 'm', 'n', 'ũ', 'Ũ', 'Õ', 'Mb', 'nd', 'ng', 'Nd', 'Ã', 'nt', 'N', 'ẽ', 'Ẽ', 'Ng', 'M', 'Nt', 'Ñ', 'ĩ', 'Ĩ', 'ĝ', 'Ĝ', 'mb'}), '@o':
frozenset({'õ', 'Õ', 'Y', 'Ó', 'ó', 'ý', 'ĩ', 'I', 'y', 'Ỹ', 'Ĩ', 'Í', 'ỹ', 'í', 'o', 'i', 'O', 'Ý'}), '.':
frozenset({'u', 'õ', 'Rr', 'v', 'ñ', 'p', 'ó', 'r', 'ý', '<h', 'y', 'Ỹ', 'ú', 'e', 'm', 'g', '<ñ', 'a', 'ã', 'ch', 'í', 'l', 'o', 'n', 'ũ', 'h', 'k', 'j', 'U', '^', 'V', 'Mb', 's', 'Ó', 'R', 'nd', 'é', 'ng', 'Y', 'X', 'Ú', 'E', '<j', 'G', 'A', 'Ã', 'B', 'nt', 'Á', 'O', 'N', 'I', 'H', 'K', 'J', 'Õ', 'Ng', 'Ũ', 'T', 'ẽ', 'ỹ', 'Ch', 't', 'Í', "'", '!', 'Nd', 'L', 'Nt', 'Ñ', 'ĩ', 'Ĩ', 'P', 'rr', 'M', 'S', 'ĝ', 'É', 'i', 'Ý', 'mb', 'Ĝ', 'á', 'Ẽ'}), '@V':
frozenset({'Ó', 'ó', 'ý', 'É', 'ú', 'Í', 'á', 'í', 'Á', 'Ú', 'é', 'Ý'}), '@i':
frozenset({'í', 'ĩ', 'i'})}
->0
34->
39->
@@ -58,19207 +58,19202 @@
1314->
1591->
1952->
-3131->
-3661->
-6783->
-6792->
-6799->
-6804->
-6805->
-6809->
-6820->
-6829->
-6834->
-6835->
-6852->
-6868->
-6900->
-6914->
-6919->
-6938->
-6943->
-6957->
-7020->
-7028->
-7128->
-7189->
-7194->
-7195->
-7199->
-7203->
-7221->
-7233->
-7262->
-7267->
-7273->
-7301->
-7329->
-7378->
-7387->
-7402->
-7425->
-7442->
-7473->
-7487->
-7592->
-7668->
-7673->
-7674->
-7678->
-7682->
-7700->
-7712->
-7741->
-7746->
-7752->
-7780->
-7808->
-8299->
-8304->
-8305->
-8315->
-8339->
-8344->
-8378->
-8398->
-8407->
-8414->
-8419->
-8420->
-8428->
-8455->
-8466->
-8480->
-8485->
-8616->
-8705->
-8710->
-8711->
-8721->
-8745->
-8750->
-8784->
-10707->
-11012->
-11405->
-5093->5133 [k]
-9103->8888 [:] [pos='n']
-1424->1425 [:] [-dim]
-9536->9538 [u]
-6598->6599 [h]
-9299->9301 [u:ú]
-9299->9300 [u]
-9304->9305 [:]
-8922->8276 [:] [pos='n',poses=None];[pos='n',poses='ext']
-9302->9303 [:]
-9305->8893 [:] [pos='n']
-9297->9299 [v]
-6597->6598 [e]
-6599->6600 [á:a]
-11771->11772 [:i]
-11770->11771 [:r]
-1047->902 [:] [+conjet]
-10026->9804 [:] [+concom]
-7932->7950 [:i] [caso='ichagua']
-7932->7949 [:i]
[caso='icha',grd='sup'];[caso='icha',grd='supis'];[caso='icha',grd='ultsup'];[caso='icha',grd='supsup']
-10641->10600 [:k] [+pl]
-7932->7940 [:] [caso='ve']
-7932->7938 [:]
[caso='icha',grd='compsup'];[caso='icha',grd=None];[caso='icha',grd='compinf']
-11484->10641 [:] [pos='n']
-7811->7818 [:e] [grd='sup']
-4202->9 [:] [pos='n']
-10977->10979 [a:á]
-10566->10450 [:nd] [caso='ndi']
-5989->6040 [y]
-3809->1245 [:] [pos='n']
-5989->6022 [e]
-3020->3021 [u]
-3043->1234 [:] [pos='n']
-3021->3022 [ã]
-5989->6030 [o]
-10526->7717 [:v] [+afir]
-3022->1276 [:] [pos='n']
-5989->6026 [i]
-1379->906 [:] [+narver]
-3091->3092 [:] [+adj]
-11135->10269 [:] [pos='n']
-1309->1310 [:] [-afir,-concom]
-1311->237 [:v] [+fut]
-3808->9 [:] [pos='n']
-2265->2272 [u]
-6311->2007 [:] [pos='n',poses=None];[pos='n',poses='ext']
-10628->10629 [y]
-11433->11449 [á:a]
-8199->8200 [:r]
-11157->11158 [k]
-1312->243 [:] [+narver]
-1311->1312 [:]
-1310->476 [:] [+conjet]
-1310->470 [:] [+conjet]
-7229->7197 [:nt]
-7232->7191 [:p]
-204->263 [:v] [+afir]
-7182->7204 [:v] [+pas]
-10823->10930 [y:ý]
-10823->10923 [e:é]
-10823->10925 [o:ó]
-7915->7916 [:] [-afir,-concom]
-10566->10496 [:'] [caso='ari']
-10823->10914 [é]
-9966->9816 [:v] [+fut]
-9965->9790 [:] [+conjet]
-3269->3271 [o:ó]
-9668->9732 [:e] [grd='supsup']
-3273->3275 [a:á]
-3269->3270 [o]
-3274->9 [:] [pos='n']
-3273->3274 [a]
-3268->3272 [u]
-3275->1245 [:] [pos='n']
-2457->2458 [i]
-6294->6295 [a]
-10194->10226 [:y] [caso='gua']
-10194->10217 [:i] [caso='ichagua']
-7131->7116 [:'] [grd='compinf']
-6793->6806 [:] [+restr]
-3826->3827 [e]
-1105->1107 [:] [-adj]
-8271->8272 [a]
-3824->3825 [:]
-8809->8786 [:y] [caso='ypype']
-4185->1285 [:] [pos='n']
-399->400 [:ã]
-7039->6999 [:r] [grd='supis']
-7160->7161 [:ch]
-1545->1550 [i]
-5039->5048 [i]
-5039->5061 [o]
-1096->1097 [:e]
-1112->1113 [:ã]
-9705->9729 [:] [-afir,-concom]
-9729->9709 [:] [+conjet]
-9729->9711 [:] [+conjet]
-3868->3877 [mb]
-9714->9717 [:v] [+pas]
-9714->9724 [:v] [+fut]
-5294->1245 [:] [pos='n']
-9343->9344 [:]
-10407->10408 [r]
-3867->1239 [:] [pos='n']
-8873->8874 [:] [grd=None,-neg,-pl,pos='n',poses=None]
-3865->3866 [y]
-3865->3867 [y:ý]
-3842->3850 [k]
-3842->3843 [g]
-9430->9441 [g]
-9430->9543 [v]
-9694->9695 [:o]
-9679->9680 [:] [+restr]
-1175->1152 [:p] [caso='pype']
-7356->7362 [:] [caso='re']
-7356->7357 [:] [caso='pe']
-7356->7369 [:] [caso='ve']
-4869->4870 [k]
-576->577 [:s]
-7941->7342 [:'] [+neg]
-4859->4869 [i]
-574->575 [:r]
-7356->7366 [:]
[caso='icha',grd='compsup'];[caso='icha',grd=None];[caso='icha',grd='compinf']
-7356->7359 [:] [caso='gui']
-9197->8276 [:] [pos='n']
-11556->11574 [u]
-11556->11567 [o]
-2561->1234 [:] [pos='n']
-9203->9204 [u]
-11545->9657 [:] [pos='n']
-6328->6329 [o]
-681->682 [:] [caso='pe']
-6066->6067 [p]
-11556->11564 [á:a]
-379->387 [:v] [+pas]
-6244->6245 [a]
-8556->8557 [:] [grd=None]
-8547->8548 [:p]
-6347->6348 [v]
-6348->6349 [a]
-7880->7899 [:g] [caso='gua']
-7880->7908 [:nd] [caso='ndi']
-8557->8441 [:] [+concom]
-7878->7879 [:v]
-7908->7174 [:i]
-6355->6356 [r]
-2421->2423 [y:ý]
-5747->1245 [:] [pos='n']
-5745->5747 [a:á]
-1596->1597 [a]
-11295->11297 [a:á]
-10818->10819 [y]
-10817->10818 [t]
-10816->10817 [y]
-10805->10806 [:] [pos='n']
-11295->11296 [a]
-10804->10816 [k]
-2125->9 [:] [pos='n']
-8277->8664 [:'] [+pas]
-7644->7859 [:r] [+pas]
-9030->9031 [:g]
-9031->9032 [:u]
-9766->9927 [:y] [caso='ypype']
-11003->7479 [:v] [grd='compsup']
-9023->9024 [:a]
-9024->9025 [:g]
-9032->9011 [:a]
-9022->9023 [:ch]
-5960->1239 [:] [pos='n']
-1697->1245 [:] [pos='n']
-9025->9026 [:u]
-7564->7565 [:y]
-2124->2125 [a]
-2123->1234 [:] [pos='n']
-2420->2421 [v]
-10840->10290 [:] [pos='n']
-10838->10840 [o:ó]
-10838->10839 [o]
-10837->10351 [:] [pos='n']
-711->623 [:] [caso='re']
-8138->8140 [:á]
-711->613 [:] [caso='gui']
-3169->3170 [nd]
-3173->1276 [:] [pos='n']
-3170->3172 [y:ý]
-8704->8705 [:a]
-9550->8893 [:] [pos='n']
-11486->11506 [ó]
-2979->9 [:] [pos='n']
-5638->1234 [:] [pos='n']
-9453->8936 [:] [pos='n']
-7077->6999 [:r] [grd='supis']
-9942->9982 [:'] [+neg]
-463->257 [:] [+inter]
-463->464 [:] [-inter]
-450->451 [:k]
-448->449 [:']
-449->450 [:e]
-451->452 [:u]
-8257->8258 [e:p]
-7077->7033 [:i] [grd='sup']
-6748->1239 [:] [pos='n']
-6747->1234 [:] [pos='n']
-6744->6745 [i]
-9411->8276 [:] [pos='n']
-10285->7640 [:ng] [+pl]
-10285->10286 [:] [-pl]
-10286->7627 [:ng] [+pas]
-10286->7629 [:r] [+pas]
-1195->1173 [:i]
-1173->1174 [:] [+adj]
-1123->1126 [:] [caso='gui']
-1123->1129 [:] [caso='re']
-6744->6749 [ĩ]
-6743->6744 [t]
-1123->1141 [:] [caso=None]
-1123->1131 [:] [caso='vo']
-1259->860 [:] [caso='pe']
-1894->1234 [:] [pos='n']
-1891->1892 [y]
-10260->9902 [:] [-neg]
-10259->10260 [:] [caso=None]
-9903->9804 [:] [+concom]
-9902->9903 [:] [grd=None]
-794->297 [:] [+conjet]
-1256->1262 [:ng] [+pas]
-8706->8707 [:p]
-553->554 [:] [caso='pe']
-1354->1029 [:i] [grd='supsup']
-1355->960 [:v] [+afir]
-1354->1043 [:r] [grd='supis']
-1354->1034 [:i] [grd='ultsup']
-11905->11922 [nd]
-11905->11906 [nd:n]
-1354->969 [:i] [grd='sup']
-10601->10602 [:] [pos='n']
-11699->11700 [:p]
-11701->89 [:] [-adj,caso='rendape',grd=None,-neg,-pl,pos='n',poses=None]
-9913->9920 [:é]
-8003->3153 [i]
-1920->1921 [:]
-1877->1886 [k]
-7025->6811 [:v] [+fut]
-1923->1285 [:] [pos='n']
-1877->1908 [r]
-1922->1924 [i:í]
-1924->1290 [:] [pos='n']
-1921->1245 [:] [pos='n']
-1922->1923 [i]
-668->304 [:'] [grd='compinf']
-10312->10313 [s]
-10313->10314 [u]
-919->920 [:e]
-10311->10312 [u]
-10310->10311 [r]
-668->428 [:r] [grd='supis']
-10307->10308 [y]
-7945->7948 [:] [-conjet]
-7948->7204 [:v] [+pas]
-7942->7943 [:] [grd=None]
-7943->7238 [:v] [+afir]
-9201->9202 [i]
-5777->5778 [u]
-7945->7946 [:] [+conjet]
-7945->7947 [:] [+conjet]
-5715->5716 [y]
-1157->185 [:i] [grd='supsup']
-6711->6712 [t]
-6713->6714 [ĩ]
-6710->6711 [e]
-6712->6713 [e]
-6704->6710 [p]
-6704->6705 [ng]
-6705->6706 [e]
-6714->1255 [:] [pos='n']
-10092->10093 [:o]
-7344->7345 [:e]
-9677->7225 [:m]
-8573->8618 [:] [caso='gui']
-8573->8628 [:] [caso='re']
-11843->11846 [:']
-10713->10714 [:] [-dim]
-5375->5417 [u:ú]
-11843->11856 [:p]
-7278->7279 [:u]
-7279->7280 [:e]
-7276->7277 [:e]
-7277->7278 [:k]
-9281->9282 [:]
-9282->8888 [:] [pos='n']
-9286->9289 [u:ú]
-9283->9285 [i:í]
-7838->7650 [:'] [caso='ari']
-9286->9288 [y]
-9286->9287 [u]
-9281->9283 [']
-9285->8893 [:] [pos='n']
-506->507 [:a]
-9939->9940 [:] [caso='pe']
-5902->5918 [u]
-1866->1867 [:]
-5842->1267 [:] [pos='n']
-5843->1271 [:] [pos='n']
-11772->82 [:] [-adj,caso='ari',grd=None,-neg,+pl,pos='n',poses=None]
-5864->5865 [i]
-5867->1453 [:] [pos='n']
-5866->5867 [i]
-1867->1239 [:] [pos='n']
-10515->10516 [:] [caso='pe']
-10515->10535 [:y] [caso='ypype']
-1840->9 [:] [pos='n']
-10515->10533 [:i] [caso='ichagua']
-1163->1164 [:u]
-1164->1136 [:a]
-10316->10804 [o]
-1162->1163 [:g]
-10658->7145 [:] [caso='gui']
-10658->7086 [:] [caso='pe']
-1714->1719 [i]
-1721->1245 [:] [pos='n']
-7236->7195 [:] [-inter]
-844->845 [:] [-neg]
-1395->1373 [:r] [caso='rã']
-1718->1267 [:] [pos='n']
-1720->9 [:] [pos='n']
-1714->1722 [e:é]
-4366->4372 [a:á]
-8646->8647 [:a]
-4369->4370 [a]
-4368->9 [:] [pos='n']
-8032->8033 [:e]
-8033->308 [:] [-adj,caso='pype',grd=None,-neg,-pl,pos='n',poses=None]
-7333->7334 [:] [+concom]
-610->611 [:r]
-7987->7988 [v]
-7756->7757 [:k]
-7773->7763 [:v] [+fut]
-8036->8040 [:nd]
-8581->8497 [:] [-conjet]
-8031->8032 [:p]
-1824->1522 [:] [pos='n']
-10597->7615 [:'] [+pas]
-10597->7636 [:r] [+fut,+pas]
-4415->4416 [r]
-10597->7630 [:r] [+fut]
-5467->5468 [y]
-10598->7579 [:'] [+dim]
-10598->7540 [:'] [+dim]
-10597->10599 [:k] [+pas]
-7661->7693 [:v] [+fut]
-10596->10597 [:] [-pl]
-10597->7632 [:r] [+fut,+pas]
-11212->11214 [e:é]
-4412->4413 [r]
-3296->3297 [i]
-7662->7675 [:] [+restr]
-7917->7204 [:v] [+pas]
-1743->1744 [õ]
-1641->1664 [a:á]
-1664->1665 [:]
-7499->7500 [:u]
-7530->7479 [:v] [grd='compsup']
-4011->1239 [:] [pos='n']
-7804->7701 [:] [+conjet]
-7804->7805 [:] [-conjet]
-1641->1642 [a]
-1340->1383 [:y] [caso='ypype']
-2649->2650 [i]
-2649->2651 [i:í]
-1825->1826 [:]
-6827->6828 [:p]
-9482->9484 [a:á]
-6831->6832 [:i]
-2652->2653 [e]
-2647->1234 [:] [pos='n']
-2648->2649 [õ]
-2646->2648 [k]
-2646->2647 [:]
-8676->8677 [:u]
-4379->4380 [n]
-2748->2749 [y]
-2747->1234 [:] [pos='n']
-10010->10001 [:a]
-11669->11670 [:]
-3124->49 [:v] [+pas]
-10807->10336 [:ng] [+pas]
-8164->8165 [:ch]
-8163->8164 [:i]
-2744->2745 [a]
-2749->1234 [:] [pos='n']
-6025->1245 [:] [pos='n']
-6023->6025 [a:á]
-6667->6668 [u]
-6024->9 [:] [pos='n']
-8944->8945 [:]
-8945->8276 [:] [pos='n']
-8946->8947 [i]
-8946->8948 [i:í]
-8952->8953 [:]
-8953->8874 [:] [pos='n']
-11416->11417 [:]
-11417->6848 [:] [+restr]
-4385->1234 [:] [pos='n']
-11793->11795 [:é]
-4380->4381 [a]
-11793->11794 [:e]
-7131->7132 [:] [grd=None]
-10778->10795 [u]
-2304->2305 [a]
-9657->10052 [:k] [+pl]
-2304->2333 [y]
-2304->2322 [i]
-1252->1253 [v]
-8788->8789 [:p]
-8065->8066 [:r]
-8998->9033 [:y] [caso='ypype']
-5062->5063 [y]
-4383->4384 [i]
-4383->4385 [y]
-7030->6847 [:] [+narver]
-1165->1162 [:y] [caso='gua']
-5288->5290 [y:ý]
-4386->1239 [:] [pos='n']
-5289->1234 [:] [pos='n']
-5286->5287 [ã]
-5285->5286 [']
-11721->11722 [:u]
-5287->1276 [:] [pos='n']
-9397->9398 [ch]
-11814->11815 [:a]
-9094->9096 [y:ý]
-9085->9086 [i]
-9596->9604 [e:é]
-9596->9606 [u:ú]
-9084->9085 [u]
-9596->9603 [u]
-341->342 [:a]
-348->349 [:nt]
-9606->8874 [:] [pos='n']
-9604->9605 [:]
-7000->7001 [:s]
-3446->9 [:] [pos='n']
-5334->9 [:] [pos='n']
-2319->2320 [:]
-2310->2319 [a:á]
-2310->2311 [a]
-2306->1234 [:] [pos='n']
-2321->1239 [:] [pos='n']
-10702->10703 [:] [-afir,-concom]
-1544->1608 [y]
-1544->1617 [ã]
-3439->3440 [t]
-8333->8345 [:] [-narver,-restr]
-3438->3439 [y]
-3437->3438 [p]
-3448->3449 [a]
-3447->3448 [v]
-7001->7002 [:a]
-1624->1625 [h]
-10398->7168 [:] [+adj]
-10397->7612 [:r] [+dim]
-9402->9404 [e:é]
-195->196 [:p]
-7007->6797 [:] [+inter]
-6056->6057 [a]
-2326->2327 [e]
-679->680 [:] [+adj]
-553->640 [:i] [caso='ichagua']
-553->656 [:y] [caso='gua']
-8877->8878 [:] [-adj]
-553->638 [:i]
[caso='icha',grd='sup'];[caso='icha',grd='supis'];[caso='icha',grd='ultsup'];[caso='icha',grd='supsup']
-7520->7521 [:] [-afir,-concom]
-7519->7505 [:e] [grd='supsup']
-553->645 [:nd] [caso='ndi']
-553->636 [:g] [caso='gua']
-7519->7506 [:e] [grd='ultsup']
-7519->7520 [:] [grd=None]
-8472->8474 [:é]
-8472->8473 [:e]
-2332->1271 [:] [pos='n']
-9725->9726 [:']
-1451->1452 [i]
-1324->1451 [á]
-1321->1457 [y:ý]
-1321->1322 [y]
-1458->1239 [:] [pos='n']
-1457->1458 [:]
-1322->1323 [:]
-1322->1324 [j]
-1324->1325 [á:a]
-1400->1349 [:v]
-7681->7670 [:p]
-7680->7667 [:p]
-1411->926 [:v] [+pas]
-7698->7675 [:] [+restr]
-7696->7697 [:r]
-1410->945 [:r]
-3878->1267 [:] [pos='n']
-7699->7700 [:] [-inter]
-7698->7699 [:] [-narver,-restr]
-5692->5712 [y:ý]
-6741->6743 [a]
-1148->1149 [:g]
-5072->5073 [:]
-5073->1239 [:] [pos='n']
-7663->7664 [:k]
-8166->170 [:] [-adj,caso='icha',grd=None,-neg,-pl,pos='n',poses=None]
-5067->1245 [:] [pos='n']
-5074->1255 [:] [pos='n']
-5071->1271 [:] [pos='n']
-5066->5067 [:]
-5068->5069 [i]
-5068->5070 [i:í]
-252->223 [:] [+inter]
-11520->9657 [:] [pos='n']
-10921->10922 [:] [-dim]
-43->44 [:] [-inter]
-249->252 [:é]
-1673->1675 [a:á]
-1675->1245 [:] [pos='n']
-1674->9 [:] [pos='n']
-1876->1877 [a]
-5712->5713 [:]
-9089->8803 [:'] [+pas]
-11592->10351 [:] [pos='n']
-5713->1239 [:] [pos='n']
-7281->7258 [:k]
-5706->5708 [r]
-8684->8800 [:r] [+dim]
-3646->1263 [:ng] [+pl]
-7132->7134 [:] [-afir,-concom]
-7132->7133 [:] [+concom]
-4914->9 [:] [pos='n']
-2253->2254 [ỹ]
-9012->8725 [:'] [grd='compinf']
-10124->10125 [:e]
-10122->10123 [:a]
-10611->10636 [n]
-10590->10611 [ã]
-11288->11308 [j]
-3929->1245 [:] [pos='n']
-3483->1285 [:] [pos='n']
-7639->7623 [:é]
-7638->7639 [:u]
-7639->7619 [:e]
-7636->7637 [:ã]
-7637->7638 [:ng]
-7622->7488 [:'] [+neg]
-7622->7530 [:] [-neg]
-7632->7633 [:a]
-7622->7480 [:'] [+neg]
-7206->7207 [:e]
-7205->7206 [:']
-7150->6884 [:] [+concom]
-7223->7224 [:a]
-7210->7211 [:] [+narver]
-7209->7210 [:e]
-9339->9340 [t]
-7207->7208 [:k]
-9347->8874 [:] [pos='n']
-9345->8940 [:] [pos='n']
-810->814 [:] [grd=None]
-4123->1239 [:] [pos='n']
-9446->8987 [:] [pos='n']
-4660->4661 [a]
-4659->4660 [r]
-4662->4663 [r]
-4654->4662 [á]
-4664->2007 [:] [pos='n']
-4663->4664 [a]
-2248->1954 [:] [grd=None,-neg,-pl,pos='n',poses=None]
-4655->4656 [r]
-4654->4659 [á:a]
-6980->6981 [:o]
-4387->1239 [:] [pos='n']
-4384->1234 [:] [pos='n']
-2294->2451 [n]
-8915->8916 [r]
-7108->7109 [:s]
-7271->7261 [:p]
-4697->4699 [y:ý]
-3868->3870 [g]
-9915->9916 [:] [grd='sup']
-3868->3874 [h]
-9729->9714 [:] [-conjet]
-3868->3880 [p]
-10722->10496 [:'] [caso='ari']
-10722->10499 [:i]
[caso='icha',grd='sup'];[caso='icha',grd='supis'];[caso='icha',grd='ultsup'];[caso='icha',grd='supsup']
-10722->10480 [:] [caso='gui']
-10722->10483 [:] [caso='re']
-1628->1876 [s]
-8809->8689 [:'] [caso='ari']
-2073->9 [:] [pos='n']
-8585->8586 [:e]
-1628->1925 [t]
-8586->8587 [:r]
-9843->9845 [:í]
-3699->4226 [á]
-4239->4244 [v]
-2403->9 [:] [pos='n']
+3128->
+3658->
+6780->
+6789->
+6796->
+6801->
+6802->
+6806->
+6817->
+6826->
+6831->
+6832->
+6849->
+6865->
+6897->
+6911->
+6916->
+6935->
+6940->
+6954->
+7017->
+7025->
+7125->
+7186->
+7191->
+7192->
+7196->
+7200->
+7218->
+7230->
+7259->
+7264->
+7270->
+7298->
+7326->
+7375->
+7384->
+7399->
+7422->
+7439->
+7470->
+7484->
+7589->
+7665->
+7670->
+7671->
+7675->
+7679->
+7697->
+7709->
+7738->
+7743->
+7749->
+7777->
+7805->
+8296->
+8301->
+8302->
+8312->
+8336->
+8341->
+8375->
+8395->
+8404->
+8411->
+8416->
+8417->
+8425->
+8452->
+8463->
+8477->
+8482->
+8613->
+8702->
+8707->
+8708->
+8718->
+8742->
+8747->
+8781->
+10704->
+11009->
+11402->
+4749->4751 [a:á]
+6986->6892 [:i]
+5498->1245 [:] [pos='n']
+5497->9 [:] [pos='n']
+5496->5497 [u]
+5496->5498 [u:ú]
+8520->8521 [:s]
+4461->4462 [u]
+5488->5489 [e]
+5488->5494 [e:é]
+10036->7514 [:nd] [caso='ndi']
+6043->6044 [a]
+6042->1255 [:] [pos='n']
+8120->8121 [:a]
+8117->8118 [a:']
+7618->7545 [:y] [caso='ypype']
+8119->8120 [:ng]
+6046->1299 [:] [pos='n']
+6045->6046 [ẽ]
+6027->6031 [r]
+6027->6034 [s]
+10343->10344 [a]
+10343->10367 [i]
+10163->10164 [:] [-adj]
+9224->9225 [u]
+9223->8933 [:] [pos='n']
+9222->9223 [:]
+9226->8933 [:] [pos='n']
+9227->8937 [:] [pos='n']
+9225->9227 [e:é]
+9225->9226 [e]
+10998->7363 [:]
[caso='icha',grd=None];[caso='icha',grd='compinf'];[caso='icha',grd='compsup']
+10998->7356 [:] [caso='gui']
+9441->9442 [r]
+10998->7366 [:] [caso='ve']
+10998->7359 [:] [caso='re']
+10998->7354 [:] [caso='pe']
+10539->10540 [:u]
+10540->10541 [:e]
+10578->10579 [:ã]
+10579->10580 [:ng]
+592->271 [:] [+conjet]
+592->297 [:] [+conjet]
+594->595 [:] [-narver,-restr]
+9930->9794 [:'] [grd='compinf']
+9930->9891 [:v] [grd='compsup']
+593->281 [:v] [+pas]
+593->289 [:v] [+fut]
+593->594 [:]
+594->220 [:] [+narver]
+591->592 [:] [-afir,-concom]
+5829->9 [:] [pos='n']
+10297->10298 [k]
+2391->2392 [:]
+2391->2393 [r]
2388->2389 [u]
-3699->4239 [ó]
-3699->4236 [é]
+2389->2390 [nd]
2390->2391 [u]
-4644->4645 [r]
-2402->2404 [u:ú]
-2404->1245 [:] [pos='n']
-2294->2823 [o:ó]
-4971->1954 [:] [pos='n']
-2434->1940 [:] [pos='n']
-4969->4971 [a:á]
-10999->7540 [:'] [+dim]
-11604->10274 [:] [pos='n']
-11602->11604 [y:ý]
-8213->1047 [:] [-adj,caso='ari',grd=None,-neg,+pl,pos='n',poses=None]
-6169->6171 [y:ý]
-5608->5692 [v]
-10999->7611 [:m] [+dim]
-7179->7234 [:] [-conjet]
-5608->5615 [h]
-11613->11615 [i:í]
-11602->11603 [y]
-7269->7259 [:e]
-4739->4740 [u]
-4738->4739 [h]
-4652->4681 [y]
-4652->4653 [e]
-3631->3632 [']
-9750->9673 [:] [+conjet]
-10209->9750 [:] [-afir,-concom]
-10209->9670 [:] [+concom]
-10209->9694 [:v] [+afir]
-10208->10209 [:] [grd=None]
-9189->9190 [o]
-10047->10041 [:é]
-770->771 [:] [-conjet]
-769->747 [:] [-conjet]
-7332->7330 [:v] [grd='compsup']
-3876->1245 [:] [pos='n']
-2871->1245 [:] [pos='n']
-7834->7719 [:'] [grd='compinf']
-2870->9 [:] [pos='n']
-2030->2031 [e]
-2193->2195 [a:á]
-2874->2876 [o:ó]
-9956->9957 [:e]
-9957->9958 [:r]
-9958->9959 [:e]
-9959->9960 [:i]
-2195->1245 [:] [pos='n']
-9960->9961 [:r]
-9961->9962 [:a]
-10496->7651 [:á]
-10048->7631 [:ã]
-7611->7582 [:i]
-1931->1271 [:] [pos='n']
-7540->7541 [:i]
-7540->7549 [:í]
-5781->1245 [:] [pos='n']
-8709->8710 [:o]
-8703->8704 [:p]
-8700->8701 [:k]
-6869->6870 [:r]
-1926->1927 [:]
-6873->6874 [:]
-9067->8874 [:] [pos='n']
-9065->9067 [a:á]
-5206->5219 [a]
-5206->5237 [r]
-5242->1995 [:] [pos='n']
-5241->5242 [a]
-6741->6742 [:]
-11899->3657 [:] [-adj,caso='pe',grd=None,-neg,+pl,pos='n',poses=None]
-5206->5208 [']
-6742->1940 [:] [pos='n']
-5206->5227 [k]
-5206->5222 [j]
-6983->6920 [:] [+restr]
-2171->2172 [y]
-2172->1234 [:] [pos='n']
-8792->8733 [:t]
-8764->8765 [:r]
-8765->8766 [:e]
-10590->10608 [y]
-10967->10968 [u]
-2166->2167 [v]
-10287->10288 [:] [-dim]
-2171->2173 [y:ý]
-7619->7620 [:] [-dim]
-6230->1239 [:] [pos='n']
-8269->9645 [ú]
-8269->9648 [y:ý]
-11572->10269 [:] [pos='n']
-10964->10965 [y]
-11573->10274 [:] [pos='n']
-467->220 [:] [+narver]
-466->467 [:]
-7619->7611 [:m] [+dim]
-681->684 [:] [caso='gui']
-9202->9206 [r]
-9202->9203 [k]
-1292->1293 [:] [-dim]
-11556->11557 [a]
-9203->9205 [u:ú]
-1549->1239 [:] [pos='n']
-11550->10395 [:] [pos='n']
-3815->3816 [õ]
-9198->8888 [:] [pos='n']
-11528->9657 [:] [pos='n']
-10051->7637 [:ã]
-11529->10255 [:] [pos='n']
-1750->9 [:] [pos='n']
-1747->1748 [e]
-10854->10173 [:'] [+pas]
-5561->5568 [ó]
-8880->8271 [t]
-549->438 [:'] [+neg]
-5561->5566 [ó:o]
-5561->5562 [o]
-5560->5561 [v]
-5572->1234 [:] [pos='n']
-7360->7361 [:u]
-7359->7360 [:g]
-7358->7071 [:e]
-9470->9471 [a]
-549->494 [:'] [+neg]
-548->549 [:] [caso=None]
-9432->9433 [a]
-7538->7539 [:p]
-11101->11102 [r]
-11111->10395 [:] [pos='n']
-11745->89 [:] [-adj,caso='pe',grd=None,-neg,-pl,pos='n',poses=None]
-10492->7717 [:v] [+afir]
-11098->11099 [y]
-8529->8530 [:] [-narver,-restr]
-11096->11097 [:]
-11096->11098 [p]
-11103->10410 [:] [pos='n']
-10960->10964 [t]
-1235->875 [:r] [+fut,+pas]
-198->199 [:e]
-1235->716 [:r] [+fut]
-5951->5981 [u:ú]
-5441->5476 [u]
-5414->2007 [:] [pos='n']
-5409->5410 [r]
-9058->8862 [:'] [+pas]
-9058->8870 [:k] [+pas]
-647->648 [:p]
-646->647 [:y]
-5412->5413 [r]
-5408->5409 [á:a]
-4105->4106 [nd]
-9658->10033 [:'] [+pas]
-3359->3360 [a]
-3358->3359 [r]
-3520->1239 [:] [pos='n']
-3518->3520 [o:ó]
-10091->10071 [:] [+conjet]
-3519->1234 [:] [pos='n']
-3518->3519 [o]
-3521->3527 [y:ý]
-5231->1234 [:] [pos='n']
-5232->1239 [:] [pos='n']
***The diff for this file has been truncated for email.***
=======================================
--- /l3xdg/languages/gn/
chunk.gr Wed Feb 5 00:32:05 2014 UTC
+++ /l3xdg/languages/gn/
chunk.gr Mon Feb 10 21:51:55 2014 UTC
@@ -36,6 +36,7 @@
tasp=
[-cont]; cont=[0]
[+cont]; cont=[1]
+ [+impf]; tmp=[1]
asp=
[-asev]; prf=[0]
[+asev]; prf=[1]
@@ -73,8 +74,9 @@
tmp=
[0]; tmp=pres
[1]; tmp=pret
- # only one preterite form for now: -'akue
+ # only two preterite forms for now: -'akue, -!mi
[1]; tasp=[+perf]
+ [1]; tasp=[+impf]
cont=
[1]; tasp=[+cont]
prf=
=======================================
--- /l3xdg/languages/gn/n_chunk.inst Fri Oct 18 07:05:55 2013 UTC
+++ /l3xdg/languages/gn/n_chunk.inst Mon Feb 10 21:51:55 2014 UTC
@@ -363,7 +363,6 @@
& guyry nas=0
& guyryry nas=0
& guéi nas=0
-& ha'e nas=0
& haguã nas=1
& haiha nas=0
& haihára nas=0
=======================================
--- /l3xdg/node.py Wed Feb 5 00:32:05 2014 UTC
+++ /l3xdg/node.py Mon Feb 10 21:51:55 2014 UTC
@@ -146,15 +146,6 @@
entries.extend(self.lexicon.incorp_analyses(self.analyses,
self.agree,
word=self.form,
problem=self.problem))
# entries.extend(self.lexicon.lexicalize(self.form, clone=True,
indices=lex_indices))
- if len(entries) > 1:
- if verbosity:
- print("{} analyses for {}".format(len(entries), self))
-# for a in self.analyses:
-# print(a)
- # Set probabilities for different analyses
- total = sum([e.count for e in entries])
- for e in entries:
- e.prob = e.count / total
print('Entries before crossling inh: {}'.format(entries))
@@ -200,8 +191,24 @@
if self.languages and to_incorp:
self.lexicon.incorp_cross_inh(self.word, to_incorp)
+ # Set probabilities on the basis of lex xcounts
+ if len(self.entries) > 1:
+ if verbosity:
+ print("Setting probabilities for {}
entries".format(len(self.entries)))
+ total = sum([e.xcount for e in self.entries])
+ for e in self.entries:
+ e.prob = e.xcount / total
+
else:
self.entries = entries
+ # Set entry probabilities on the basis of lex counts
+ if len(entries) > 1:
+ if verbosity:
+ print("Setting probabilities for {}
entries".format(len(entries)))
+ # Set probabilities for different analyses
+ total = sum([e.count for e in entries])
+ for e in entries:
+ e.prob = e.count / total
# for e in self.entries:
# if e.crosslexes:
@@ -234,7 +241,7 @@
# e.prob *= e.count / total
# print(' {}: count {}, prob {}'.format(e, e.count, e.prob))
self.lexvar = IVar(lexvar_name,
- set(range(len(self.entries))),
+ range(len(self.entries)),
problem=self.problem, rootDS=self.dstore)
def rank(self, verbosity=0):
=======================================
--- /l3xdg/variable.py Wed Feb 5 00:32:05 2014 UTC
+++ /l3xdg/variable.py Mon Feb 10 21:51:55 2014 UTC
@@ -439,7 +439,13 @@
Variable.__init__(self, name, problem=problem,
dstores=dstores, rootDS=rootDS,
weight=weight, principle=principle)
- self.init_domain = init_domain or ALL.copy()
+ # init_domain could be a list
+ if init_domain:
+ if not isinstance(init_domain, set):
+ init_domain = set(init_domain)
+ else:
+ init_domain = ALL.copy()
+ self.init_domain = init_domain
if any([isinstance(x, tuple) for x in self.init_domain]) and \
any([isinstance(x, int) for x in self.init_domain]):
print('Warning: mixed domain {}: {}'.format(self,
self.init_domain))
@@ -812,6 +818,8 @@
else:
self.lower_domain = set()
if upper_domain != None:
+ if not isinstance(upper_domain, set):
+ upper_domain = set(upper_domain)
self.upper_domain = upper_domain
else:
self.upper_domain = ALL.copy()
=======================================
--- /l3xdg/xdg.py Wed Feb 5 00:32:05 2014 UTC
+++ /l3xdg/xdg.py Mon Feb 10 21:51:55 2014 UTC
@@ -127,6 +127,9 @@
# -- Segmentation of words during tokenization fixed: analyze() and
record_pre_arcs().
# Form that remains is now generated (it may different from root
because other affixes
# may not be separated).
+# 2014.02.04
+# -- Method (record_solution()), which records occurrence of entries in a
selected
+# solution.
#########################################################################
# imports search
@@ -1065,10 +1068,15 @@
print('{} ~ {}: {}'.format(sol1, sol2, diffs))
n += 1
-# def record_solution(self, solution):
-# """Record various aspects of a solution (instance of Multigraph).
-# """
-# for entry in solution.entries.values():
-# pass
+ def record_solution(self, solution):
+ """Record various aspects of a solution (instance of Multigraph).
+ """
+ # Add 1 to the count for each solution's entry
+ for entry in solution.entries.values():
+ entry.count += 1
+ if entry.names:
+ # This is a multilingual entry
+ entry.xcount += 1
+