diff --git a/Flashcard Generator/Coreference.py b/Flashcard Generator/Backups_etc/Coreference.py similarity index 100% rename from Flashcard Generator/Coreference.py rename to Flashcard Generator/Backups_etc/Coreference.py diff --git a/Flashcard Generator/Date_Extraction.py b/Flashcard Generator/Backups_etc/Date_Extraction.py similarity index 100% rename from Flashcard Generator/Date_Extraction.py rename to Flashcard Generator/Backups_etc/Date_Extraction.py diff --git a/Flashcard Generator/Entity_Extraction.py b/Flashcard Generator/Backups_etc/Entity_Extraction.py similarity index 100% rename from Flashcard Generator/Entity_Extraction.py rename to Flashcard Generator/Backups_etc/Entity_Extraction.py diff --git a/Flashcard Generator/Extractor.py b/Flashcard Generator/Backups_etc/Extractor.py similarity index 100% rename from Flashcard Generator/Extractor.py rename to Flashcard Generator/Backups_etc/Extractor.py diff --git a/Flashcard Generator/Extractor_to_QuestionGen.py b/Flashcard Generator/Backups_etc/Extractor_to_QuestionGen.py similarity index 100% rename from Flashcard Generator/Extractor_to_QuestionGen.py rename to Flashcard Generator/Backups_etc/Extractor_to_QuestionGen.py diff --git a/backup_correcter/.gitignore b/Flashcard Generator/Backups_etc/backup_correcter/.gitignore similarity index 100% rename from backup_correcter/.gitignore rename to Flashcard Generator/Backups_etc/backup_correcter/.gitignore diff --git a/backup_correcter/.travis.yml b/Flashcard Generator/Backups_etc/backup_correcter/.travis.yml similarity index 100% rename from backup_correcter/.travis.yml rename to Flashcard Generator/Backups_etc/backup_correcter/.travis.yml diff --git a/backup_correcter/COPYING b/Flashcard Generator/Backups_etc/backup_correcter/COPYING similarity index 100% rename from backup_correcter/COPYING rename to Flashcard Generator/Backups_etc/backup_correcter/COPYING diff --git a/backup_correcter/COPYING.LESSER b/Flashcard Generator/Backups_etc/backup_correcter/COPYING.LESSER similarity index 100% rename from backup_correcter/COPYING.LESSER rename to Flashcard Generator/Backups_etc/backup_correcter/COPYING.LESSER diff --git a/backup_correcter/Dockerfile b/Flashcard Generator/Backups_etc/backup_correcter/Dockerfile similarity index 100% rename from backup_correcter/Dockerfile rename to Flashcard Generator/Backups_etc/backup_correcter/Dockerfile diff --git a/backup_correcter/MANIFEST.in b/Flashcard Generator/Backups_etc/backup_correcter/MANIFEST.in similarity index 100% rename from backup_correcter/MANIFEST.in rename to Flashcard Generator/Backups_etc/backup_correcter/MANIFEST.in diff --git a/backup_correcter/Makefile b/Flashcard Generator/Backups_etc/backup_correcter/Makefile similarity index 100% rename from backup_correcter/Makefile rename to Flashcard Generator/Backups_etc/backup_correcter/Makefile diff --git a/backup_correcter/demo.py b/Flashcard Generator/Backups_etc/backup_correcter/demo.py similarity index 100% rename from backup_correcter/demo.py rename to Flashcard Generator/Backups_etc/backup_correcter/demo.py diff --git a/backup_correcter/download_lt.py b/Flashcard Generator/Backups_etc/backup_correcter/download_lt.py similarity index 100% rename from backup_correcter/download_lt.py rename to Flashcard Generator/Backups_etc/backup_correcter/download_lt.py diff --git a/backup_correcter/example.txt b/Flashcard Generator/Backups_etc/backup_correcter/example.txt similarity index 100% rename from backup_correcter/example.txt rename to Flashcard Generator/Backups_etc/backup_correcter/example.txt diff --git a/backup_correcter/language-check b/Flashcard Generator/Backups_etc/backup_correcter/language-check similarity index 100% rename from backup_correcter/language-check rename to Flashcard Generator/Backups_etc/backup_correcter/language-check diff --git a/backup_correcter/language_check/__init__.py b/Flashcard Generator/Backups_etc/backup_correcter/language_check/__init__.py similarity index 100% rename from backup_correcter/language_check/__init__.py rename to Flashcard Generator/Backups_etc/backup_correcter/language_check/__init__.py diff --git a/backup_correcter/language_check/__main__.py b/Flashcard Generator/Backups_etc/backup_correcter/language_check/__main__.py similarity index 100% rename from backup_correcter/language_check/__main__.py rename to Flashcard Generator/Backups_etc/backup_correcter/language_check/__main__.py diff --git a/backup_correcter/language_check/backports/__init__.py b/Flashcard Generator/Backups_etc/backup_correcter/language_check/backports/__init__.py similarity index 100% rename from backup_correcter/language_check/backports/__init__.py rename to Flashcard Generator/Backups_etc/backup_correcter/language_check/backports/__init__.py diff --git a/backup_correcter/language_check/backports/subprocess.py b/Flashcard Generator/Backups_etc/backup_correcter/language_check/backports/subprocess.py similarity index 100% rename from backup_correcter/language_check/backports/subprocess.py rename to Flashcard Generator/Backups_etc/backup_correcter/language_check/backports/subprocess.py diff --git a/backup_correcter/language_check/console_mode.py b/Flashcard Generator/Backups_etc/backup_correcter/language_check/console_mode.py similarity index 100% rename from backup_correcter/language_check/console_mode.py rename to Flashcard Generator/Backups_etc/backup_correcter/language_check/console_mode.py diff --git a/backup_correcter/language_check/main.py b/Flashcard Generator/Backups_etc/backup_correcter/language_check/main.py similarity index 100% rename from backup_correcter/language_check/main.py rename to Flashcard Generator/Backups_etc/backup_correcter/language_check/main.py diff --git a/backup_correcter/language_check/q_ls.txt b/Flashcard Generator/Backups_etc/backup_correcter/language_check/q_ls.txt similarity index 100% rename from backup_correcter/language_check/q_ls.txt rename to Flashcard Generator/Backups_etc/backup_correcter/language_check/q_ls.txt diff --git a/backup_correcter/language_check/which.py b/Flashcard Generator/Backups_etc/backup_correcter/language_check/which.py similarity index 100% rename from backup_correcter/language_check/which.py rename to Flashcard Generator/Backups_etc/backup_correcter/language_check/which.py diff --git a/backup_correcter/run_doctest.py b/Flashcard Generator/Backups_etc/backup_correcter/run_doctest.py similarity index 100% rename from backup_correcter/run_doctest.py rename to Flashcard Generator/Backups_etc/backup_correcter/run_doctest.py diff --git a/backup_correcter/setup.cfg b/Flashcard Generator/Backups_etc/backup_correcter/setup.cfg similarity index 100% rename from backup_correcter/setup.cfg rename to Flashcard Generator/Backups_etc/backup_correcter/setup.cfg diff --git a/backup_correcter/setup.py b/Flashcard Generator/Backups_etc/backup_correcter/setup.py similarity index 100% rename from backup_correcter/setup.py rename to Flashcard Generator/Backups_etc/backup_correcter/setup.py diff --git a/backup_correcter/test.bash b/Flashcard Generator/Backups_etc/backup_correcter/test.bash similarity index 100% rename from backup_correcter/test.bash rename to Flashcard Generator/Backups_etc/backup_correcter/test.bash diff --git a/backup_correcter/test.py b/Flashcard Generator/Backups_etc/backup_correcter/test.py similarity index 100% rename from backup_correcter/test.py rename to Flashcard Generator/Backups_etc/backup_correcter/test.py diff --git a/backup_correcter/test_remote.bash b/Flashcard Generator/Backups_etc/backup_correcter/test_remote.bash similarity index 100% rename from backup_correcter/test_remote.bash rename to Flashcard Generator/Backups_etc/backup_correcter/test_remote.bash diff --git a/Flashcard Generator/Main.py b/Flashcard Generator/Main.py new file mode 100644 index 0000000..b64864a --- /dev/null +++ b/Flashcard Generator/Main.py @@ -0,0 +1,34 @@ +#Speedup: bash runStanfordParserServer.sh, bash runSSTServer.sh + +import sys +import pip +import spacy +import neuralcoref +import lexnlp.nlp.en.segments.sentences as lex_sentences +import question_generator as gen + + +#Load +direct_path = '' +with open(direct_path, 'r') as file: + brief = file.read() + + +#Preprocess +brief = lex_sentences.pre_process_document(brief) +pronouns = spacy.load('en') +neuralcoref.add_to_pipe(pronouns,greedyness=0.5,max_dist=100,blacklist=False) +neural = pronouns(brief) +brief = neural._.coref_resolved + + +#Tokenize +sentences = list(lex_sentences.get_sentence_list(brief)) +questions = gen.QuestionGenerator() + + +#Print +for sentence in sentences: + flashcard = questions.generate_question(sentence) + if flashcard: + print("Question: {}\n\nAnswer: {}\n-------------\n".format(flashcard[0]['Q'], flashcard[0]['A'])) diff --git a/Flashcard Generator/Pipfile b/Flashcard Generator/Pipfile_reqs/Pipfile similarity index 100% rename from Flashcard Generator/Pipfile rename to Flashcard Generator/Pipfile_reqs/Pipfile diff --git a/Flashcard Generator/Pipfile.lock b/Flashcard Generator/Pipfile_reqs/Pipfile.lock similarity index 100% rename from Flashcard Generator/Pipfile.lock rename to Flashcard Generator/Pipfile_reqs/Pipfile.lock diff --git a/Flashcard Generator/requirements.txt b/Flashcard Generator/Pipfile_reqs/requirements.txt similarity index 100% rename from Flashcard Generator/requirements.txt rename to Flashcard Generator/Pipfile_reqs/requirements.txt