private static SybilleWordPredictorEngine DoCreate( string predictorName, string pluginResourcePath, string userPath, IService<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" );
}
}