Skip to content

Commit

Permalink
change directory and NER file link
Browse files Browse the repository at this point in the history
  • Loading branch information
brandontlocke committed Apr 27, 2018
1 parent 92a6daa commit ef583a0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
Batch script for Named Entity Recognition

# Folder Setup
── project folder
├── stanford-er-2018-02-27
├── file1.txt
├── file2.txt
├── file1.txt
├── file2.txt
│ ├── cgi
│ │ ├── cgi0.sh


── project folder

├── batchner.sh
├── file1.txt
├── file2.txt
├── file3.txt
├── file4.txt

── pr
2 changes: 1 addition & 1 deletion batchner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ for file in *.txt

do

nertext=$(../stanford-ner-2017-06-09/ner.sh $file)
nertext=$(stanford-ner-2018-02-27/ner.sh $file)

echo $nertext | egrep -o "(([[:alnum:]]|\.)+/ORGANIZATION([[:space:]]|$))+" | sed 's/\/ORGANIZATION//g' | sort | uniq -c | awk -v name=${file##*/} '{printf name ","; for (i = 2; i < NF; i++) printf $i " "; printf $NF; printf "," "organization" ","; printf $1; print ""}' >> entities.csv

Expand Down

0 comments on commit ef583a0

Please sign in to comment.