GithubHelp home page GithubHelp logo

gs-symbol-concept-api's Introduction

Global Symbol Concept Tagging API

Installation

API Introduction

There are two different queries regarding the concept tagging.

  • Single concept query
  • Bulk query with whole symbol set

Single concept query

HTTP GET baseURL/api/symbol/query with query parameters.

For example: baseURL/api/symbol/query?concept=/c/en/dog&symbol_set=arasaac&limit=4&exclude=/c/en/canine,/c/en/loyal_friend

parameters:

concept: query parameter, the concept of the symbol, e.g. /c/en/god symbol_set: query parameter, the symbol set of the symbol belongs, e.g. arasaac limit: query parameter, the limited number of the tags returned excluding the number of tags in the exclude parameter exclude: query parameter, list of symbol concepts joined with comma, exclude the tags, e.g. exclude=/c/en/canine, the returned tag list will not include any tag in the exclude list.

Return JSON object schame:{'status':200, data:[]}, Query Example: baseURL/api/symbol/query?concept=/c/en/dog&symbol_set=arasaac&limit=4&exclude=/c/en/canine,/c/en/loyal_friend. Return Example:

{"status":200,"data":[{"weight":6,"label":"pet","concept":"/c/en/pet","lang":"en","popularity":697},{"weight":5.291502622129181,"label":"mammal","concept":"/c/en/mammal","lang":"en","popularity":1000},{"weight":3.4641016151377544,"label":"a good friend","concept":"/c/en/good_friend","lang":"en","popularity":8},{"weight":2.82842712474619,"label":"a four legged animal","concept":"/c/en/four_legged_animal","lang":"en","popularity":3}]}

Tag object includes weight: number, label: text label of the tag, concept: concept of the tag, lang: language, popularity: the length of edges this concept contains, which means how many other concepts linked to this tag. Popularity has been set to maximum 1000 at the moment (It is still a little bit slow).

Bulk query

  HTTP POST baseURL/api/symbolset/query with body data parameters: {symbol_set: xxx, limit:xxx, symbol_concepts:xx,xx,xx}
parameters:

symbol_set is the name of target symbol set limit is the limited number of tags return for each symbol concept symbol_concepts is the list of symbol concepts joined with comma, for example symbol_concepts: /c/en/dog,/c/en/cat... Return JSON object schame:

  {'status':200, data:[tag_object,tag_object]}.

tag_object schema:

  { "concept": "/c/en/xx", "recommend_tags": [ { "weight": 1, "label": "xxx", "concept": "/c/en/xxxx", "lang": "en", "popularity": 1}

Query Example:

Post  baseURL/api/symbolset/query with body data {symbol_set: 'arasaac', limit:5, symbol_concepts:/c/en/dog,/c/en/cat}

Return Example:

 { "status": 200, "data": [ { "concept": "/c/en/dog", "recommend_tags": [ { "weight": 6.6332495807108, "label": "a loyal friend", "concept": "/c/en/loyal_friend", "lang": "en", "popularity": 1 }, { "weight": 6, "label": "pet", "concept": "/c/en/pet", "lang": "en", "popularity": 697 }, { "weight": 5.291502622129181, "label": "mammal", "concept": "/c/en/mammal", "lang": "en", "popularity": 1000 }, { "weight": 4.898979485566356, "label": "a canine", "concept": "/c/en/canine", "lang": "en", "popularity": 338 }, { "weight": 3.4641016151377544, "label": "a good friend", "concept": "/c/en/good_friend", "lang": "en", "popularity": 8 } ] }, { "concept": "/c/en/cat", "recommend_tags": [ { "weight": 2, "label": "woman", "concept": "/c/en/woman", "lang": "en", "popularity": 1000 }, { "weight": 2, "label": "gossip", "concept": "/c/en/gossip", "lang": "en", "popularity": 856 }, { "weight": 2, "label": "feline", "concept": "/c/en/feline", "lang": "en", "popularity": 246 }, { "weight": 1, "label": "Animal", "concept": "/c/en/animal", "lang": "en", "popularity": 1000 }, { "weight": 1, "label": "Talisman", "concept": "/c/en/talisman", "lang": "en", "popularity": 222 } ] } ] }

Tag object includes weight: number, label: text label of the tag, concept: concept of the tag, lang: language, popularity: the length of edges this concept contains, which means how many other concepts linked to this tag. Popularity has been set to maximum 1000 at the moment (It is still a little bit slow).

gs-symbol-concept-api's People

Contributors

chaohaiding 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.