Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 6843891c authored by Prot Alexandre's avatar Prot Alexandre

adding document limit to stanford parser

parent 7bfb2b56
......@@ -13,6 +13,9 @@ class StanfordParser:
collection_dir = self.DIRECTORY + "/" + str(collection_index)
for filename in listdir(collection_dir):
if limit is not None and counter >= limit:
return
with open(collection_dir + "/" + filename, 'r') as f:
current_document_id = str(collection_index) + filename
current_document = StanfordDocument(current_document_id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment