forked from umang-malik/code.fun.do
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsummarize.sh
More file actions
executable file
·32 lines (28 loc) · 772 Bytes
/
summarize.sh
File metadata and controls
executable file
·32 lines (28 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#Clean the tweets
echo Cleaning tweets
rm -rf clean_tweets
mkdir clean_tweets
python clean.py crawl_tweets/ clean_tweets/
#Tag the tweets.
echo Tagging tweets
rm -rf process_tweets
mkdir process_tweets
python tag.py clean_tweets/ process_tweets/
#Generate the summary of the files.
echo Summarizing tweets
rm -rf summary
mkdir summary
for i in $(ls clean_tweets/); do
summary="/summary/"
working_dir=$(pwd)
process_tweets="/process_tweets/"
clean_tweets="/clean_tweets/"
suffix="_features"
file="$working_dir$clean_tweets"$i""
feature="$working_dir$process_tweets"$i"$suffix"
write_to="$working_dir$summary"$i""
echo summarizing: "$write_to"
python tweet_summarizer.py "$file" "$feature" "$write_to"
done
echo DONE!