Here's a first, tentative list of functions that should be available in the API. In this first draft, the function names are prefixed with OLA, short for Open Linuistic API.
The upper side, where applications or end users ask for linguistic services
- count-words (or probably count-strings, as "words" is quite ambiguous)
- parse-document. Returns: true/false depending on whether the parse succeeded. Within the library, the LDOM is stored, that is: basic document structure + default, language independent flat analysis/statistics + language identification + whatever ling. analyses are returned by the ling. processing
This set of functions is meant to ease integration with existing API's in applications such as OpenOffice.org, etc.
- OLA_check_spelling(word, language) -> true/false
- OLA_get_speller_suggestions(word, language) -> ordered list of strings
- OLA_add_word_to_user_dictionary(word, language) -> boolean (succeed)
- OLA_ignore_word(word) -> boolean (succeed)
- OLA_reject_word_in_speller(word, language) -> boolean (succeed)
MS Office AS verbs
- apply correction v : Replaces a range with the value of the specified autocorrect entry.
- check grammar v : Begins a grammar check for the text range. Returns true if the text range had no errors
- check spelling v : Begins a spelling check for the text range. Returns true if the text range had no errors
- check synonyms v : Displays the thesaurus dialog box, which lists alternative word choices, or synonyms, for the text in the text range.
- get spelling suggestions v : Returns a record that specifies the error kind and a list of words. The AEKeyword for the error kind is type and AEKeyword for the list is list.
- get synonym info object v : Returns a synonym info object that contains the information from the thesaurus on the synonyms, antonyms, or related words and expressions for the specified word or phrase.
- get synonym list for v : Get the list of synonyms for a particular word
- get synonym list from v : Get the list of synonyms using an index into the list of meanings
- text range spelling suggestions v : Returns a record that contains the spelling error type and the list of words suggested as replacements for the first word in the specified range
The lower side, where language technology tools integrate to offer their services in a uniform way by way of the library/API/Upper side.
- we need encryption on both sides: document content and linguistic analysis, if requested by user or tool provider
- document interface functions
- word-level or lexical entity corrections
- sentence or paragraph level corrections
- document-level corrections
- text prediction functions
- functions for manipulating linguistic entities, structures and relationship