I have a python program, a parser, that reads in a text file that contains a list of sentences and outputs a parse tree corresponding to each sentence to stdout. For example, if one of the sentences in the text file is:
"take the blue cube"
the program will output the following parse tree result:
'(S(Verb take)(NP(Det the)(Adj blue)(Noun cube)))'
My question is that my program should be able to handle the following command line:
> - Parse file1 file2
where: file1 is a file that contains a set of sentences to parse file2 is a file that contains parsed results
I would appreciate if someone could let me know what the 'Parse' command does and/or give me a general idea of what needs to be done to incorporate it into my python program. I'm new to command line, so I'm not sure if this is a unix command that I don't know about. Does this mean that my program needs to read in the text file1 with sentences and redirect the results to file2?
Thanks in advance for the help!
Aucun commentaire:
Enregistrer un commentaire