Commit 19f39918 authored by Thomas Huetter's avatar Thomas Huetter
Browse files

added script to download and prepare sentiment data

parent a2c22c00
# file:
# Program: Downloads and prepares data containing the sentiment dataset.
# Author: Thomas Huetter
# create target folder and change into it
mkdir sentiment
cd sentiment
# download the data files
# unzip the data into folder original_data
# remove zip file
rm -rf
# change to unzipped folder
cd trees
# prepare data for file L.trees
# convert dev.txt and train.txt into UTF-8 format | replace ( by { | replace ) by } | 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' | awk '{print gsub("{","{"), $0}' | sort -n | cut -d' ' -f2- > ../sentiment.bracket
# go back to the folder
cd ..
\ No newline at end of file
Supports Markdown
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