-
-
Save joyoyoyoyoyo/c24baf1ba7df0406c3c5252bc11ed512 to your computer and use it in GitHub Desktop.
peel-nlp - series of scripts to turn https://sites.google.com/a/ualberta.ca/opendata/data into https://www.google.com/maps/d/u/0/edit?mid=z92YH-I0oPAM.k4BoSsNm1qP0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sort corpus_locations.csv | uniq -c | sort -nr > corpus_locations_count.tsv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt-get install xpath | |
| for file in $(find . -iname '*.xml') | |
| do | |
| echo $file | |
| xpath -e '//note/text()' $file > $file.txt | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for file in $(find . -iname '*.ner') | |
| do | |
| echo $file | |
| awk -F 'START:location>|<END' '{print $2}' $file >> corpus_locations.csv | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for file in $(find . -iname '*.txt') | |
| do | |
| echo $file | |
| /root/apache-opennlp-1.5.3/bin/opennlp TokenNameFinder /root/apache-opennlp-1.5.3/bin/en-ner-location.bin < $file > $file.ner | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment