Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def get_concepts(text):
|
|
28 |
concepts.append(chunk.text)
|
29 |
return concepts
|
30 |
|
31 |
-
def get_passages(text, k=
|
32 |
doc = nlp(text)
|
33 |
passages = []
|
34 |
passage_len = 0
|
@@ -51,7 +51,7 @@ def get_passages(text, k=100):
|
|
51 |
passage += " " + sen.text
|
52 |
return passages
|
53 |
|
54 |
-
def get_dicts_for_dpr(concepts, n_results=
|
55 |
dicts = []
|
56 |
for concept in concepts:
|
57 |
wikis = wikipedia.search(concept, results=n_results)
|
@@ -232,7 +232,7 @@ def main():
|
|
232 |
|
233 |
press_release()
|
234 |
|
235 |
-
t =
|
236 |
|
237 |
if __name__ == "__main__":
|
238 |
main()
|
|
|
28 |
concepts.append(chunk.text)
|
29 |
return concepts
|
30 |
|
31 |
+
def get_passages(text, k=1000):
|
32 |
doc = nlp(text)
|
33 |
passages = []
|
34 |
passage_len = 0
|
|
|
51 |
passage += " " + sen.text
|
52 |
return passages
|
53 |
|
54 |
+
def get_dicts_for_dpr(concepts, n_results=200, k=1000):
|
55 |
dicts = []
|
56 |
for concept in concepts:
|
57 |
wikis = wikipedia.search(concept, results=n_results)
|
|
|
232 |
|
233 |
press_release()
|
234 |
|
235 |
+
t = 60
|
236 |
|
237 |
if __name__ == "__main__":
|
238 |
main()
|