Commit 6e165826 authored by Thomas Huetter's avatar Thomas Huetter

fixed names in sentiment and bolzano streets

parent db8be93b
...@@ -23,15 +23,15 @@ cd original_data ...@@ -23,15 +23,15 @@ cd original_data
# prepare data for file L.trees # prepare data for file L.trees
# convert file into UTF-8 format | remove header | remove IDs | sort by number of nodes (equivalent to number of "{") # convert file into UTF-8 format | remove header | remove IDs | sort by number of nodes (equivalent to number of "{")
iconv -f ISO-8859-1 -t "UTF-8" L.trees | tail -n +14 | sed 's/.*://' | awk '{print gsub("{","{"), $0}' | sort -n | cut -d' ' -f2- > ../L_preprocessed.bracket iconv -f ISO-8859-1 -t "UTF-8" L.trees | tail -n +14 | sed 's/.*://' | awk '{print gsub("{","{"), $0}' | sort -n | cut -d' ' -f2- > ../L_preprocessed.txt
# prepare data for file R.trees # prepare data for file R.trees
# convert file into UTF-8 format | remove header | remove IDs | sort by number of nodes (equivalent to number of "{") # convert file into UTF-8 format | remove header | remove IDs | sort by number of nodes (equivalent to number of "{")
iconv -f ISO-8859-1 -t "UTF-8" R.trees | tail -n +14 | sed 's/.*://' | awk '{print gsub("{","{"), $0}' | sort -n | cut -d' ' -f2- > ../R_preprocessed.bracket iconv -f ISO-8859-1 -t "UTF-8" R.trees | tail -n +14 | sed 's/.*://' | awk '{print gsub("{","{"), $0}' | sort -n | cut -d' ' -f2- > ../R_preprocessed.txt
# prepare dataset with a single label # prepare dataset with a single label
# | remove non-bracket chars. | add single dummy label 'o' > save to file # | remove non-bracket chars. | add single dummy label 'o' > save to file
cat ../L_preprocessed.txt | sed 's/[^\{\}]//g' | sed 's/[\{]/\{o/g' > ../L_preprocessed_single_label.bracket cat ../L_preprocessed.txt | sed 's/[^\{\}]//g' | sed 's/[\{]/\{o/g' > ../L_preprocessed_single_label.bracket
# go back to the folder # go back to the folder
cd .. cd ..
\ No newline at end of file
...@@ -23,7 +23,7 @@ cd trees ...@@ -23,7 +23,7 @@ cd trees
# prepare data for file L.trees # prepare data for file L.trees
# convert dev.txt and train.txt into UTF-8 format | replace ( by { | replace ) by } | remove whitespace before '{' | sort by number of nodes (equivalent to number of "{") # convert dev.txt and train.txt into UTF-8 format | replace ( by { | replace ) by } | remove whitespace before '{' | sort by number of nodes (equivalent to number of "{")
iconv -f ISO-8859-1 -t "UTF-8" dev.txt train.txt | sed -e 's/(/{/g' | sed -e 's/)/}/g' | sed -E 's/[[:space:]]([{])/\1/g' | awk '{print gsub("{","{"), $0}' | sort -n | cut -d' ' -f2- > ../sentiment.bracket iconv -f ISO-8859-1 -t "UTF-8" dev.txt train.txt | sed -e 's/(/{/g' | sed -e 's/)/}/g' | sed -E 's/[[:space:]]([{])/\1/g' | awk '{print gsub("{","{"), $0}' | sort -n | cut -d' ' -f2- > ../sentiment_sorted.bracket
# go back to the folder # go back to the folder
cd .. cd ..
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment