freelawproject / courtlistener

A fully-searchable and accessible archive of court data including growing repositories of opinions, oral arguments, judges, judicial financial records, and federal filings.
https://www.courtlistener.com
Other
531 stars 147 forks source link

Adding Wikipedia summaries/links/data/etc to opinion pages #376

Open brianwc opened 8 years ago

brianwc commented 8 years ago

Came across this command-line tool (written in go) that pulls summaries of Wikipedia articles. Haven't tested it yet, but it seems like a simple command like:

wiki "Brown v. Board of Education"

would get us the summaries we want. (It's actually unclear from the Readme.md whether the syntax calls for double quotes, single quotes, or nothing, when the article title has spaces in it) but the point is it's fairly straightforward. I suppose this could be used on a one-time basis to pull all the summaries we need, but the point about Wikipedia is that it's supposedly always improving, so while a real-time pull while loading an opinion page might introduce too much delay, some sort of regular update to these would be the best case scenario.

rcmckee commented 3 weeks ago

This should do the job

`

pip install pymediawiki

from mediawiki import MediaWiki wikipedia = MediaWiki()

case = "Brown v. Board of Education"

p = wikipedia.page(case) print(p.summary)

`

https://github.com/barrust/mediawiki

mlissner commented 3 weeks ago

Neat. I wonder how useful this would be compared to all the AI summaries you can do now. I suspect it might not be as good, actually. Definitely worth doing some qualitative checks before going tooooo far down this road.