Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

GrammarCalls::GrammarCalls Class Reference

List of all members.

Public Member Functions

 __init__ ()
 get_new_sentence (permuted, permtype, level, checkPerm=False)
 get_all_permutations (sentNode, permtype, level)
 get_wrong_replacements (constNodeList, index, maxRes)
 get_correct_replacements (const, maxRes)
 check_permutation (constNode1, constNode2, permtype, level)
 reparse_sent_surface (ConstNodeList, level=0)
 reparse_node (constNode)
 _generate_repl_query (const, ignoreFeats=[], notEqual=[])

Member Function Documentation

GrammarCalls::GrammarCalls::__init__  ) 
 

initializes the grammar wrapper and the prolog description parser

GrammarCalls::GrammarCalls::_generate_repl_query const  ,
ignoreFeats  = [],
notEqual  = []
 

generates a prolog query to get (wrong or correct) replacements for const; the replacements are always of the same ConstNode type as const 'ignoreFeats' are the features of const that can be ignored 'notEqual' are the features whose values mustn't match the values of const

GrammarCalls::GrammarCalls::check_permutation constNode1  ,
constNode2  ,
permtype  ,
level 
 

takes two ConstNodes and checks whether they are legal permutations of each other returns a list of messages (strings)

GrammarCalls::GrammarCalls::get_all_permutations sentNode  ,
permtype  ,
level 
 

takes a sentence ConstNode and permutation restrictions returns a list of all legal permutations converted to ConstNodes

GrammarCalls::GrammarCalls::get_correct_replacements const  ,
maxRes 
 

takes a ConstNode and generates a list of maxRes ConstNodes, that are of the same type as the node and can replace it; if less than maxRes replacements are found, the results are still returned

GrammarCalls::GrammarCalls::get_new_sentence permuted  ,
permtype  ,
level  ,
checkPerm  = False
 

presents a new sentence from the grammar as a ConstNode root; parameters 'permuted', 'permtype' and 'level' affect the possible order of the sentence constituents if checkPerm is set to True, only sentences that can be legally permuted will be returned

GrammarCalls::GrammarCalls::get_wrong_replacements constNodeList  ,
index  ,
maxRes 
 

takes a ConstNode and returns a list of maxRes ConstNodes, which are of the same type as the node, but can *not* replace it; if less than maxRes relacements are found, the results are still returned

GrammarCalls::GrammarCalls::reparse_node constNode   ) 
 

takes a ConstNode and checks whether its structure is accepted by the grammar; returns True or False NOTE: This function also checks the node structure, not only the surface

GrammarCalls::GrammarCalls::reparse_sent_surface ConstNodeList  ,
level  = 0
 

takes a List of ConstNodes and checks whether their surfaces form a legal sentence; level can be specified to make some permutations illegal returns True or False


The documentation for this class was generated from the following file:
Generated on Tue Jul 19 23:31:00 2005 for WoWi by  doxygen 1.3.9.1