Beispiel #1
0
 def parse(self, sentence):
     return [
         as_featurestruct(r, s) for r, s in self.analyzer.parse(sentence)
     ]
Beispiel #2
0
def test_remote(sentence='Robot1, move to location 1 2!'):
    analyzer = ServerProxy('http://localhost:8090')
    return [as_featurestruct(r, s) for r, s in analyzer.parse(sentence)]
Beispiel #3
0
def test_remote(sentence='Robot1, move to location 1 2!'):
    from feature import as_featurestruct
    a = ServerProxy('http://localhost:8090')
    d = a.parse(sentence)
    s = as_featurestruct(d[0])
    return s
 def parse(self, sentence):        
     return [as_featurestruct(r, s) for r, s in self.analyzer.parse(sentence)]
Beispiel #5
0
def test_local(sentence='Robot1, move to location 1 2!'):
    from feature import as_featurestruct
    a = Analyzer('grammar/robots.prefs')
    d = a.parse(sentence)
    s = as_featurestruct(d[0])
    return s
Beispiel #6
0
def test_remote(sentence='Robot1, move to location 1 2!'):
    from feature import as_featurestruct
    a = ServerProxy('http://localhost:8090')
    d = a.parse(sentence)
    s = as_featurestruct(d[0])
    return s
Beispiel #7
0
def test_local(sentence='Robot1, move to location 1 2!'):
    from feature import as_featurestruct
    a = Analyzer('grammar/robots.prefs')
    d = a.parse(sentence)
    s = as_featurestruct(d[0])
    return s