Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirtia committed Apr 4, 2023
1 parent 9c45271 commit e102f4e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test.py → src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ def main():
parser.add_argument('-m',
'--mode',
type=str,
help='the mode of summarization\n -pegasus\n -nltk\n',
required=False,
default="ntlk")
help='the mode of summarization\n -pegasus\n -nltk\n -sumy\n',
required=True,
default="nltk")

args = parser.parse_args()

if args.mode == "ntlk":
if args.mode == "nltk":
summarizer_NTLK = nltk_summarizer.PDFSummarizer(args.file)
summarizer_NTLK.summarize()
summarizer_NTLK.export(args.output)
Expand Down
10 changes: 10 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

file="YouTubers_Not_madeForKids_Detecting_Channels_Sharing_Inappropriate_Videos_Targeting_Children"
mkdir -p data/output
echo -e "Testing summarization methods ...\n"
echo -e "\nSummarization nltk:\n"
time python src/main.py -f data/input/${file}.pdf -o data/output/${file}_nltk.txt -m nltk
# time python src/main.py -f data/input/${file}.pdf -o data/output/${file}_pegasus.txt -m pegasus
echo -e "\nSummarization sumy:\n"
time python src/main.py -f data/input/${file}.pdf -o data/output/${file}_summy.txt -m sumy

0 comments on commit e102f4e

Please sign in to comment.