/maka

A set of python classes to retrieve information from the Microsoft Academic Knowledge API

Primary LanguagePythonOtherNOASSERTION

maka

maka is a Python module that implements a querier and parser for the Microsoft Academic Knowledge API. Its classes can be used independently, but it can also be invoked as a command-line tool.

If you'd like to get in touch, email me at gonzalo.huerta AT uai.cl or ping me on Twitter.

Regards, Gonzalo

Features

  • Follows the definitions of entities from the Microsoft site, but also includes human readable format.
  • Sample command line tools for:
    • Retrieving the information of an author saving the entries in JSON format. It also support parallel workers.
    • Testing similarity between two strings

Installation

  • To install the requirements do

    $ pip install -r requirements.txt
    
  • That´s all but I do recommend to use the library inside a virtual environment. Please check this document for more information.

Examples

To run the samples first you need to copy the file env.sample to .env and modify it to add your Microsoft's Cognitive service key. This key is obtained from the azure portal linked to your subscription. Check their official site for more information.

Retrieve the articles written by Einstein:

$ python samples/author.py --author "albert einstein"

Retrieve histograms for (Y)ear and (F)ield of study for Albert Einstein:

$ python samples/calc_histogram.py -e "Composite(AA.AuN='albert einstein')" -a "Y,F.FN"

Retrieve similarity between two texts:

$ python samples/similarity.py --s1 "Imagination is more important than knowledge" --s2 "Insanity: doing the same thing over and over again and expecting different results"

License

maka is using the standard Apache license 2..