English 中文(简体)
Python 能够象征维基页面的 Python 库
原标题:Python libraries that can tokenize wikipedia pages

我想将维基百科感兴趣的网页标为 python 库或图书馆。 我对表格和列表最感兴趣。 我希望能够将这些数据导入 Postgres 或 Neo4j 。

例如,这里有三个数据组,我感兴趣的是:

每种图文的来源都是用维基百科的标记标记来写成的, 用来制作这些标记。 许多维基百科特定标签和语法都用于原始数据格式。 HTML 几乎可能是比较容易的解决方案, 因为只要我能够使用“ 美丽汤 ” 。

有谁知道更好的象征性方式吗?我觉得如果我选择了最后的HTML,然后用《美容汤》来解析它,我就能重新发明方向盘。此外,如果我能找到一种方法将这些页面输出到XML,那么表格数据可能不够具有象征意义,需要进一步处理。

问题回答

自维基百科建在MediWiki上以来,有api 你可以开发。还有special:Export ,你可以使用。

一旦有了原始数据,你就可以通过“http://mwlib.readthedocs.org/en/latest/index.html' rel=“no follow”>mwlib 来分析。

这更多地涉及语义网站方向,但>DBPedia 允许使用STARQL查询维基比亚数据的部分(社区转换努力),这样从理论上讲可以直接提取所需的数据,然而处理RDF的三重数据可能很麻烦。

此外,我不知道DBBedia是否还包含任何你感兴趣的数据。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签