Global

Methods


DictionaryBuilder()

Build dictionaries (token info, connection costs)

Generates from matrix.def cc.dat: Connection costs

Generates from *.csv dat.dat: Double array tid.dat: Token info dictionary tid_map.dat: targetMap tid_pos.dat: posList (part of speech)


stringToUtf8Bytes(str)

Convert String (UTF-16) to UTF-8 ArrayBuffer

Parameters:
Name Type Description
str String

UTF-16 string to convert

Returns:

Byte sequence encoded by UTF-8

Type
Uint8Array

utf8BytesToString(bytes)

Convert UTF-8 ArrayBuffer to String (UTF-16)

Parameters:
Name Type Description
bytes Array

UTF-8 byte sequence to convert

Returns:

String encoded by UTF-16

Type
String