48 references to PretrainedModelKind
Microsoft.ML.Core.Tests (1)
UnitTests\TestEntryPoints.cs (1)
4539ModelKind = WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding
Microsoft.ML.PerformanceTests (1)
StochasticDualCoordinateAscentClassifierBench.cs (1)
113WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding)
Microsoft.ML.Samples (1)
Dynamic\Transforms\Text\ApplyWordEmbedding.cs (1)
40"Tokens", WordEmbeddingEstimator.PretrainedModelKind
Microsoft.ML.Tests (2)
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (1)
543WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding));
Transformers\WordEmbeddingsTests.cs (1)
46var pipe = ML.Transforms.Text.ApplyWordEmbedding("WordEmbeddings", "CleanWords", modelKind: WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding);
Microsoft.ML.Transforms (43)
Text\TextCatalog.cs (6)
154/// <param name="modelKind">The embeddings <see cref="WordEmbeddingEstimator.PretrainedModelKind"/> to use. </param> 165WordEmbeddingEstimator.PretrainedModelKind modelKind = WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding) 198/// <param name="modelKind">The embeddings <see cref="WordEmbeddingEstimator.PretrainedModelKind"/> to use. </param> 209WordEmbeddingEstimator.PretrainedModelKind modelKind = WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding,
Text\WordEmbeddingsExtractor.cs (37)
65public WordEmbeddingEstimator.PretrainedModelKind? ModelKind = WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding; 89private readonly WordEmbeddingEstimator.PretrainedModelKind? _modelKind; 161WordEmbeddingEstimator.PretrainedModelKind modelKind = WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding) 184internal WordEmbeddingTransformer(IHostEnvironment env, WordEmbeddingEstimator.PretrainedModelKind modelKind, params WordEmbeddingEstimator.ColumnOptions[] columns) 187env.CheckUserArg(Enum.IsDefined(typeof(WordEmbeddingEstimator.PretrainedModelKind), modelKind), nameof(modelKind)); 190_modelFileNameWithPath = EnsureModelFile(env, out _linesToSkip, (WordEmbeddingEstimator.PretrainedModelKind)_modelKind); 226options.ModelKind = WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding; 227env.CheckUserArg(!options.ModelKind.HasValue || Enum.IsDefined(typeof(WordEmbeddingEstimator.PretrainedModelKind), options.ModelKind), nameof(options.ModelKind)); 260_modelKind = (WordEmbeddingEstimator.PretrainedModelKind)ctx.Reader.ReadUInt32(); 261_modelFileNameWithPath = EnsureModelFile(Host, out _linesToSkip, (WordEmbeddingEstimator.PretrainedModelKind)_modelKind); 605private static readonly Dictionary<WordEmbeddingEstimator.PretrainedModelKind, string> _modelsMetaData = new Dictionary<WordEmbeddingEstimator.PretrainedModelKind, string>() 607{ WordEmbeddingEstimator.PretrainedModelKind.GloVe50D, "glove.6B.50d.txt" }, 608{ WordEmbeddingEstimator.PretrainedModelKind.GloVe100D, "glove.6B.100d.txt" }, 609{ WordEmbeddingEstimator.PretrainedModelKind.GloVe200D, "glove.6B.200d.txt" }, 610{ WordEmbeddingEstimator.PretrainedModelKind.GloVe300D, "glove.6B.300d.txt" }, 611{ WordEmbeddingEstimator.PretrainedModelKind.GloVeTwitter25D, "glove.twitter.27B.25d.txt" }, 612{ WordEmbeddingEstimator.PretrainedModelKind.GloVeTwitter50D, "glove.twitter.27B.50d.txt" }, 613{ WordEmbeddingEstimator.PretrainedModelKind.GloVeTwitter100D, "glove.twitter.27B.100d.txt" }, 614{ WordEmbeddingEstimator.PretrainedModelKind.GloVeTwitter200D, "glove.twitter.27B.200d.txt" }, 615{ WordEmbeddingEstimator.PretrainedModelKind.FastTextWikipedia300D, "wiki.en.vec" }, 616{ WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding, "sentiment.emd" } 619private static readonly Dictionary<WordEmbeddingEstimator.PretrainedModelKind, int> _linesToSkipInModels = new Dictionary<WordEmbeddingEstimator.PretrainedModelKind, int>() 620{ { WordEmbeddingEstimator.PretrainedModelKind.FastTextWikipedia300D, 1 } }; 622private string EnsureModelFile(IHostEnvironment env, out int linesToSkip, WordEmbeddingEstimator.PretrainedModelKind kind) 632string dir = kind == WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding ? Path.Combine("Text", "Sswe") : "WordVectors"; 761/// <seealso cref="TextCatalog.ApplyWordEmbedding(TransformsCatalog.TextTransforms, string, string, PretrainedModelKind)"/> 767private readonly PretrainedModelKind? _modelKind; 779/// <param name="modelKind">The embeddings <see cref="PretrainedModelKind"/> to use. </param> 781PretrainedModelKind modelKind = PretrainedModelKind.SentimentSpecificWordEmbedding) 808/// <param name="modelKind">The embeddings <see cref="PretrainedModelKind"/> to use. </param> 811PretrainedModelKind modelKind = PretrainedModelKind.SentimentSpecificWordEmbedding,