divvun / divvun-api Goto Github PK
View Code? Open in Web Editor NEWWeb server for language processing
Home Page: https://divvun.github.io/divvun-api
Web server for language processing
Home Page: https://divvun.github.io/divvun-api
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}]}]}%
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:
When opening https://api-giellalt.uit.no/graphiql It returns the following error message:
TypeError: Load failed
The editor works, but no queries do.
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
.
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:
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.