Article
This section introduces the class Article and ArticleList.
Article class
The class Article is an internal class for TrendFlow.
Instance Attributes
- title (str): the title of the article
- authors (list of str): the authors of the article
- abstract (str): the abstract of the articles
- url (str): the url of the article
- publication_year (int): the publication year of the article
Instance Functions
def __init__(self, title: str, authors: List[str], abstract: str, url: str, publication_year: int) -> None: create anArticleobject.to_dict(self) -> dict: return the dict form of this article
ArticleList class
The list representation of articles.
Instance Functions
def __init__(self,articles:Optional[Union[Article, List[Article]]]=None) -> None: create anArticleListobject from oneArticleor a list ofArticle.addArticles(self, articles:Union[Article, List[Article]]): add article to the listto_dataframe(self) ->pd.DataFrame: convert topd.DataFrameobjectgetArticles(self) -> List[Article]:return a list of the articlesgetAbstracts(self) -> List[str]: return a list of abstracts of the articlesgetTitles(self) -> List[str]:: return a list of titles of the articles
Class Functions
parse_ieee_articles(cls,items: Union[dict, List[dict]]): parse the search results from IEEE platform into aArticleListobjectparse_arxiv_articles(cls, items: Union[dict, List[dict]]): parse the search results from Arxiv platform into aArticleListobjectparse_pwc_articles(cls, items: Union[dict, List[dict]]): parse the search results from Paper with Code platform into aArticleListobject