Exemplo n.º 1
0
 def mk_field(self, cname, subclass=None):
     """
     For a given lexical class, return the name of its feature in the
     CSV file
     """
     subclass_elems = [subclass] if subclass else []
     name = "_".join([self.key_prefix(), cname] + subclass_elems)
     helptxt = "boolean (subclass of %s)" % cname if subclass else "boolean"
     return Key.discrete(name, helptxt)
Exemplo n.º 2
0
 def mk_field(self, cname, subclass=None):
     """
     For a given lexical class, return the name of its feature in the
     CSV file
     """
     subclass_elems = [subclass] if subclass else []
     name = "_".join([self.key_prefix(), cname] + subclass_elems)
     helptxt = "boolean (subclass of %s)" % cname if subclass else "boolean"
     return Key.discrete(name, helptxt)
Exemplo n.º 3
0
 def mk_field(self, entry):
     "From verb class to feature key"
     name = '_'.join([self.key_prefix(), entry])
     return Key.discrete(name, "Inquirer " + entry)
Exemplo n.º 4
0
 def mk_field(self, ventry):
     "From verb class to feature key"
     name = '_'.join([self.key_prefix(), ventry.classname])
     return Key.discrete(name, "VerbNet " + ventry.classname)
Exemplo n.º 5
0
 def mk_field(self, rel):
     "From relation name to feature key"
     name = '_'.join([self.key_prefix(), rel])
     return Key.discrete(name, "pdtb " + rel)
Exemplo n.º 6
0
 def __init__(self):
     desc = self.__doc__.strip()
     keys =\
         [Key.meta("id",
                   "some sort of unique identifier for the EDU")]
     super(SingleArgSubgroup_Meta, self).__init__(desc, keys)
Exemplo n.º 7
0
 def __init__(self):
     desc = self.__doc__.strip()
     keys =\
         [Key.meta("document", "document the relation appears in"),
          Key.meta("id", "id for this relation")]
     super(RelSubGroup_Core, self).__init__(desc, keys)
Exemplo n.º 8
0
 def __init__(self):
     desc = self.__doc__.strip()
     keys = [Key.meta("text",
                      "text from DU1 start to DU2 end [debug only]")]
     super(RelSubgroup_Debug, self).__init__(desc, keys)
Exemplo n.º 9
0
 def __init__(self):
     desc = self.__doc__.strip()
     keys = [Key.meta("text", "EDU text [debug only]")]
     super(SingleArgSubgroup_Debug, self).__init__(desc, keys)
Exemplo n.º 10
0
 def mk_field(self, entry):
     "From verb class to feature key"
     name = '_'.join([self.key_prefix(), entry])
     return Key.discrete(name, "Inquirer " + entry)
Exemplo n.º 11
0
 def mk_field(self, ventry):
     "From verb class to feature key"
     name = '_'.join([self.key_prefix(), ventry.classname])
     return Key.discrete(name, "VerbNet " + ventry.classname)
Exemplo n.º 12
0
 def mk_field(self, rel):
     "From relation name to feature key"
     name = '_'.join([self.key_prefix(), rel])
     return Key.discrete(name, "pdtb " + rel)