public SybilleWordPredictorEngine( IWordPredictorFeature wordPredictionFeature, string languageFileName, string userLanguageFileName, string userTextsFileName, string semMatrix, string semWords, string semLambdas ) { _sybille = new Sybille.WordPredictor( languageFileName, userLanguageFileName, userTextsFileName, semMatrix, semWords, semLambdas ); _sybille.FilterAlreadyShownWords = wordPredictionFeature.FilterAlreadyShownWords; _wordPredictionFeature = wordPredictionFeature; _wordPredictionFeature.PropertyChanged += OnWordPredictionFeaturePropertyChanged; }
public SybilleWordPredictorEngineFactory( Func<string> pluginResourceDirectory, Func<string> userPath, IWordPredictorFeature predictorFeature ) { if( pluginResourceDirectory == null ) throw new ArgumentNullException( "pluginResourceDirectory" ); if( userPath == null ) throw new ArgumentNullException( "userPath" ); if( predictorFeature == null ) throw new ArgumentNullException( "predictorFeature" ); _pluginResourceDirectory = pluginResourceDirectory; _userPath = userPath; _predictorFeature = predictorFeature; }
private static IWordPredictorEngine DoCreate( string predictorName, string pluginResourcePath, string userPath, IWordPredictorFeature predictorFeature ) { string userTextsFilePath = EnsureFileCreation( userPath, "UserTexts_fr.txt" ); string userPredictorSibFilePath = EnsureFileCopy( Path.Combine( pluginResourcePath, _sybileDataPath ), userPath, "UserPredictor_fr.sib" ); switch( predictorName.ToLowerInvariant() ) { case "sybille": return new SybilleWordPredictorEngine( predictorFeature, Path.Combine( pluginResourcePath, _sybileDataPath, "LMbin_fr.sib" ), userPredictorSibFilePath, userTextsFilePath ); case "sem-sybille": return new SybilleWordPredictorEngine( predictorFeature, Path.Combine( pluginResourcePath, _sybileDataPath, "LMbin_fr.sib" ), userPredictorSibFilePath, userTextsFilePath, Path.Combine( pluginResourcePath, _sybileDataPath, "SemMatrix_fr.bin" ), Path.Combine( pluginResourcePath, _sybileDataPath, "SemWords_fr.txt" ), Path.Combine( pluginResourcePath, _sybileDataPath, "SemLambdas_fr.txt" ) ); default: throw new ArgumentException( String.Format( "There is no word predictor engine for the name: {0}", predictorName ), "predictorName" ); } }
public DefaultKeyboardContextPredictionFactory( IKeyboardContext keyboardContext, IWordPredictorFeature feature ) { _keyboardContext = keyboardContext; _feature = feature; }
public AutonomousKeyboardPredictionFactory( IKeyboardContext keyboardContext, IWordPredictorFeature feature ) : base(keyboardContext, feature) { }
public SybilleWordPredictorEngineFactory( Func<string> pluginResourceDirectory, IWordPredictorFeature predictorFeature ) : this(pluginResourceDirectory, pluginResourceDirectory, predictorFeature) { }