Difference between revisions of "User:Mono/GSoC 2017"
Line 153: | Line 153: | ||
1. The screenshot of the current state of interface can be found [http://www.example.com here]. <br/> |
1. The screenshot of the current state of interface can be found [http://www.example.com here]. <br/> |
||
2. The pending tasks with respect to dictionary lookup mode are discussed in [https://github.com/goavki/apertium-html-tools/pull/184#issuecomment-323597780 this comment]. |
2. The pending tasks with respect to dictionary lookup mode are discussed in [https://github.com/goavki/apertium-html-tools/pull/184#issuecomment-323597780 this comment]. |
||
== Installation Notification == |
|||
A notification that appears when the requests made to the APy take more than a threshold time. This notification also appears when a cumulative average of the requests duration exceeds a certain threshold indicating that the servers may be overloaded and thus, one could set the APy locally too. |
|||
=== Code === |
|||
* https://github.com/goavki/apertium-html-tools/commit/662a48b4858f4e731e454a5547f6a9e76c3c96f8 |
Revision as of 15:12, 27 August 2017
Contents
Webpage Translation mode
An interface that lets the user to input a URL, choose a source and a destination language and translate the webpage.
Code
Backend
Frontend
- https://github.com/goavki/apertium-html-tools/pull/154
- https://github.com/goavki/apertium-html-tools/pull/202
- https://github.com/goavki/apertium-html-tools/pull/205
Documentation
Backend
URL | Function | Parameters | Output |
---|---|---|---|
/translatePage | Translates a webpage |
|
Returns the translated webpage
curl -Ss 'http://localhost:2737/translatePage?langpair=eng|spa&url=http://facebook.com' |
Frontend
ENABLED_MODES: an array of the enabled interfaces, a non-empty subset of ['translation', 'analyzation', 'generation', 'sandbox']
translation lookup
turns on webpage translation mode.
Future Work
1. The backend for this mode is merged in this commit. The screenshot of the current state of interface can be found here.
2. The interface is pretty much functional. However, a future task is to make use of a form handler while submitting the URL links for translation. The related issues are in this comment.
SpellChecker mode
Checks for the spelling of input text for a given language and suggests alternatives if the spelling is wrong.
Code
Backend
Frontend
Documentation
Backend
URL | Function | Parameters | Output |
---|---|---|---|
/speller | Performs spellchecking on a given text for a given language |
|
Returns the spellchecking results
curl -Ss 'http://localhost:2737/speller?lang=hin&q=माय' | ascii2uni -a U -q [{"sugg": [["काय", "1.000000"], ["चाय", "1.000000"], ["राय", "1.000000"], ["हाय", "1.000000"], ["साय", "1.000000"], ["मा", "1.000000"], ["वाय", "1.000000"], ["दाय", "1.000000"], ["गाय", "1.000000"], ["जाय", "1.000000"]], "known": false, "token": "माय"}] |
Frontend
ENABLED_MODES: an array of the enabled interfaces, a non-empty subset of ['translation', 'analyzation', 'generation', 'sandbox', 'speller']
speller
turns on spell checking mode.
Future Work
1. The screenshot of the current state of interface can be found here.
2. Improving the logic of mapping the suggestions returned from the backend for the tokens appropriately to the corresponding text on the frontend.
Dictionary Lookup mode
An interface that generates all forms of a given word. It renders the definitions of a given word for a given language pair after translating them.
Code
Backend
Frontend
Documentation
Backend
URL | Function | Parameters | Output |
---|---|---|---|
/dictionaryLookup | Generate dictionary forms of a given word |
|
Returns the possible forms of after translation
curl -Ss 'http://localhost:2737/dictionaryLookup?langpair=eng|spa&q=light' {"vblex": ["encender", "iluminar"], "n": ["luz"], "adj": ["ligero", "claro"]} |
Frontend
ENABLED_MODES: an array of the enabled interfaces, a non-empty subset of ['translation', 'analyzation', 'generation', 'sandbox']
translation lookup
turns on dictionary lookup mode.
Future Work
1. The screenshot of the current state of interface can be found here.
2. The pending tasks with respect to dictionary lookup mode are discussed in this comment.
Installation Notification
A notification that appears when the requests made to the APy take more than a threshold time. This notification also appears when a cumulative average of the requests duration exceeds a certain threshold indicating that the servers may be overloaded and thus, one could set the APy locally too.