新闻存储和分析立方体
项目描述
摘要
新闻存储和分析立方体
此立方体提供了Semnews的实现
存储新闻文章和推文。
提取和综合信息。
提供语义有用和原创的视觉化。
分析工具和数据挖掘/机器学习处理。
安装
实例创建
使用以下命令创建实例:cubicweb-ctl create semnews <实例名称>
使用以下命令创建实例数据库:cubicweb-ctl db-create <实例名称>
添加文章来源
文章来源可以通过以下方式创建
博客/RSS源
session.create_entity('CWSource', name=<name of the source>, type=u'datafeed', parser=u'rss-parser', lang=<lang of the source>, url=<url of the blog/rss feed>, config=u'synchronization-interval=120min')推文
session.create_entity('CWSource', name=<name of the source>, type=u'datafeed', parser=u'tweet-parser', lang=<lang of the source>, url=<url of the blog/rss feed>, config=u'synchronization-interval=120min')
同步间隔可以设置为更具体的值,或设置为“否”以进行手动同步。
Semnews附带一些预定义的博客/推文/RSS源
一些法国政治博客。您可以使用以下方式添加它们
cubicweb-ctl shell <name-of-instance> <path-to-cube-code-source>/migration/examples_blogs_fr.py一些国际英文报纸。您可以使用以下方式添加它们
cubicweb-ctl shell <name-of-instance> <path-to-cube-code-source>/migration/examples_newspapers.py一些法国报纸。您可以使用以下方式添加它们
cubicweb-ctl shell <name-of-instance> <path-to-cube-code-source>/migration/examples_newspapers_fr.py一些法国政治家的推文。您可以使用以下方式添加它们
cubicweb-ctl shell <name-of-instance> <path-to-cube-code-source>/migration/examples_twitters_fr.py
添加命名实体来源
Semnews基于命名实体处理,您需要定义
session.create_entity('NerProcess', name=<name of process>, host=<appid or sparql endpoint url>, type=<rql or sparql>, lang=<optional lang of the ner source>, request=<request to be performed>)
请参阅NER立方体的文档以获取更多详细信息。示例源
session.create_entity('NerProcess', name=u'dbpedia38-en', host=u'ner', type=u'rql', lang=u'en', request=u'Any U WHERE X label %(token)s, X cwuri U, ' 'X ner_source NS, NS name "dbpedia38-en"')
命令
Semnews提供以下命令
用于从文章中提取命名实体的命令
cubicweb-ctl process-ner <name-of-instance>根据一些Dbpedia类别清理已识别实体(请参阅entities/external_resources.py)的命令
cubicweb-ctl cleanup-ner <name-of-instance>
项目详情
关闭
cubicweb-semnews-0.2.0.tar.gz的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 6e2fc0d98cc4be03e530c1b0cb1e42b23bb1a3238610e8f073f7756f640f207c |
|
MD5 | da4030b45f98087cd411f2de564862fe |
|
BLAKE2b-256 | a6f23835295e596c255acf22754beb5d13ee32bfc8a46ac59dc1c2c7b8f36ac7 |