-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Note: Tests still WIP - search done - list pretty much done - rest to follow
- Loading branch information
Showing
37 changed files
with
1,324 additions
and
6,905 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export declare const endpoints: { | ||
fwew_url: string; | ||
fwew_1d_url: string; | ||
fwew_simple_url: string; | ||
fwew_reverse_url: string; | ||
fwew_1d_reverse_url: string; | ||
search_url: string; | ||
list_url: string; | ||
list_filter_url: string; | ||
random_url: string; | ||
random_filter_url: string; | ||
number_to_navi_url: string; | ||
navi_to_number_url: string; | ||
lenition_url: string; | ||
version_url: string; | ||
name_single_url: string; | ||
name_full_url: string; | ||
name_alu_url: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,42 @@ | ||
import { Word } from './word'; | ||
import type { LanguageCode, Word } from './types'; | ||
/** | ||
* Translate some Na'vi text. | ||
* | ||
* !! Only one word is allowed, if spaces are found, they will be treated like part of the word !! | ||
* This will return an array of Words, that fit the input text | ||
* One Navi-Word can have multiple meanings and words (e.g. synonyms) | ||
* | ||
* @param {string} searchNaviWord word to search | ||
* @return {Word[]} array of matching Fwew Word | ||
* Search 1 or more words in both directions (Na'vi first) | ||
* @param {LanguageCode} lang | ||
* @param {string} words | ||
* @returns {Word[][]} | ||
*/ | ||
export declare function translateFromNavi(searchNaviWord: string): Word[]; | ||
declare function search(lang: LanguageCode, words: string): Promise<Word[][]>; | ||
/** | ||
* Translate some localized text | ||
* | ||
* @param {string} searchWord - localized word to lookup | ||
* @param {string} langCode - language code | ||
* @returns {Word[]} array of matching Fwew Word | ||
* Search 1 or more words Na'vi -> Local | ||
* @param {string} navi | ||
* @returns {Word[][]} | ||
*/ | ||
export declare function translateToNavi(searchWord: string, langCode: string): Word[]; | ||
declare function fwew(navi: string): Promise<Word[][]>; | ||
/** | ||
* Search 1 or more words Local -> Na'vi | ||
* @param {LanguageCode} lang | ||
* @param {string} local | ||
* @returns {Word[][]} | ||
*/ | ||
declare function fwewReverse(lang: LanguageCode, local: string): Promise<Word[][]>; | ||
/** | ||
* Search 1 or more words Na'vi -> Local, return only 1D array | ||
* @param {string} navi | ||
* @returns {Word[]} | ||
*/ | ||
declare function fwew1D(navi: string): Promise<Word[]>; | ||
/** | ||
* Search 1 or more words Local -> Na'vi, return only 1D array | ||
* @param {LanguageCode} lang | ||
* @param {string} local | ||
* @returns {Word[]} | ||
*/ | ||
declare function fwew1DReverse(lang: LanguageCode, local: string): Promise<Word[]>; | ||
/** | ||
* Search 1 or more words Na'vi -> Local, ignoring all affixed words | ||
* Use this only when you know you are searching a listed root word | ||
* @param {string} navi | ||
* @returns {Word[][]} | ||
*/ | ||
declare function fwewSimple(navi: string): Promise<Word[][]>; | ||
export { fwew, fwew1D, fwew1DReverse, fwewReverse, fwewSimple, search }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import * as fwew from './fwew'; | ||
import { Affix, WordData, Word, getWords } from './word'; | ||
import { fwew, fwew1D, fwew1DReverse, fwewReverse, fwewSimple, search } from './fwew'; | ||
import { list } from './list'; | ||
import { nameAlu, nameFull, nameSingle } from './names'; | ||
import { naviToNumber, numberToNavi } from './numbers'; | ||
import { random } from './random'; | ||
import * as numbers from './numbers'; | ||
import { getLenitionTable, prefix, suffix, infix, lenite, reconstruct } from './affixes'; | ||
import * as util from './util'; | ||
export { fwew, Affix, WordData, Word, getWords, list, random, numbers, getLenitionTable, prefix, suffix, infix, lenite, reconstruct, util }; | ||
import { lenition, version } from './util'; | ||
export { fwew, fwew1D, fwew1DReverse, fwewReverse, fwewSimple, lenition, list, nameAlu, nameFull, nameSingle, naviToNumber, numberToNavi, random, search, version }; |
Oops, something went wrong.