You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a UTF8-encoded `.cfg` file that contains your grammar, such as the following:
46
-
45
+
By default, the parser will assume that you distinguish non-terminals from terminals by capitalizing them. You can also add a custom category handler if you call the API from Java code.
46
+
47
+
Create a UTF8-encoded `.cfg` file that contains your grammar, such as the following:
47
48
48
49
```
49
50
# grammar.cfg
50
51
51
-
S -> NP VP (1.0) # Use '->'
52
+
S -> NP VP (1.0) # Use '->'
52
53
NP → i (0.5) # or '→'
53
54
VP → eat # probability defaults to 1.0
54
55
```
55
56
56
-
By default, the parser will assume that you distinguish non-terminals from terminals by capitalizing them. You can also add a custom category handler if you call the API from Java code.
57
-
57
+
58
58
Execute runnable jar on the terminal:
59
59
```
60
60
probabilistic-earley-parser-jar-with-dependencies.jar -i grammar.cfg -goal S I EAT
0 commit comments