Content-Length: 253557 | pFad | http://github.com/Tikquuss/eulascript/commit/e526a78dca8aa81159dfde64c8a4ecbfde3f057a

E4 add notebook · Tikquuss/eulascript@e526a78 · GitHub
Skip to content

Commit

Permalink
add notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Tikquuss committed Aug 19, 2020
1 parent ac2ae1a commit e526a78
Show file tree
Hide file tree
Showing 3 changed files with 341 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ path_to_eula=my/eula.txt,my/eula.md,my/eula.pdf,my/eula.docx
python eulascript/eula.py --model_folder $model_folder --path_to_eula $path_to_eula --output_dir $output_dir
```

**Note**: the [samples](samples) folder contains some user licenses and a [notebook](samples/notebook.ipynb) illustrating
**Note**: the [samples](samples) folder contains some user licenses and a [notebook](notebook.ipynb) illustrating all.

4 changes: 4 additions & 0 deletions eula.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def main(params):
predict_method = get_ktrain_predict_method(ktrain_predictor = ktrain.load_predictor(params.model_folder))

for eula_file in params.eula_files :

print("============ eula_file : ", eula_file, " ============")

clause_list = get_content(eula_file)

Expand All @@ -49,6 +51,8 @@ def main(params):
i += 1
csv_file = file_name+'.'+str(i)+'.csv'

print("============ csv_file : ", csv_file, " ============")

pd.DataFrame(zip(clause_list, labels, probabilities)).to_csv(csv_file, header= ["clauses", "labels", "probabilities"])

if __name__ == '__main__':
Expand Down
Loading

0 comments on commit e526a78

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Tikquuss/eulascript/commit/e526a78dca8aa81159dfde64c8a4ecbfde3f057a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy