-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e643833
commit c181684
Showing
27 changed files
with
41 additions
and
492,327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Instructions for Setup | ||
|
||
1. `cd mashqa_data` | ||
2. `python format.py` | ||
3. `cd ..; python dbGen.py` | ||
|
||
## Instructions to run | ||
1. `cd App; npx expo start` | ||
2. `python backend.py` | ||
|
||
## Future work | ||
1. Dockerisation of the project to allow it to run from any IP address without having to do many changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
import json | ||
|
||
# pick out some data from json file and make a new json | ||
def make_json(path): | ||
with open('{}'.format(path), 'r') as f: | ||
data = json.load(f) | ||
|
||
f = open('sentences.txt'.format(path[:-5]), 'a') | ||
data = data['data'] | ||
|
||
for i in range(len(data)): | ||
para = data[i]['paragraphs'] | ||
for j in range(len(para)): | ||
sentences = para[j]['sent_list'] | ||
for k in sentences: | ||
f.write(k) | ||
f.write('\n') | ||
f.write('\n\n') | ||
f.close() | ||
|
||
l = os.listdir('.') | ||
for i in l: | ||
if i.endswith('.json') and not i.startswith('new'): | ||
make_json(i) | ||
print('done {}'.format(i)) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.