cosmel.corpus.parsed module¶
-
class
cosmel.corpus.parsed.ParsedArticle(file_path, article)[source]¶ Bases:
collections.abc.SequenceThe parsed article object (contains list of sentences).
- Item: the parsed sentence (str)
Parameters: file_path (str) – the path to the article.
-
class
cosmel.corpus.parsed.ParsedArticleSet(parsed_root, article_set)[source]¶ Bases:
collections.abc.CollectionThe set of parsed articles.
- Item: the parsed article object (
ParsedArticle)
Parameters: - parsed_root (str) – the path to the folder containing parsed article files.
- article_set (
ArticleSet) – the set of articles.
Notes
- Load all articles from
parsed_root/partfor allpartinparts.
- Item: the parsed article object (
-
class
cosmel.corpus.parsed.Id2ParsedArticle(id_to_article)[source]¶ Bases:
collections.abc.MappingThe dictionary maps article ID to parsed article.
- Key: the article ID (str).
- Item: the parsed article (
ParsedArticle).
Parameters: id_to_article ( Id2Article) – the dictionary maps article ID to article object.