Home Reference Source

Function

Static Public Summary
public

Classifier(classifier: *, stemmer: *)

public

Exchanges all keys with their associated values in an object.

public

merge(var_args: ...Object<string, string>): Object<string, string>

Merge several objects.

public

replacer(translationTable: Object<string, string>): function

Generate a replacing function given a table of patterns.

public

Static Public

public Classifier(classifier: *, stemmer: *) source

Params:

NameTypeAttributeDescription
classifier *
stemmer *

public flip(obj: Object<string, string>): Object<string, string> source

Exchanges all keys with their associated values in an object.

Params:

NameTypeAttributeDescription
obj Object<string, string>

An object of strings.

Return:

Object<string, string>

An object of strings.

public merge(var_args: ...Object<string, string>): Object<string, string> source

Merge several objects. Properties from earlier objects are overwritten by laters's in case of conflict.

Params:

NameTypeAttributeDescription
var_args ...Object<string, string>

One or more objects of strings.

Return:

Object<string, string> (nullable: false)

An object of strings.

public replacer(translationTable: Object<string, string>): function source

Generate a replacing function given a table of patterns. Inspired by: http://code.google.com/p/jslibs/wiki/JavascriptTips#String_converter The order of elements is significant. Longer elements should be listed first.

Params:

NameTypeAttributeDescription
translationTable Object<string, string>

The translation table of key value.

Return:

function

A translating function.

See:

public stemmer() source