News for hackers. Stuff that matters.
Re:Experimental library for scraping websites using OpenAI's... by rjh29 on Saturday March 25, 2023 @04:30PM (#35306980)
This may finally be a solution for scraping wikipedia and turning it into structured data. (Or do we even need structured data in the post-AI age?)

Mediawiki is notorious for being hard to parse:

* https://github.com/spencermountain/wtf_wikipedia#ok-first- - why it's hard

* https://techblog.wikimedia.org/2022/04/26/what-it-takes-to-p... - an entire article about parsing page TITLES

* https://osr.cs.fau.de/wp-content/uploads/2017/09/wikitext-pa... - a paper published about a wikitext parser

Re:Experimental library for scraping websites using OpenAI's... by w3454 on Saturday March 25, 2023 @04:38PM (#35307069)
What's wild is that the markup for Wikipedia is not that crazy compared to Wiktionary, which has a different format for every single language.
Re:Experimental library for scraping websites using OpenAI's... by rjh29 on Saturday March 25, 2023 @04:53PM (#35307221)
Yeah I've tried to parse it for Japanese and even there it's so inconsistent (human-written) that the effort required is crazy.
Re:Experimental library for scraping websites using OpenAI's... by dragonwriter on Saturday March 25, 2023 @04:46PM (#35307158)
> Do we even need structured data in the post-AI age?

When we get to the post-AI age, we can worry about that. In the early LLM age, where context space is fairly limited, structured data can be selectively retrieved more easily, making better use of context space.

Re:Experimental library for scraping websites using OpenAI's... by tomberin on Saturday March 25, 2023 @05:16PM (#35307476)
FWIW, That's been my use case, when I saw the author post his initial examples pulling data from Wikipedia pages I dropped my cobbled together scripts and started using the tool via CLI & jq.
Re:Experimental library for scraping websites using OpenAI's... by ZeroGravitas on Saturday March 25, 2023 @05:38PM (#35307698)
You might find this meets many needs:

https://query.wikidata.org/querybuilder/

Re:Experimental library for scraping websites using OpenAI's... by riku_iki on Saturday March 25, 2023 @05:43PM (#35307746)
its wikidata, not wikipedia, they are two disjoint datasets.
Re:Experimental library for scraping websites using OpenAI's... by ZeroGravitas on Saturday March 25, 2023 @05:44PM (#35307760)
Basically every wikipedia page (across languages) is linked to wikidata, and some infoboxes are generated directly from wikidata, so they're seperate, but overlapping and increasingly so.

https://en.wikipedia.org/wiki/Category:Articles_with_infobox...

edit: slightly wider scope category pointing to pages using wikidata in different ways:

https://en.wikipedia.org/wiki/Category:Wikipedia_categories_...

Re:Experimental library for scraping websites using OpenAI's... by riku_iki on Saturday March 25, 2023 @05:51PM (#35307811)
I agree there is strong overlap between entities, and also infobox values, but both wikidata and wikipedia has many more disjoint datapoints: many tables, factual statements in wikipedia which are not in wikidata, and many statements in wikidata which are not in wikipedia.
Re:Experimental library for scraping websites using OpenAI's... by worldsayshi on Saturday March 25, 2023 @05:59PM (#35307880)
To be fair, I was quite confused by wikidata query notation when I tried it as well.
Re:Experimental library for scraping websites using OpenAI's... by LeonardoTolstoy on Saturday March 25, 2023 @07:14PM (#35308579)
I use wikidata a lot for movie stuff. Ideally I imagine the wiki foundation itself will be looking into using LLMs to help parse their own data and convert it into wikidata content (or confirm it, or keep it up to date, etc.)

Wikidata is incredibly useful for things that I would considered valuable (e.g. the tMDb link for a movie) but due to the curation imposed upon Wikipedia itself isn't typically available for very many pages. An LLM won't help with that but another bit of information like where films are set would be a perfect candidate for an LLM to try and determine and fill in automatically with a flag for manual confirmation.

Re:Experimental library for scraping websites using OpenAI's... by rjh29 on Sunday March 26, 2023 @04:58AM (#35312477)
I used that when building a database of Japanese names, but found that even wikidata is inconsistent in the format/structure of its data, as it's contributed by a variety of automated and human sources!
Re:Experimental library for scraping websites using OpenAI's... by telotortium on Saturday March 25, 2023 @05:51PM (#35307809)
> do we even need structured data in the post-AI age?

Even humans benefit quite a bit from structured data, I don't see why AIs would be any different, even if the AIs take over some of the generation of structured data.

Re:Experimental library for scraping websites using OpenAI's... by illiarian on Saturday March 25, 2023 @06:53PM (#35308387)
You might be interested in https://github.com/zverok/wikipedia_ql
Re:Experimental library for scraping websites using OpenAI's... by nico on Saturday March 25, 2023 @11:28PM (#35310511)
I wonder if wikimedia is going to offer free AI to everyone. Like the free/open version or ChatGPT.

By the way, NASA and NSF put out a request for proposals for an open AI network/protocol.