Beispiel #1
0
 def __init__(self, model):
     Cmd.__init__(self)
     self.prompt = 'bllip> '
     if model is None:
         print("Warning: no parsing model to load.")
         print("Specify with: python -mbllipparser.ParsingShell " + \
               "/path/to/model/")
         self.rrp = None
     else:
         sys.stdout.write("Loading models... ")
         sys.stdout.flush()
         self.rrp = RerankingParser.from_unified_model_dir(model)
         print("done!")
     print("Enter a sentence to see its parse or 'help' for more options.")
     self.last_nbest_list = []
     self.options = {}
     self.sd = None
Beispiel #2
0
 def __init__(self, model):
     Cmd.__init__(self)
     self.prompt = 'rrp> '
     print "Loading models..."
     self.rrp = RerankingParser.load_unified_model_dir(model)
     self.last_nbest_list = []