cosmel.corpus.article module¶
-
class
cosmel.corpus.article.Article(file_path, root_path)[source]¶ Bases:
collections.abc.SequenceThe article object (contains list of sentences).
- Item: the word-segmented sentence (
WsWords)
Parameters: -
parsed¶ the parsed article of this article.
Type: ParsedArticle
-
bundle¶ the mention bundle of this article.
Type: MentionBundle
- Item: the word-segmented sentence (
-
class
cosmel.corpus.article.ArticleSet(article_root, parts=[''], skips=[])[source]¶ Bases:
collections.abc.CollectionThe set of articles.
- Item: the article object (
Article)
Parameters: Notes
- Load all articles from
article_root/partfor allpartinparts.
- Item: the article object (
-
class
cosmel.corpus.article.Id2Article(article_set)[source]¶ Bases:
collections.abc.MappingThe dictionary maps article ID to article object.
- Key: the article ID (str).
- Item: the article object (
Article).
Parameters: article_set ( ArticleSet) – the article set.