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 anArticle
object.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 anArticleList
object from oneArticle
or a list ofArticle
.addArticles(self, articles:Union[Article, List[Article]])
: add article to the listto_dataframe(self) ->pd.DataFrame
: convert topd.DataFrame
objectgetArticles(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 aArticleList
objectparse_arxiv_articles(cls, items: Union[dict, List[dict]])
: parse the search results from Arxiv platform into aArticleList
objectparse_pwc_articles(cls, items: Union[dict, List[dict]])
: parse the search results from Paper with Code platform into aArticleList
object