module documentation

CCG Lexicons

Class CCGLexicon Class representing a lexicon for CCG grammars.
Class Token Class representing a token.
Function augParseCategory Parse a string representing a category, and returns a tuple with (possibly) the CCG variable for the category
Function fromstring Convert string representation into a lexicon for CCGs.
Function matchBrackets Separate the contents matching the first set of brackets from the rest of the input.
Function nextCategory Separate the string for the next portion of the category from the rest of the string
Function parseApplication Parse an application operator
Function parseLexicon Undocumented
Function parsePrimitiveCategory Parse a primitive category
Function parseSubscripts Parse the subscripts for a primitive category
Constant APP_RE Undocumented
Constant COMMENTS_RE Undocumented
Constant LEX_RE Undocumented
Constant NEXTPRIM_RE Undocumented
Constant PRIM_RE Undocumented
Constant RHS_RE Undocumented
Constant SEMANTICS_RE Undocumented
Variable openccg_tinytiny Undocumented
def augParseCategory(line, primitives, families, var=None): (source)

Parse a string representing a category, and returns a tuple with (possibly) the CCG variable for the category

def fromstring(lex_str, include_semantics=False): (source)

Convert string representation into a lexicon for CCGs.

def matchBrackets(string): (source)

Separate the contents matching the first set of brackets from the rest of the input.

def nextCategory(string): (source)

Separate the string for the next portion of the category from the rest of the string

def parseApplication(app): (source)

Parse an application operator

@deprecated('Use fromstring() instead.')
def parseLexicon(lex_str): (source)

Undocumented

def parsePrimitiveCategory(chunks, primitives, families, var): (source)

Parse a primitive category

If the primitive is the special category 'var', replace it with the correct CCGVar.

def parseSubscripts(subscr): (source)

Parse the subscripts for a primitive category

Undocumented

Value
re.compile(r'([\\/])([\.,]?)([\.,]?)(.*)')
COMMENTS_RE = (source)

Undocumented

Value
re.compile(r'([^#]*)(?:#.*)?')

Undocumented

Value
re.compile(r'([\S_]+)\s*(::|[-=]+>)\s*(.+)',
           re.UNICODE)
NEXTPRIM_RE = (source)

Undocumented

Value
re.compile(r'([A-Za-z]+(?:\[[A-Za-z,]+\])?)(.*)')

Undocumented

Value
re.compile(r'([A-Za-z]+)(\[[A-Za-z,]+\])?')

Undocumented

Value
re.compile(r'([^\{\}]*[^ \{\}])\s*(\{[^\}]+\})?',
           re.UNICODE)
SEMANTICS_RE = (source)

Undocumented

Value
re.compile(r'\{([^\}]+)\}',
           re.UNICODE)
openccg_tinytiny = (source)

Undocumented