Skip to content

Commit

Permalink
dataset verification
Browse files Browse the repository at this point in the history
  • Loading branch information
k-sizikova committed Jun 3, 2024
1 parent 9f56096 commit f927d90
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lab_6_pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,16 @@ def run(self) -> None:
"""
Perform basic preprocessing and write processed text to files.
"""
articles = self._corpus.get_articles().values()
documents = [article.text for article in articles]
analyzed_documents = self.analyzer.analyze(documents)
for article, analyzed_document in zip(articles, analyzed_documents):
documents = []
if self.analyzer:
documents = self.analyzer.analyze([article.text for article
in self._corpus.get_articles().values()])

for num, article in enumerate(self._corpus.get_articles().values()):
to_cleaned(article)
article.set_conllu_info(analyzed_document)
self.analyzer.to_conllu(article)
if self.analyzer and documents:
article.set_conllu_info(documents[num])
self.analyzer.to_conllu(article)


class UDPipeAnalyzer(LibraryWrapper):
Expand Down

0 comments on commit f927d90

Please sign in to comment.