Select Language

AI社区

公开数据集

NLTK路透社新闻文件,NLTK路透社语料库中的所有文件

NLTK路透社新闻文件,NLTK路透社语料库中的所有文件

3.3M
405 浏览
0 喜欢
1 次下载
0 条讨论
NLP,Computer Science,News,Text Data,Text Mining Classification

This dataset contains the ID, categories, and raw text from each file in NLTK's Reuters corpus.ContentEach file (row......

数据结构 ? 3.3M

    Data Structure ?

    * 以上分析是由系统提取分析形成的结果,具体实际数据为准。

    README.md

    This dataset contains the ID, categories, and raw text from each file in NLTK's Reuters corpus.

    Content

    Each file (row) is a news document. Each document can be classified as one or more categories.  Files are also classified as test or train files, which can be found in the ID column and used for textual model building/validation. There are 10,788 total news documents in the file.

    Acknowledgements

    Thank you to NLTK and its contributors for everything you do.

    Code

    This dataset was generated using the following python code.

    import nltk
    import pandas as pd
    nltk.download('reuters')
    nltk.download('punkt')
    
    # Extract fileids from the reuters corpus
    fileids = reuters.fileids()
    
    # Initialize empty lists to store categories and raw text
    categories = []
    text = []
    
    # Loop through each file id and collect each files categories and raw text
    for file in fileids:
        categories.append(reuters.categories(file))
        text.append(reuters.raw(file))
    
    # Combine lists into pandas dataframe. reutersDf is the final dataframe. 
    reutersDf = pd.Dataframe({'ids':fileids, 'categories':categories, 'text':text})


    ×

    帕依提提提温馨提示

    该数据集正在整理中,为您准备了其他渠道,请您使用

    注:部分数据正在处理中,未能直接提供下载,还请大家理解和支持。
    暂无相关内容。
    暂无相关内容。
    • 分享你的想法
    去分享你的想法~~

    全部内容

      欢迎交流分享
      开始分享您的观点和意见,和大家一起交流分享.
    所需积分:7 去赚积分?
    • 405浏览
    • 1下载
    • 0点赞
    • 收藏
    • 分享