Closed CarolLi closed 5 years ago
Sure, you can pass as many text files as you like, or a directory of text files, or a glob pattern.
Sure, you can pass as many text files as you like, or a directory of text files, or a glob pattern.
I think I know how to do, thank you. I may can deal with command like this python -m tupa directory_of_text_files/*.txt -m <model_filename>
.
If you want to parse example1.txt
, example2.txt
and example3.txt
, use this command:
python -m tupa example1.txt example2.txt example3.txt -m <model_filename>
Alternatively, you can run:
python -m tupa example*.txt -m <model_filename>
Or if you have a directory example_dir
with text files in it, run:
python -m tupa example_dir -m <model_filename>
Let me know if you have any more questions.
If you want to parse
example1.txt
,example2.txt
andexample3.txt
, use this command:python -m tupa example1.txt example2.txt example3.txt -m <model_filename>
Alternatively, you can run:
python -m tupa example*.txt -m <model_filename>
Or if you have a directory
example_dir
with text files in it, run:python -m tupa example_dir -m <model_filename>
Let me know if you have any more questions.
Thank you! Another question about batch processing has raised just now. If I have multiple directories of examples, how can I do the parsing at once?
Same idea:
python -m tupa example_dir1 example_dir2 -m <model_filename>
Same idea:
python -m tupa example_dir1 example_dir2 -m <model_filename>
Thank you very much!
The parser runs very slow using
python -m tupa example.txt -m <model_filename>
. I think the reason is that the modelucca-bilstm
needs to be loaded every time the command runs, and I have lots of files. Therefore, is there a way that I could parse all my text files once the model loaded?