From 951ff19bf95f9421fb37239f6b03d9a9bbc75fcc Mon Sep 17 00:00:00 2001 From: Jeff Yates Date: Sat, 24 Oct 2020 14:23:04 -0400 Subject: [PATCH] updated README --- README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2875362..f52b75d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,38 @@ # pat-dissertation -Code for Pat's dissertation. \ No newline at end of file +Code for Pat's dissertation. + +## sorter.rb usage +### Options +sorter.rb takes the following options: +| option | usage | +| -f, --file | the name of the input file | +| -b, --bin-file | the name of the bin csv file | +| -t, --type | what type of splitting to do, can be "iat" or "pn" | + +### Output +sorter.rb will generate two files: + * [filename]-out.json + * [filename]-out.csv + +Both files contain the same data in json or csv format. + +### Type options +The program has two filtering modes: + +#### iat +This mode grabs all text from the input file in between `PLOVEOPENING` and `PLOVECLOSING`. +It ignores all text before `PLOVEOPENING` and after `PLOVECLOSING`. +It does not support multiple sections of text. + +#### pn +This mode grabs each section of text from the input file in between `Narrative:` and `Signatures:`. +It supports multiple sections from a single input text file. + +### Example: +`./sorter.rb --file tester.txt --bin-file bins.csv --type iat` + +The above command will run against `tester.txt`, count strings according to `bins.csv`, and process the input text in `iat` mode. +It will create `tester-out.json` and `tester-out.csv` containing the output data. + +