C# Класс ACAT.Extensions.Default.WordPredictors.PresageWCF.PresageWordPredictor

Наследование: IWordPredictor
Показать файл Открыть проект

Открытые методы

Метод Описание
Dispose ( ) : void

Disposer for this class

Init ( ) : bool

Performs initialization. Must be called first. Sets word prediction parameters and initializes Presage

Learn ( String text ) : bool

Adds the specified text to the user's personal word prediction model to learn the user's writing style. This makes word prediciton more relevant.

LoadContext ( String text ) : int

Loads the text into a temporary context. This could for instance be the text from a notepad or word document. This makes word prediction more contextual to the document being edited. Call UnloadContext to unload it. This function is not currently supported.

LoadDefaultSettings ( ) : bool

Returns factory default settings.

LoadSettings ( String settingsFilePath ) : bool

Loads settings from the specified file and sets properties from the settings file.

Predict ( String prevWords, String currentWord ) : IEnumerable

Returns a list of next word predictions based on the context from the previous words in the sentence. The number of words returned is set by the PredictionWordCount property

SaveSettings ( String settingsFilePath ) : bool

Saves the word predictor settings to a file that is maintained by the word predictor.

UnloadContext ( int contextHandle ) : void

Unloads previously loaded context (see LoadContext). Not used.

Приватные методы

Метод Описание
checkAndRunPresage ( ) : void

Checks if Presage is already running, if not launches it.

deletePresageConfigFile ( ) : void

Deletes the presage.xml file that is in the users folder.

getPresageInstallDir ( ) : string

Returns the install dir of the Presage word predictor

initPresage ( ) : bool

Initializes the Presage word prediction engine.

isPresageRunning ( ) : bool

Checks if Presage wcf tray app is running

matchPrefix ( String prefix, String word ) : bool

Checks to see how much of the prefix matches with the specified word. The preference setting WordPredictionFilterMatchPrefixLengthAdjust controls how many chars to match. If a match if found, returns true

predict ( String prevWords, String currentWord, bool &success ) : IEnumerable

Returns a list of next word predictions based on the context from the previous words in the sentence. The number of words returned is set by the PredictionWordCount property

runPresage ( ) : void

Runs the Presage WCF tray app

updateSettings ( ACAT.Lib.Extension.ACATPreferences prefs ) : void

Updates class variables with ACAT settings stored in prefs

Описание методов

Dispose() публичный Метод

Disposer for this class
public Dispose ( ) : void
Результат void

Init() публичный Метод

Performs initialization. Must be called first. Sets word prediction parameters and initializes Presage
public Init ( ) : bool
Результат bool

Learn() публичный Метод

Adds the specified text to the user's personal word prediction model to learn the user's writing style. This makes word prediciton more relevant.
public Learn ( String text ) : bool
text String Text to add
Результат bool

LoadContext() публичный Метод

Loads the text into a temporary context. This could for instance be the text from a notepad or word document. This makes word prediction more contextual to the document being edited. Call UnloadContext to unload it. This function is not currently supported.
public LoadContext ( String text ) : int
text String Text to add to the context
Результат int

LoadDefaultSettings() публичный Метод

Returns factory default settings.
public LoadDefaultSettings ( ) : bool
Результат bool

LoadSettings() публичный Метод

Loads settings from the specified file and sets properties from the settings file.
public LoadSettings ( String settingsFilePath ) : bool
settingsFilePath String path to the settings file
Результат bool

Predict() публичный Метод

Returns a list of next word predictions based on the context from the previous words in the sentence. The number of words returned is set by the PredictionWordCount property
public Predict ( String prevWords, String currentWord ) : IEnumerable
prevWords String Previous words in the sentence
currentWord String current word (may be partially spelt out
Результат IEnumerable

SaveSettings() публичный Метод

Saves the word predictor settings to a file that is maintained by the word predictor.
public SaveSettings ( String settingsFilePath ) : bool
settingsFilePath String Directory where the settings are stored
Результат bool

UnloadContext() публичный Метод

Unloads previously loaded context (see LoadContext). Not used.
public UnloadContext ( int contextHandle ) : void
contextHandle int the handle
Результат void