Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (38 sloc) 1.58 KB

Parser

Parse a line of text or an article and identify groups of words or phrases that go together (see Penn Treebank tag set for legend of token types).

Usage:

$ ./parser.sh 
No parameter has been passed. Please see usage below:

       Usage: ./parser.sh --text [text]
                 --file [path/to/filename]
                 --help

       --text      plain text surrounded by quotes
       --file      name of the file containing text to pass as command arg
       --help      shows the script usage help text

Examples:

./parser.sh --text "The quick brown fox jumps over the lazy dog ."
Checking if model en-parser-chunking.bin (en) exists...
Found model en-parser-chunking.bin (en)
Loading Parser model ... done (7.499s)
(TOP (NP (NP (DT The) (JJ quick) (JJ brown) (NN fox) (NNS jumps)) (PP (IN over) (NP (DT the) (JJ lazy) (NN dog))) (. .)))


Average: 8.6 sent/s
Total: 1 sent
Runtime: 0.116s
Execution time: 7.903 seconds

Check out https://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html
  to find out what each of the tags mean

Similarly a file containing text can be passed in as:

$ ./parser.sh --file article.txt

Contributing

Contributions are very welcome, please share back with the wider community (and get credited for it)!

Please have a look at the CONTRIBUTING guidelines, also have a read about our licensing policy.


Back to main page (table of contents)

You can’t perform that action at this time.