Giter Club home page Giter Club logo

translation-recs-app's Introduction

Build Status

Article Creation API

Given a source and target wiki, the API provides source articles missing in the target.

  • URL

  • URL Params

    • Required:
      • s=[string] source wiki project language code (e.g. en)
      • t=[string] target wiki project language code (e.g. fr)
    • Optional:
      • n=[int] number of recommendations to fetch (default 10)
      • article=[string] seed article for personalized recommendations. Can be a list of seeds separated by |
      • pageviews=[true|false] whether to include pageview counts in the response (default true)
      • search=[wiki|google|morelike] which search algorithm to use (default morelike)
  • Sample Call:

    http://recommend.wmflabs.org/api?s=en&t=fr&n=3&article=Apple

    {
      "articles": [
          {
              "pageviews": 3221,
              "title": "Mutsu_(apple)",
              "wikidata_id": "Q2613423"
          },
          {
              "pageviews": 127,
              "title": "Liveland_Raspberry_apple",
              "wikidata_id": "Q19597760"
          },
          {
              "pageviews": 91,
              "title": "Eva_(apple)",
              "wikidata_id": "Q5414989"
          }
      ]
    }
    
  • Running the API

    There is a wsgi file provided at recommendation/data/recommendation.wsgi. This can be run using a tool like uwsgi as follows:

    # Inside a virtualenv and in the root directory of the repo
    pip install -e .
    pip install uwsgi
    uwsgi --http :5000 --wsgi-file recommendation/data/recommendation.wsgi --venv my-venv
    

    Then navigate here to see the UI:

    http://localhost:5000/
    

    To check out the API, go to:

    http://localhost:5000/api?s=en&t=fr&n=3&article=Apple
    

    You should get a similar response to the Sample Call above

translation-recs-app's People

Contributors

amire80 avatar atdt avatar ewulczyn avatar ladsgroup avatar milimetric avatar nikerabbit avatar sabyasachi avatar schana avatar siebrand avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.