Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Show information from Wikipedia about a concept #108

Closed
stefandesu opened this issue Jul 31, 2018 · 1 comment
Closed

Show information from Wikipedia about a concept #108

stefandesu opened this issue Jul 31, 2018 · 1 comment
Assignees
Labels
feature Additional functionality question Further discussion needed
Milestone

Comments

@stefandesu
Copy link
Member

To make matching a concept easier, we could show information from Wikipedia in a separate tab where the notes etc. are. We could first query Wikipedia's full-text search and then if necessary get an extract for the top match of the results.

For example:

https://de.wikipedia.org/w/api.php?action=query&format=json&list=search&utf8=1&srsearch=Leukozyten%20(Weiße%20Blutkörperchen) returns a few results, the first one has the title "Leukozyt". We could then get the extract for Leukozyt with https://de.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=Leukozyt.

Result:

{
  "batchcomplete":"",
  "query":{
    "pages":{
      "89555":{
        "pageid":89555,
        "ns":0,
        "title":"Leukozyt",
        "extract":"Leukozyten (Einzahl der Leukozyt, von altgriechisch \u03bb\u03b5\u03c5\u03ba\u03cc\u03c2 leuk\u00f3s, deutsch \u201awei\u00df\u2018 sowie altgriechisch \u03ba\u03cd\u03c4\u03bf\u03c2 k\u00fdtos, deutsch \u201aH\u00f6hlung, Gef\u00e4\u00df, H\u00fclle\u2018) oder wei\u00dfe Blutzellen (veraltet -k\u00f6rperchen) sind im Blut, im Knochenmark, in den lymphatischen Organen und anderen K\u00f6rpergeweben der Wirbeltiere zu finden. Im Gegensatz zu den Erythrozyten (roten Blutzellen) enthalten Leukozyten nicht den roten Farbstoff H\u00e4moglobin. Besonders augenf\u00e4llig ist der Unterschied bei den S\u00e4ugern, deren reife Erythrozyten ohne Zellkern auskommen (daher im Deutschen auch rote Blutk\u00f6rperchen genannt). Leukozyten haben spezielle Funktionen in der Abwehr von Krankheitserregern und k\u00f6rperfremden Strukturen. Sie geh\u00f6ren zum Immunsystem und sind dort Teil der spezifischen und unspezifischen Immunabwehr, weshalb sie auch als Immunozyten (Immunzellen) bezeichnet werden. Der Anteil der Leukozyten im peripheren Blut wird mit einem Differentialblutbild erfasst."
      }
    }
  }
}

This should be very simple and quick to implement.

@stefandesu stefandesu added feature Additional functionality question Further discussion needed labels Jul 31, 2018
@stefandesu stefandesu added this to the 0.5.0 milestone Jul 31, 2018
@stefandesu stefandesu self-assigned this Jul 31, 2018
@nichtich nichtich modified the milestones: 0.5.0, 0.6.0 Aug 28, 2018
@stefandesu
Copy link
Member Author

This is now implemented for German and English labels. The piece of code loading this info should probably be in a different place (e.g. some kind of information plugin system or something), but that will require further refactoring and restructuring.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature Additional functionality question Further discussion needed
Projects
None yet
Development

No branches or pull requests

2 participants