Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions awe_workbench/web/parserServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ async def run_parser(self, websocket, path):

if labels[i]in self.documents:
del self.documents[labels[i]]
self.documents[labels[i]] = text
self.documents[labels[i]] = self.nlp(text)
await websocket.send(json.dumps(True))
elif command == 'LABELS':
# labels = self.parser.list_document_labels()
Expand Down Expand Up @@ -1299,4 +1299,4 @@ async def run_parser(self, websocket, path):

if __name__ == '__main__':
print('parser server loading')
wsc = parserServer()
wsc = parserServer()
9 changes: 7 additions & 2 deletions examples/batch_summary.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import asyncio
import csv
import os
import math
Expand Down Expand Up @@ -40,7 +41,7 @@ def initialize():
# return spellchecker and parser objects
return cs, parser, lt

if __name__ == '__main__':
async def main():

parser = argparse.ArgumentParser(description="Parse a student text file")
parser.add_argument(
Expand All @@ -67,7 +68,7 @@ def initialize():
doc_contents.append(contents)

print('Running LanguageTool')
df1 = lt.summarizeMultipleTexts(ids, doc_contents)
df1 = await lt.summarizeMultipleTexts(ids, doc_contents)

#texts = None
print('Running spellcorrect')
Expand Down Expand Up @@ -117,3 +118,7 @@ def initialize():
dfFinal = pd.merge(df2, pd.merge(df1,syntactic_profile, on='ID'), on='ID')
dfFinal.to_csv(args.directory + "/output.csv")



if __name__ == '__main__':
asyncio.run(main())