Using data from lawinsider (samples of contracts) need to create classifier which predict using sample paragraph (or major part of text) to which section of contract it belongs to.
So here is TODO list:
- Load data from lawinsider.
Note. The're few types of files such as .docx and .pdf.
-
Parse data and mark headers, paragraphs, sections, subsections, lists (only one level of subsections!).
-
Create and train few models.
-
Get the F1 scores of each model on independent data.
-
Boost the scores!
Parse your folder with data and create in this folder (folder with your data) new directory parsed_data
with .txt which will store text with tags.
Example:
python3 file_parser.py --folder <data folder> --output <output folder>
file_parser.py
paramenters:
-
--folder
-- folder which will be parsed; -
--size
-- (optional) total amount of files in folder which will be parsed; -
--output
-- folder where will be stored tagged data; -
--file
-- (optional) file which will be parsed and parsing content will be printed to stdout; -
--color
-- (optional) enables color output to stdout;
NOTE: there is no conflicts between paramenters --file
and --folder
- Data - lawinsider.com/education