Giter Site home page Giter Site logo

divvun / divvun-api Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 1.09 MB

Web server for language processing

Home Page: https://divvun.github.io/divvun-api

Rust 94.05% Gherkin 4.28% Dockerfile 0.66% Shell 1.00%
indigenous-languages language-technology minority-language openapi proofing-tools

divvun-api's People

Contributors

bbqsrc avatar fry avatar killercup avatar projektir avatar snomos avatar unhammer avatar zbrox avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

killercup

divvun-api's Issues

Speller support for Overleaf?

It would be nice to have speller support for our own languages in Overleaf. The Overleaf speller code is here.

The idea would be to add a simple layer that calls our speller API. It needs at least three functions:

  • get list of supported languages
  • check word
  • get suggestions for word

Need a function to list all available languages for a given service

For service discovery, there needs to be a way of getting a list of languages supported by a given service. An obvious candidate would be list, as in:

https://api-giellalt.uit.no/hyphenation/list

The function name list would not collide with any language codes, as these are always two or three letters long.

Without this function, there is no way external tools can utilise our services, unless language codes are hard-coded.

Also note that the list function needs to be on the level of tools, as the supported languages may vary from tool to tool.

Make hyphenation server work properly

The hyphenation server is not working properly, cf #3. We have also received requests for hyphenation services, which we presently can't offer.

At least the following steps are needed:

  • install FST hyphenator for at least two languages
  • test that they are working properly
  • hyphenation for both single words and whole texts (paragraphs?), must be differentiated in the API
  • offer the hyphenation service in a web interface (we already have the web interface, but we need to make it use our API server)

Language options list returns invalid data for `hyphenation` field

The following command:

$ curl -s -X GET -k -H 'Content-Type: application/json' -i 'https://api-giellalt.uit.no/languages' | grep '{' | jq .

returns this data structure:

{
  "available": {
    "grammar": {
      "smj": "julevsámegiella",
      "sma": "Åarjelsaemien gïele",
      "sms": "nuõrttsääʹmǩiõll",
      "smn": "anarâškielâ",
      "se": "davvisámegiella"
    },
    "speller": {
      "se": "davvisámegiella",
      "smj": "julevsámegiella",
      "sma": "Åarjelsaemien gïele",
      "sms": "nuõrttsääʹmǩiõll",
      "smn": "anarâškielâ"
    },
    "hyphenation": {
      "hyphenator-gt-desc": "hyphenator-gt-desc"
    }
  }
}

The returned data for hyphenation is invalid, the expected data should be as for speller and grammar.

Documentation outdated

The GraphQL part is outdated: https://divvun.github.io/divvun-api/#_graphql

Running the code returns an error:

curl -X POST -H 'Content-Type: application/json' -i 'https://api-giellalt.uit.no/graphql' --data  '{ "query": "query { suggestions(text: \"pákhat\", language: \"se\") { speller { isCorrect }, grammar { errs { startIndex endIndex errorCode description suggestions title } } } }" }'
HTTP/2 200 
content-type: application/json
date: Tue, 14 May 2024 08:09:23 GMT
server: Caddy
content-length: 111

{"errors":[{"message":"Unknown field \"isCorrect\" on type \"Speller\"","locations":[{"line":1,"column":65}]}]}%                                             

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.