From afe3ee7b99b33f139c9a0aa450a8aa164848dc2b Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Thu, 21 Feb 2019 13:45:41 -0800 Subject: [PATCH 01/12] Hide the uses of DataKind in TypeConverting --- src/Microsoft.ML.Core/Data/DataKind.cs | 78 +++++++++++++++---- .../ConversionsExtensionsCatalog.cs | 6 +- .../Transforms/TypeConverting.cs | 44 ++++++----- .../FeatureCombiner.cs | 4 +- src/Microsoft.ML.FastTree/FastTree.cs | 2 +- .../TransformsStatic.cs | 2 +- .../MissingValueHandlingTransformer.cs | 2 +- .../Transformers/ConvertTests.cs | 36 ++++----- 8 files changed, 111 insertions(+), 63 deletions(-) diff --git a/src/Microsoft.ML.Core/Data/DataKind.cs b/src/Microsoft.ML.Core/Data/DataKind.cs index b65610bacf..cda5728224 100644 --- a/src/Microsoft.ML.Core/Data/DataKind.cs +++ b/src/Microsoft.ML.Core/Data/DataKind.cs @@ -8,7 +8,49 @@ namespace Microsoft.ML.Data { /// - /// Data type specifier. + /// Data type specifier used in text loader and type converters. + /// + /// + /// + /// : 1-byte integer, type of . + /// : 1-byte unsigned integer, type of . + /// : 2-byte integer, type of . + /// : 2-byte usigned integer, type of . + /// : 4-byte integer, type of . + /// : 4-byte usigned integer, type of . + /// : 8-byte integer, type of . + /// : 8-byte usigned integer, type of . + /// : 4-byte floating-point number, type of . + /// : 8-byte floating-point number, type of . + /// : string, type of . + /// : boolean variable type, type of . + /// : type of . + /// : type of . + /// : type of . + /// + /// + public enum ScalarType : byte + { + SByte = 1, + Byte = 2, + Int16 = 3, + UInt16 = 4, + Int32 = 5, + UInt32 = 6, + Int64 = 7, + UInt64 = 8, + Single = 9, + Double = 10, + String = 11, + Boolean = 12, + TimeSpan = 13, + DateTime = 14, + DateTimeOffset = 15, + } + + /// + /// Data type specifier used in command line. is the underlying version of + /// used for command line and entry point BC. /// public enum DataKind : byte { @@ -17,31 +59,31 @@ public enum DataKind : byte // * We intentionally skip zero. // * Some code depends on sizeof(DataKind) == sizeof(byte). - I1 = 1, - U1 = 2, - I2 = 3, - U2 = 4, - I4 = 5, - U4 = 6, - I8 = 7, - U8 = 8, - R4 = 9, - R8 = 10, + I1 = ScalarType.SByte, + U1 = ScalarType.Byte, + I2 = ScalarType.Int16, + U2 = ScalarType.UInt16, + I4 = ScalarType.Int32, + U4 = ScalarType.UInt32, + I8 = ScalarType.Int64, + U8 = ScalarType.UInt64, + R4 = ScalarType.Single, + R8 = ScalarType.Double, Num = R4, - TX = 11, + TX = ScalarType.String, #pragma warning disable MSML_GeneralName // The data kind enum has its own logic, independent of C# naming conventions. TXT = TX, Text = TX, - BL = 12, + BL = ScalarType.Boolean, Bool = BL, - TS = 13, + TS = ScalarType.TimeSpan, TimeSpan = TS, - DT = 14, + DT = ScalarType.DateTime, DateTime = DT, - DZ = 15, + DZ = ScalarType.DateTimeOffset, DateTimeZone = DZ, UG = 16, // Unsigned 16-byte integer. @@ -76,6 +118,10 @@ public static DataKind FromIndex(int index) return (DataKind)(index + (int)KindMin); } + public static DataKind ToDataKind(this ScalarType scalarType) => (DataKind)scalarType; + + public static ScalarType ToScalarType(this DataKind kind) => (ScalarType)kind; + /// /// For integer DataKinds, this returns the maximum legal value. For un-supported kinds, /// it returns zero. diff --git a/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs b/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs index 8995e4a1d5..d906076480 100644 --- a/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs @@ -46,10 +46,10 @@ public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms /// The transform's catalog. /// Name of the column resulting from the transformation of . /// Name of the column to transform. If set to , the value of the will be used as source. - /// Number of bits to hash into. Must be between 1 and 31, inclusive. + /// The expected type of the converted column. public static TypeConvertingEstimator ConvertType(this TransformsCatalog.ConversionTransforms catalog, string outputColumnName, string inputColumnName = null, - DataKind outputKind = ConvertDefaults.DefaultOutputKind) - => new TypeConvertingEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnName, inputColumnName, outputKind); + ScalarType outputType = ConvertDefaults.DefaultOutputKind) + => new TypeConvertingEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnName, inputColumnName, outputType); /// /// Changes column type of the input column. diff --git a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs index 01c8f2877d..ab8b5e540e 100644 --- a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs +++ b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs @@ -189,10 +189,10 @@ private static (string outputColumnName, string inputColumnName)[] GetColumnPair /// Host Environment. /// Name of the output column. /// Name of the column to be transformed. If this is null '' will be used. - /// The expected type of the converted column. + /// The expected type of the converted column. /// New key count if we work with key type. - internal TypeConvertingTransformer(IHostEnvironment env, string outputColumnName, DataKind outputKind, string inputColumnName = null, KeyCount outputKeyCount = null) - : this(env, new TypeConvertingEstimator.ColumnInfo(outputColumnName, outputKind, inputColumnName ?? outputColumnName, outputKeyCount)) + internal TypeConvertingTransformer(IHostEnvironment env, string outputColumnName, ScalarType outputType, string inputColumnName = null, KeyCount outputKeyCount = null) + : this(env, new TypeConvertingEstimator.ColumnInfo(outputColumnName, outputType, inputColumnName ?? outputColumnName, outputKeyCount)) { } @@ -221,16 +221,16 @@ private protected override void SaveModel(ModelSaveContext ctx) for (int i = 0; i < _columns.Length; i++) { - Host.Assert((DataKind)(byte)_columns[i].OutputKind == _columns[i].OutputKind); + Host.Assert((DataKind)(byte)_columns[i].OutputType.ToDataKind() == _columns[i].OutputType.ToDataKind()); if (_columns[i].OutputKeyCount != null) { - byte b = (byte)_columns[i].OutputKind; + byte b = (byte)_columns[i].OutputType; b |= 0x80; ctx.Writer.Write(b); - ctx.Writer.Write(_columns[i].OutputKeyCount.Count ?? _columns[i].OutputKind.ToMaxInt()); + ctx.Writer.Write(_columns[i].OutputKeyCount.Count ?? _columns[i].OutputType.ToDataKind().ToMaxInt()); } else - ctx.Writer.Write((byte)_columns[i].OutputKind); + ctx.Writer.Write((byte)_columns[i].OutputType); } } @@ -289,7 +289,7 @@ private TypeConvertingTransformer(IHost host, ModelLoadContext ctx) keyCount = new KeyCount(count); } - _columns[i] = new TypeConvertingEstimator.ColumnInfo(ColumnPairs[i].outputColumnName, kind, ColumnPairs[i].inputColumnName, keyCount); + _columns[i] = new TypeConvertingEstimator.ColumnInfo(ColumnPairs[i].outputColumnName, kind.ToScalarType(), ColumnPairs[i].inputColumnName, keyCount); } } @@ -337,7 +337,7 @@ internal static IDataTransform Create(IHostEnvironment env, Options options, IDa { kind = tempResultType.Value; } - cols[i] = new TypeConvertingEstimator.ColumnInfo(item.Name, kind, item.Source ?? item.Name, keyCount); + cols[i] = new TypeConvertingEstimator.ColumnInfo(item.Name, kind.ToScalarType(), item.Source ?? item.Name, keyCount); }; return new TypeConvertingTransformer(env, cols).MakeDataTransform(input); } @@ -401,7 +401,8 @@ public Mapper(TypeConvertingTransformer parent, DataViewSchema inputSchema) { inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].inputColumnName, out _srcCols[i]); var srcCol = inputSchema[_srcCols[i]]; - if (!CanConvertToType(Host, srcCol.Type, _parent._columns[i].OutputKind, _parent._columns[i].OutputKeyCount, out PrimitiveDataViewType itemType, out _types[i])) + if (!CanConvertToType(Host, srcCol.Type, _parent._columns[i].OutputType.ToDataKind(), _parent._columns[i].OutputKeyCount, + out PrimitiveDataViewType itemType, out _types[i])) { throw Host.ExceptParam(nameof(inputSchema), "source column '{0}' with item type '{1}' is not compatible with destination type '{2}'", @@ -501,7 +502,7 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, string srcVariableName, var opType = "CSharp"; var node = ctx.CreateNode(opType, srcVariableName, dstVariableName, ctx.GetNodeName(opType)); node.AddAttribute("type", LoaderSignature); - node.AddAttribute("to", (byte)_parent._columns[iinfo].OutputKind); + node.AddAttribute("to", (byte)_parent._columns[iinfo].OutputType); if (_parent._columns[iinfo].OutputKeyCount != null) { var key = (KeyType)_types[iinfo].GetItemType(); @@ -520,7 +521,7 @@ public sealed class TypeConvertingEstimator : TrivialEstimator @@ -539,7 +540,7 @@ public sealed class ColumnInfo /// /// The expected kind of the converted column. /// - public readonly DataKind OutputKind; + internal readonly ScalarType OutputType; /// /// New key count, if we work with key type. /// @@ -549,14 +550,14 @@ public sealed class ColumnInfo /// Describes how the transformer handles one column pair. /// /// Name of the column resulting from the transformation of . - /// The expected kind of the converted column. + /// The expected kind of the converted column. /// Name of column to transform. If set to , the value of the will be used as source. /// New key count, if we work with key type. - public ColumnInfo(string name, DataKind outputKind, string inputColumnName, KeyCount outputKeyCount = null) + public ColumnInfo(string name, ScalarType outputType, string inputColumnName, KeyCount outputKeyCount = null) { Name = name; InputColumnName = inputColumnName ?? name; - OutputKind = outputKind; + OutputType = outputType; OutputKeyCount = outputKeyCount; } @@ -571,8 +572,9 @@ public ColumnInfo(string name, Type type, string inputColumnName, KeyCount outpu { Name = name; InputColumnName = inputColumnName ?? name; - if (!type.TryGetDataKind(out OutputKind)) + if (!type.TryGetDataKind(out DataKind OutputKind)) throw Contracts.ExceptUserArg(nameof(type), $"Unsupported type {type}."); + OutputType = OutputKind.ToScalarType(); OutputKeyCount = outputKeyCount; } } @@ -583,11 +585,11 @@ public ColumnInfo(string name, Type type, string inputColumnName, KeyCount outpu /// Host Environment. /// Name of the column resulting from the transformation of . /// Name of the column to transform. If set to , the value of the will be used as source. - /// The expected type of the converted column. + /// The expected type of the converted column. internal TypeConvertingEstimator(IHostEnvironment env, string outputColumnName, string inputColumnName = null, - DataKind outputKind = Defaults.DefaultOutputKind) - : this(env, new ColumnInfo(outputColumnName, outputKind, inputColumnName ?? outputColumnName)) + ScalarType outputType = Defaults.DefaultOutputKind) + : this(env, new ColumnInfo(outputColumnName, outputType, inputColumnName ?? outputColumnName)) { } @@ -611,7 +613,7 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) { if (!inputSchema.TryFindColumn(colInfo.InputColumnName, out var col)) throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.InputColumnName); - if (!TypeConvertingTransformer.GetNewType(Host, col.ItemType, colInfo.OutputKind, colInfo.OutputKeyCount, out PrimitiveDataViewType newType)) + if (!TypeConvertingTransformer.GetNewType(Host, col.ItemType, colInfo.OutputType.ToDataKind(), colInfo.OutputKeyCount, out PrimitiveDataViewType newType)) throw Host.ExceptParam(nameof(inputSchema), $"Can't convert {colInfo.InputColumnName} into {newType.ToString()}"); if (!Data.Conversion.Conversions.Instance.TryGetStandardConversion(col.ItemType, newType, out Delegate del, out bool identity)) throw Host.ExceptParam(nameof(inputSchema), $"Don't know how to convert {colInfo.InputColumnName} into {newType.ToString()}"); diff --git a/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs b/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs index 39d47559fc..917890b530 100644 --- a/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs +++ b/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs @@ -185,7 +185,7 @@ private static IDataView ApplyConvert(List c // This happens when the training is done on an XDF and the scoring is done on a data frame. var colName = GetUniqueName(); concatNames.Add(new KeyValuePair(col.Name, colName)); - Utils.Add(ref cvt, new TypeConvertingEstimator.ColumnInfo(colName, DataKind.R4, col.Name)); + Utils.Add(ref cvt, new TypeConvertingEstimator.ColumnInfo(colName, ScalarType.Single, col.Name)); continue; } } @@ -300,7 +300,7 @@ public static CommonOutputs.TransformOutput PrepareRegressionLabel(IHostEnvironm return new CommonOutputs.TransformOutput { Model = new TransformModelImpl(env, nop, input.Data), OutputData = nop }; } - var xf = new TypeConvertingTransformer(host, new TypeConvertingEstimator.ColumnInfo(input.LabelColumn, DataKind.R4, input.LabelColumn)).Transform(input.Data); + var xf = new TypeConvertingTransformer(host, new TypeConvertingEstimator.ColumnInfo(input.LabelColumn, ScalarType.Single, input.LabelColumn)).Transform(input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModelImpl(env, xf, input.Data), OutputData = xf }; } } diff --git a/src/Microsoft.ML.FastTree/FastTree.cs b/src/Microsoft.ML.FastTree/FastTree.cs index 12e62ec626..f6d4b16208 100644 --- a/src/Microsoft.ML.FastTree/FastTree.cs +++ b/src/Microsoft.ML.FastTree/FastTree.cs @@ -1375,7 +1375,7 @@ private Dataset Construct(RoleMappedData examples, ref int numExamples, int maxB } // Convert the group column, if one exists. if (examples.Schema.Group?.Name is string groupName) - data = new TypeConvertingTransformer(Host, new TypeConvertingEstimator.ColumnInfo(groupName, DataKind.U8, groupName)).Transform(data); + data = new TypeConvertingTransformer(Host, new TypeConvertingEstimator.ColumnInfo(groupName, ScalarType.UInt64, groupName)).Transform(data); // Since we've passed it through a few transforms, reconstitute the mapping on the // newly transformed data. diff --git a/src/Microsoft.ML.StaticPipe/TransformsStatic.cs b/src/Microsoft.ML.StaticPipe/TransformsStatic.cs index 4e42fd722c..d21cc2b859 100644 --- a/src/Microsoft.ML.StaticPipe/TransformsStatic.cs +++ b/src/Microsoft.ML.StaticPipe/TransformsStatic.cs @@ -936,7 +936,7 @@ public override IEstimator Reconcile(IHostEnvironment env, Pipelin for (int i = 0; i < toOutput.Length; ++i) { var tcol = (IConvertCol)toOutput[i]; - infos[i] = new TypeConvertingEstimator.ColumnInfo(outputNames[toOutput[i]], tcol.Kind, inputNames[tcol.Input]); + infos[i] = new TypeConvertingEstimator.ColumnInfo(outputNames[toOutput[i]], tcol.Kind.ToScalarType(), inputNames[tcol.Input]); } return new TypeConvertingEstimator(env, infos); } diff --git a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs index 2663b37257..8ab6a0aa84 100644 --- a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs +++ b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs @@ -185,7 +185,7 @@ internal static IDataTransform Create(IHostEnvironment env, Options options, IDa { throw h.Except("Cannot get a DataKind for type '{0}'", replaceItemType.RawType); } - naConvCols.Add(new TypeConvertingEstimator.ColumnInfo(tmpIsMissingColName, replaceItemTypeKind, tmpIsMissingColName)); + naConvCols.Add(new TypeConvertingEstimator.ColumnInfo(tmpIsMissingColName, replaceItemTypeKind.ToScalarType(), tmpIsMissingColName)); } // Add the NAReplaceTransform column. diff --git a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs index 53be5e8d1e..71a38d7a8e 100644 --- a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs @@ -75,8 +75,8 @@ public void TestConvertWorkout() var data = new[] { new TestClass() { A = 1, B = new int[2] { 1,4 } }, new TestClass() { A = 2, B = new int[2] { 3,4 } }}; var dataView = ML.Data.ReadFromEnumerable(data); - var pipe = ML.Transforms.Conversion.ConvertType(columns: new[] {new TypeConvertingEstimator.ColumnInfo("ConvA", DataKind.R4, "A"), - new TypeConvertingEstimator.ColumnInfo("ConvB", DataKind.R4, "B")}); + var pipe = ML.Transforms.Conversion.ConvertType(columns: new[] {new TypeConvertingEstimator.ColumnInfo("ConvA", ScalarType.Single, "A"), + new TypeConvertingEstimator.ColumnInfo("ConvB", ScalarType.Single, "B")}); TestEstimatorCore(pipe, dataView); var allTypesData = new[] @@ -115,18 +115,18 @@ public void TestConvertWorkout() var allTypesDataView = ML.Data.ReadFromEnumerable(allTypesData); var allTypesPipe = ML.Transforms.Conversion.ConvertType(columns: new[] { - new TypeConvertingEstimator.ColumnInfo("ConvA", DataKind.R4, "AA"), - new TypeConvertingEstimator.ColumnInfo("ConvB", DataKind.R4, "AB"), - new TypeConvertingEstimator.ColumnInfo("ConvC", DataKind.R4, "AC"), - new TypeConvertingEstimator.ColumnInfo("ConvD", DataKind.R4, "AD"), - new TypeConvertingEstimator.ColumnInfo("ConvE", DataKind.R4, "AE"), - new TypeConvertingEstimator.ColumnInfo("ConvF", DataKind.R4, "AF"), - new TypeConvertingEstimator.ColumnInfo("ConvG", DataKind.R4, "AG"), - new TypeConvertingEstimator.ColumnInfo("ConvH", DataKind.R4, "AH"), - new TypeConvertingEstimator.ColumnInfo("ConvK", DataKind.R4, "AK"), - new TypeConvertingEstimator.ColumnInfo("ConvL", DataKind.R4, "AL"), - new TypeConvertingEstimator.ColumnInfo("ConvM", DataKind.R4, "AM"), - new TypeConvertingEstimator.ColumnInfo("ConvN", DataKind.R4, "AN")} + new TypeConvertingEstimator.ColumnInfo("ConvA", ScalarType.Single, "AA"), + new TypeConvertingEstimator.ColumnInfo("ConvB", ScalarType.Single, "AB"), + new TypeConvertingEstimator.ColumnInfo("ConvC", ScalarType.Single, "AC"), + new TypeConvertingEstimator.ColumnInfo("ConvD", ScalarType.Single, "AD"), + new TypeConvertingEstimator.ColumnInfo("ConvE", ScalarType.Single, "AE"), + new TypeConvertingEstimator.ColumnInfo("ConvF", ScalarType.Single, "AF"), + new TypeConvertingEstimator.ColumnInfo("ConvG", ScalarType.Single, "AG"), + new TypeConvertingEstimator.ColumnInfo("ConvH", ScalarType.Single, "AH"), + new TypeConvertingEstimator.ColumnInfo("ConvK", ScalarType.Single, "AK"), + new TypeConvertingEstimator.ColumnInfo("ConvL", ScalarType.Single, "AL"), + new TypeConvertingEstimator.ColumnInfo("ConvM", ScalarType.Single, "AM"), + new TypeConvertingEstimator.ColumnInfo("ConvN", ScalarType.Single, "AN")} ); TestEstimatorCore(allTypesPipe, allTypesDataView); @@ -207,8 +207,8 @@ public void TestMetadata() new OneHotEncodingEstimator.ColumnInfo("CatA", "A", OneHotEncodingTransformer.OutputKind.Ind), new OneHotEncodingEstimator.ColumnInfo("CatB", "B", OneHotEncodingTransformer.OutputKind.Key) }).Append(ML.Transforms.Conversion.ConvertType(new[] { - new TypeConvertingEstimator.ColumnInfo("ConvA", DataKind.R8, "CatA"), - new TypeConvertingEstimator.ColumnInfo("ConvB", DataKind.U2, "CatB") + new TypeConvertingEstimator.ColumnInfo("ConvA", ScalarType.Double, "CatA"), + new TypeConvertingEstimator.ColumnInfo("ConvB", ScalarType.UInt16, "CatB") })); var dataView = ML.Data.ReadFromEnumerable(data); dataView = pipe.Fit(dataView).Transform(dataView); @@ -243,7 +243,7 @@ public void TypeConvertKeyBackCompatTest() { // Model generated using the following command before the change removing Min and Count from KeyType. // ML.Transforms.Conversion.ConvertType(new[] { new TypeConvertingEstimator.ColumnInfo("key", "convertedKey", - // DataKind.U8, new KeyCount(4)) }).Fit(dataView); + // ScalarType.Ulong, new KeyCount(4)) }).Fit(dataView); var dataArray = new[] { new SimpleSchemaUIntColumn() { key = 0 }, @@ -266,7 +266,7 @@ public void TypeConvertKeyBackCompatTest() var outDataOld = modelOld.Transform(dataView); var modelNew = ML.Transforms.Conversion.ConvertType(new[] { new TypeConvertingEstimator.ColumnInfo("convertedKey", - DataKind.U8, "key", new KeyCount(4)) }).Fit(dataView); + ScalarType.UInt64, "key", new KeyCount(4)) }).Fit(dataView); var outDataNew = modelNew.Transform(dataView); // Check that old and new model produce the same result. From ac7f822ccd500f1ad606935f898bd6e1c9c17a96 Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Thu, 21 Feb 2019 15:24:20 -0800 Subject: [PATCH 02/12] Hide DataKind used in TextLoader --- .../Dynamic/Calibrator.cs | 4 +- .../Dynamic/FeatureSelectionTransform.cs | 4 +- .../Dynamic/FieldAwareFactorizationMachine.cs | 4 +- .../ImageAnalytics/ConvertToGrayScale.cs | 4 +- .../Dynamic/ImageAnalytics/ExtractPixels.cs | 4 +- .../Dynamic/ImageAnalytics/LoadImages.cs | 4 +- .../Dynamic/ImageAnalytics/ResizeImages.cs | 4 +- .../Dynamic/LogisticRegression.cs | 30 +++++----- .../Dynamic/TensorFlow/TextClassification.cs | 4 +- .../SDCALogisticRegression.cs | 4 +- .../Dynamic/Trainers/PriorTrainerSample.cs | 4 +- .../Dynamic/Trainers/RandomTrainerSample.cs | 4 +- .../Regression/OrdinaryLeastSquares.cs | 4 +- .../OrdinaryLeastSquaresWithOptions.cs | 4 +- .../DataLoadSave/Text/TextLoader.cs | 31 ++++++++--- .../Transforms/ValueMapping.cs | 12 ++-- .../ValueToKeyMappingTransformer.cs | 2 +- .../SamplesDatasetUtils.cs | 55 +++++++++---------- .../Text/StopWordsRemovingTransformer.cs | 2 +- .../KMeansAndLogisticRegressionBench.cs | 6 +- .../PredictionEngineBench.cs | 22 ++++---- test/Microsoft.ML.Benchmarks/RffTransform.cs | 4 +- ...sticDualCoordinateAscentClassifierBench.cs | 35 ++++-------- .../UnitTests/TestEntryPoints.cs | 34 ++++++------ .../UnitTests/TestHosts.cs | 3 +- test/Microsoft.ML.Functional.Tests/Common.cs | 1 - .../Datasets/TypeTestData.cs | 39 ++++++------- .../TestIniModels.cs | 14 ++--- test/Microsoft.ML.TestFramework/Datasets.cs | 38 ++++++------- .../AnomalyDetectionTests.cs | 12 +--- test/Microsoft.ML.Tests/ImagesTests.cs | 52 +++++++++--------- .../CookbookSamplesDynamicApi.cs | 16 +++--- .../Scenarios/Api/TestApi.cs | 8 +-- .../Scenarios/IrisPlantClassificationTests.cs | 10 ++-- ...PlantClassificationWithStringLabelTests.cs | 10 ++-- test/Microsoft.ML.Tests/Scenarios/OvaTest.cs | 16 +++--- .../Scenarios/TensorflowTests.cs | 4 +- .../IrisPlantClassificationTests.cs | 10 ++-- .../TensorflowTests.cs | 36 ++++++------ test/Microsoft.ML.Tests/TermEstimatorTests.cs | 15 +++-- .../TrainerEstimators/FAFMEstimator.cs | 11 ++-- .../MatrixFactorizationTests.cs | 6 +- .../TrainerEstimators/PriorRandomTests.cs | 9 ++- .../TrainerEstimators/TrainerEstimators.cs | 28 +++++----- .../Transformers/ConcatTests.cs | 16 +++--- .../Transformers/CustomMappingTests.cs | 10 ++-- .../Transformers/KeyToValueTests.cs | 12 +--- .../Transformers/NormalizerTests.cs | 28 +++++----- .../Transformers/TextFeaturizerTests.cs | 2 +- .../Transformers/WordEmbeddingsTests.cs | 9 ++- 50 files changed, 334 insertions(+), 366 deletions(-) diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Calibrator.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Calibrator.cs index 77812ed9c2..179698fde7 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Calibrator.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Calibrator.cs @@ -34,8 +34,8 @@ public static void Example() HasHeader = true, Columns = new[] { - new TextLoader.Column("Sentiment", DataKind.BL, 0), - new TextLoader.Column("SentimentText", DataKind.Text, 1) + new TextLoader.Column("Sentiment", ScalarType.Boolean, 0), + new TextLoader.Column("SentimentText", ScalarType.String, 1) } }); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/FeatureSelectionTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/FeatureSelectionTransform.cs index 294b12f609..d36f1b3b1e 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/FeatureSelectionTransform.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/FeatureSelectionTransform.cs @@ -33,8 +33,8 @@ public static void Example() var reader = ml.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Label", DataKind.BL, 0), - new TextLoader.Column("Features", DataKind.Num, new [] { new TextLoader.Range(1, 9) }) + new TextLoader.Column("Label", ScalarType.Boolean, 0), + new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 9) }) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/FieldAwareFactorizationMachine.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/FieldAwareFactorizationMachine.cs index 0f8f3fec83..88486b91b8 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/FieldAwareFactorizationMachine.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/FieldAwareFactorizationMachine.cs @@ -25,8 +25,8 @@ public static void Example() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Sentiment", DataKind.BL, 0), - new TextLoader.Column("SentimentText", DataKind.Text, 1) + new TextLoader.Column("Sentiment", ScalarType.Boolean, 0), + new TextLoader.Column("SentimentText", ScalarType.String, 1) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ConvertToGrayScale.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ConvertToGrayScale.cs index b168575290..0b77d606e5 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ConvertToGrayScale.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ConvertToGrayScale.cs @@ -27,8 +27,8 @@ public static void Example() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }).Read(imagesDataFile); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ExtractPixels.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ExtractPixels.cs index eb7e164004..3a4910d6fd 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ExtractPixels.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ExtractPixels.cs @@ -28,8 +28,8 @@ public static void Example() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }).Read(imagesDataFile); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/LoadImages.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/LoadImages.cs index 541f564283..34eaaa55e5 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/LoadImages.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/LoadImages.cs @@ -27,8 +27,8 @@ public static void Example() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }).Read(imagesDataFile); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ResizeImages.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ResizeImages.cs index 03ada5304e..4370ce311b 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ResizeImages.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ResizeImages.cs @@ -27,8 +27,8 @@ public static void Example() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }).Read(imagesDataFile); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/LogisticRegression.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/LogisticRegression.cs index 1a6aacfe33..d89d6a4d4d 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/LogisticRegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/LogisticRegression.cs @@ -37,21 +37,21 @@ public static void Example() HasHeader = true, Columns = new[] { - new TextLoader.Column("age", DataKind.R4, 0), - new TextLoader.Column("workclass", DataKind.Text, 1), - new TextLoader.Column("fnlwgt", DataKind.R4, 2), - new TextLoader.Column("education", DataKind.Text, 3), - new TextLoader.Column("education-num", DataKind.R4, 4), - new TextLoader.Column("marital-status", DataKind.Text, 5), - new TextLoader.Column("occupation", DataKind.Text, 6), - new TextLoader.Column("relationship", DataKind.Text, 7), - new TextLoader.Column("ethnicity", DataKind.Text, 8), - new TextLoader.Column("sex", DataKind.Text, 9), - new TextLoader.Column("capital-gain", DataKind.R4, 10), - new TextLoader.Column("capital-loss", DataKind.R4, 11), - new TextLoader.Column("hours-per-week", DataKind.R4, 12), - new TextLoader.Column("native-country", DataKind.Text, 13), - new TextLoader.Column("Label", DataKind.Bool, 14) + new TextLoader.Column("age", ScalarType.Single, 0), + new TextLoader.Column("workclass", ScalarType.String, 1), + new TextLoader.Column("fnlwgt", ScalarType.Single, 2), + new TextLoader.Column("education", ScalarType.String, 3), + new TextLoader.Column("education-num", ScalarType.Single, 4), + new TextLoader.Column("marital-status", ScalarType.String, 5), + new TextLoader.Column("occupation", ScalarType.String, 6), + new TextLoader.Column("relationship", ScalarType.String, 7), + new TextLoader.Column("ethnicity", ScalarType.String, 8), + new TextLoader.Column("sex", ScalarType.String, 9), + new TextLoader.Column("capital-gain", ScalarType.Single, 10), + new TextLoader.Column("capital-loss", ScalarType.Single, 11), + new TextLoader.Column("hours-per-week", ScalarType.Single, 12), + new TextLoader.Column("native-country", ScalarType.String, 13), + new TextLoader.Column("Label", ScalarType.Boolean, 14) } }); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/TextClassification.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/TextClassification.cs index 562cadbf1e..3656f20ff3 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/TextClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/TextClassification.cs @@ -36,8 +36,8 @@ public static void Example() var lookupMap = mlContext.Data.ReadFromTextFile(Path.Combine(modelLocation, "imdb_word_index.csv"), columns: new[] { - new TextLoader.Column("Words", DataKind.TX, 0), - new TextLoader.Column("Ids", DataKind.I4, 1), + new TextLoader.Column("Words", ScalarType.String, 0), + new TextLoader.Column("Ids", ScalarType.Int32, 1), }, separatorChar: ',' ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCALogisticRegression.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCALogisticRegression.cs index 3ab3257638..fc85cfef1f 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCALogisticRegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCALogisticRegression.cs @@ -28,8 +28,8 @@ public static void Example() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Sentiment", DataKind.BL, 0), - new TextLoader.Column("SentimentText", DataKind.Text, 1) + new TextLoader.Column("Sentiment", ScalarType.Boolean, 0), + new TextLoader.Column("SentimentText", ScalarType.String, 1) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/PriorTrainerSample.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/PriorTrainerSample.cs index f40ab22969..3183deee57 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/PriorTrainerSample.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/PriorTrainerSample.cs @@ -26,8 +26,8 @@ public static void Example() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Sentiment", DataKind.R4, 0), - new TextLoader.Column("SentimentText", DataKind.Text, 1) + new TextLoader.Column("Sentiment", ScalarType.Single, 0), + new TextLoader.Column("SentimentText", ScalarType.String, 1) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/RandomTrainerSample.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/RandomTrainerSample.cs index ce68f88950..b156e013aa 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/RandomTrainerSample.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/RandomTrainerSample.cs @@ -26,8 +26,8 @@ public static void Example() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Sentiment", DataKind.R4, 0), - new TextLoader.Column("SentimentText", DataKind.Text, 1) + new TextLoader.Column("Sentiment", ScalarType.Single, 0), + new TextLoader.Column("SentimentText", ScalarType.String, 1) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs index 3a8a17952b..741c319a43 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs @@ -28,8 +28,8 @@ public static void Example() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, 1, 6) + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("Features", ScalarType.Single, 1, 6) } }); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs index 519a9ef683..d9245c4473 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs @@ -29,8 +29,8 @@ public static void Example() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, 1, 6) + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("Features", ScalarType.Single, 1, 6) } }); diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index f6e84a70c1..9473280414 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -49,20 +49,27 @@ public Column() { } /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. If defaults to a float. + /// of the items in the column. /// Index of the column. - public Column(string name, DataKind? type, int index) - : this(name, type, new[] { new Range(index) }) { } + public Column(string name, ScalarType type, int index) + : this(name, type.ToDataKind(), new[] { new Range(index) }) + { + } /// /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. If defaults to a float. + /// of the items in the column. /// The minimum inclusive index of the column. /// The maximum-inclusive index of the column. - public Column(string name, DataKind? type, int minIndex, int maxIndex) - : this(name, type, new[] { new Range(minIndex, maxIndex) }) + public Column(string name, ScalarType type, int minIndex, int maxIndex) + : this(name, type.ToDataKind(), new[] { new Range(minIndex, maxIndex) }) + { + } + + public Column(string name, ScalarType type, Range[] source, KeyCount keyCount = null) + : this(name, type.ToDataKind(), source, keyCount) { } @@ -73,7 +80,7 @@ public Column(string name, DataKind? type, int minIndex, int maxIndex) /// of the items in the column. If defaults to a float. /// Source index range(s) of the column. /// For a key column, this defines the range of values. - public Column(string name, DataKind? type, Range[] source, KeyCount keyCount = null) + private Column(string name, DataKind? type, Range[] source, KeyCount keyCount = null) { Contracts.CheckValue(name, nameof(name)); Contracts.CheckValue(source, nameof(source)); @@ -92,9 +99,17 @@ public Column(string name, DataKind? type, Range[] source, KeyCount keyCount = n /// /// of the items in the column. If defaults to a float. + /// Although is internal, 's information can be publically accessed by . /// [Argument(ArgumentType.AtMostOnce, HelpText = "Type of the items in the column")] - public DataKind? Type; + [BestFriend] + internal DataKind? Type; + + /// + /// of the items in the column. + /// + /// It's a public interface to access the information in an internal DataKind. + public ScalarType ItemType => Type.HasValue ? Type.Value.ToScalarType() : ScalarType.Single; /// /// Source index range(s) of the column. diff --git a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs index 6c6b11c605..cbfb3cd1bc 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs @@ -490,14 +490,14 @@ private static TextLoader.Column GenerateValueColumn(IHostEnvironment env, } } - TextLoader.Column valueColumn = new TextLoader.Column(valueColumnName, DataKind.U4, 1); + TextLoader.Column valueColumn = new TextLoader.Column(valueColumnName, ScalarType.UInt32, 1); if (keyMax < int.MaxValue) valueColumn.KeyCount = new KeyCount(keyMax + 1); else if (keyMax < uint.MaxValue) valueColumn.KeyCount = new KeyCount(); else { - valueColumn.Type = DataKind.U8; + valueColumn.Type = ScalarType.UInt64.ToDataKind(); valueColumn.KeyCount = new KeyCount(); } @@ -598,8 +598,8 @@ private static IDataTransform Create(IHostEnvironment env, Options options, IDat // types unless ValueAsKeyType is specified. if (options.ValuesAsKeyType) { - keyColumn = new TextLoader.Column(keyColumnName, DataKind.TXT, 0); - valueColumn = new TextLoader.Column(valueColumnName, DataKind.TXT, 1); + keyColumn = new TextLoader.Column(keyColumnName, ScalarType.String, 0); + valueColumn = new TextLoader.Column(valueColumnName, ScalarType.String, 1); var txtArgs = new TextLoader.Options() { Columns = new TextLoader.Column[] @@ -621,8 +621,8 @@ private static IDataTransform Create(IHostEnvironment env, Options options, IDat } else { - keyColumn = new TextLoader.Column(keyColumnName, DataKind.TXT, 0); - valueColumn = new TextLoader.Column(valueColumnName, DataKind.R4, 1); + keyColumn = new TextLoader.Column(keyColumnName, ScalarType.String, 0); + valueColumn = new TextLoader.Column(valueColumnName, ScalarType.Single, 1); } loader = TextLoader.Create( diff --git a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs index f90f6377e9..eec170daaa 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs @@ -440,7 +440,7 @@ internal static IDataView GetKeyDataViewOrNull(IHostEnvironment env, IChannel ch nameof(Options.TermsColumn), src); } keyData = new TextLoader(env, - columns: new[] { new TextLoader.Column("Term", DataKind.TX, 0) }, + columns: new[] { new TextLoader.Column("Term", ScalarType.String, 0) }, dataSample: fileSource) .Read(fileSource); src = "Term"; diff --git a/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs b/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs index 203bd6e6bd..0dd47e9f96 100644 --- a/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs +++ b/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs @@ -7,7 +7,6 @@ using System.IO; using System.Net; using Microsoft.Data.DataView; -using Microsoft.ML; using Microsoft.ML.Data; namespace Microsoft.ML.SamplesUtils @@ -34,18 +33,18 @@ public static IDataView LoadHousingRegressionDataset(MLContext mlContext) var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("MedianHomeValue", DataKind.R4, 0), - new TextLoader.Column("CrimesPerCapita", DataKind.R4, 1), - new TextLoader.Column("PercentResidental", DataKind.R4, 2), - new TextLoader.Column("PercentNonRetail", DataKind.R4, 3), - new TextLoader.Column("CharlesRiver", DataKind.R4, 4), - new TextLoader.Column("NitricOxides", DataKind.R4, 5), - new TextLoader.Column("RoomsPerDwelling", DataKind.R4, 6), - new TextLoader.Column("PercentPre40s", DataKind.R4, 7), - new TextLoader.Column("EmploymentDistance", DataKind.R4, 8), - new TextLoader.Column("HighwayDistance", DataKind.R4, 9), - new TextLoader.Column("TaxRate", DataKind.R4, 10), - new TextLoader.Column("TeacherRatio", DataKind.R4, 11), + new TextLoader.Column("MedianHomeValue", ScalarType.Single, 0), + new TextLoader.Column("CrimesPerCapita", ScalarType.Single, 1), + new TextLoader.Column("PercentResidental", ScalarType.Single, 2), + new TextLoader.Column("PercentNonRetail", ScalarType.Single, 3), + new TextLoader.Column("CharlesRiver", ScalarType.Single, 4), + new TextLoader.Column("NitricOxides", ScalarType.Single, 5), + new TextLoader.Column("RoomsPerDwelling", ScalarType.Single, 6), + new TextLoader.Column("PercentPre40s", ScalarType.Single, 7), + new TextLoader.Column("EmploymentDistance", ScalarType.Single, 8), + new TextLoader.Column("HighwayDistance", ScalarType.Single, 9), + new TextLoader.Column("TaxRate", ScalarType.Single, 10), + new TextLoader.Column("TeacherRatio", ScalarType.Single, 11), }, hasHeader: true ); @@ -104,21 +103,21 @@ public static IDataView LoadFeaturizedAdultDataset(MLContext mlContext) var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("age", DataKind.R4, 0), - new TextLoader.Column("workclass", DataKind.TX, 1), - new TextLoader.Column("fnlwgt", DataKind.R4, 2), - new TextLoader.Column("education", DataKind.TX, 3), - new TextLoader.Column("education-num", DataKind.R4, 4), - new TextLoader.Column("marital-status", DataKind.TX, 5), - new TextLoader.Column("occupation", DataKind.TX, 6), - new TextLoader.Column("relationship", DataKind.TX, 7), - new TextLoader.Column("ethnicity", DataKind.TX, 8), - new TextLoader.Column("sex", DataKind.TX, 9), - new TextLoader.Column("capital-gain", DataKind.R4, 10), - new TextLoader.Column("capital-loss", DataKind.R4, 11), - new TextLoader.Column("hours-per-week", DataKind.R4, 12), - new TextLoader.Column("native-country", DataKind.R4, 13), - new TextLoader.Column("IsOver50K", DataKind.BL, 14), + new TextLoader.Column("age", ScalarType.Single, 0), + new TextLoader.Column("workclass", ScalarType.String, 1), + new TextLoader.Column("fnlwgt", ScalarType.Single, 2), + new TextLoader.Column("education", ScalarType.String, 3), + new TextLoader.Column("education-num", ScalarType.Single, 4), + new TextLoader.Column("marital-status", ScalarType.String, 5), + new TextLoader.Column("occupation", ScalarType.String, 6), + new TextLoader.Column("relationship", ScalarType.String, 7), + new TextLoader.Column("ethnicity", ScalarType.String, 8), + new TextLoader.Column("sex", ScalarType.String, 9), + new TextLoader.Column("capital-gain", ScalarType.Single, 10), + new TextLoader.Column("capital-loss", ScalarType.Single, 11), + new TextLoader.Column("hours-per-week", ScalarType.Single, 12), + new TextLoader.Column("native-country", ScalarType.Single, 13), + new TextLoader.Column("IsOver50K", ScalarType.Boolean, 14), }, separatorChar: ',', hasHeader: true diff --git a/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs b/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs index a05255da22..f7e8935c33 100644 --- a/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs +++ b/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs @@ -741,7 +741,7 @@ private IDataLoader GetLoaderForStopwords(IChannel ch, string dataFile, Host, columns: new[] { - new TextLoader.Column(stopwordsCol, DataKind.TX, 0) + new TextLoader.Column(stopwordsCol, ScalarType.String, 0) }, dataSample: fileSource).Read(fileSource) as IDataLoader; } diff --git a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs b/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs index 870480ebbc..151a30db8a 100644 --- a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs +++ b/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs @@ -23,12 +23,12 @@ public CalibratedModelParametersBase messages.Add(e.Message); // create a dummy text reader to trigger log messages - env.Data.CreateTextLoader( - new TextLoader.Options {Columns = new[] {new TextLoader.Column("TestColumn", null, 0)}}); + env.Data.CreateTextLoader(new TextLoader.Options { Columns = new[] { new TextLoader.Column("TestColumn", ScalarType.Single, 0) } }); Assert.True(messages.Count > 0); } diff --git a/test/Microsoft.ML.Functional.Tests/Common.cs b/test/Microsoft.ML.Functional.Tests/Common.cs index bcba3a8e27..9ca819952b 100644 --- a/test/Microsoft.ML.Functional.Tests/Common.cs +++ b/test/Microsoft.ML.Functional.Tests/Common.cs @@ -158,7 +158,6 @@ public static void AssertEqual(TypeTestData testType1, TypeTestData testType2) Assert.True(testType1.Ts.Equals(testType2.Ts)); Assert.True(testType1.Dt.Equals(testType2.Dt)); Assert.True(testType1.Dz.Equals(testType2.Dz)); - Assert.True(testType1.Ug.Equals(testType2.Ug)); } /// diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs b/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs index f5524098bb..a694b817b5 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs +++ b/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs @@ -65,10 +65,7 @@ internal sealed class TypeTestData [LoadColumn(14)] public DateTimeOffset Dz { get; set; } - [LoadColumn(15)] - public DataViewRowId Ug { get; set; } - - [LoadColumn(16, 16 + _numFeatures - 1), VectorType(_numFeatures)] + [LoadColumn(15, 15 + _numFeatures - 1), VectorType(_numFeatures)] public float[] Features { get; set; } @@ -82,23 +79,22 @@ public static TextLoader GetTextLoader(MLContext mlContext, char separator) { return mlContext.Data.CreateTextLoader( new[] { - new TextLoader.Column("Label", DataKind.Bool, 0), - new TextLoader.Column("I1", DataKind.I1, 1), - new TextLoader.Column("U1", DataKind.U1, 2), - new TextLoader.Column("I2", DataKind.I2, 3), - new TextLoader.Column("U2", DataKind.U2, 4), - new TextLoader.Column("I4", DataKind.I4, 5), - new TextLoader.Column("U4", DataKind.U4, 6), - new TextLoader.Column("I8", DataKind.I8, 7), - new TextLoader.Column("U8", DataKind.U8, 8), - new TextLoader.Column("R4", DataKind.R4, 9), - new TextLoader.Column("R8", DataKind.R8, 10), - new TextLoader.Column("Tx", DataKind.TX, 11), - new TextLoader.Column("Ts", DataKind.TS, 12), - new TextLoader.Column("Dt", DataKind.DT, 13), - new TextLoader.Column("Dz", DataKind.DZ, 14), - new TextLoader.Column("Ug", DataKind.UG, 15), - new TextLoader.Column("Features", DataKind.R4, 16, 16 + _numFeatures-1), + new TextLoader.Column("Label", ScalarType.Boolean, 0), + new TextLoader.Column("I1", ScalarType.SByte, 1), + new TextLoader.Column("U1", ScalarType.Byte, 2), + new TextLoader.Column("I2", ScalarType.Int16, 3), + new TextLoader.Column("U2", ScalarType.UInt16, 4), + new TextLoader.Column("I4", ScalarType.Int32, 5), + new TextLoader.Column("U4", ScalarType.UInt32, 6), + new TextLoader.Column("I8", ScalarType.Int64, 7), + new TextLoader.Column("U8", ScalarType.UInt64, 8), + new TextLoader.Column("R4", ScalarType.Single, 9), + new TextLoader.Column("R8", ScalarType.Double, 10), + new TextLoader.Column("Tx", ScalarType.String, 11), + new TextLoader.Column("Ts", ScalarType.TimeSpan, 12), + new TextLoader.Column("Dt", ScalarType.DateTime, 13), + new TextLoader.Column("Dz", ScalarType.DateTimeOffset, 14), + new TextLoader.Column("Features", ScalarType.Single, 15, 15 + _numFeatures - 1), }, separatorChar: separator, hasHeader: true, @@ -147,7 +143,6 @@ public static TypeTestData GetRandomInstance(Random rng) Ts = TimeSpan.FromSeconds(rng.NextDouble() * (1 + rng.Next())), Dt = DateTime.FromOADate(rng.Next(657435, 2958465)), Dz = DateTimeOffset.FromUnixTimeSeconds((long)(rng.NextDouble() * (1 + rng.Next()))), - Ug = new DataViewRowId((ulong)rng.Next(), (ulong)rng.Next()), Features = GetRandomFloatArray(rng, _numFeatures), }; } diff --git a/test/Microsoft.ML.Predictor.Tests/TestIniModels.cs b/test/Microsoft.ML.Predictor.Tests/TestIniModels.cs index 234ff0a7d5..ed3c493a1b 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestIniModels.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestIniModels.cs @@ -2,17 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections.Generic; using System.IO; -using System.Threading; -using Microsoft.ML; using Microsoft.ML.Data; -using Microsoft.ML.Internal.Calibration; using Microsoft.ML.Internal.Utilities; using Microsoft.ML.Internal.Internallearn; -using Microsoft.ML.Trainers.FastTree; -using Microsoft.ML.Tools; using Xunit; using Xunit.Abstractions; @@ -527,8 +521,8 @@ public void TestGamRegressionIni() HasHeader = false, Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, 1, 9) + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("Features", ScalarType.Single, 1, 9) } }).Read(GetDataPath("breast-cancer.txt")); @@ -566,8 +560,8 @@ public void TestGamBinaryClassificationIni() HasHeader = false, Columns = new[] { - new TextLoader.Column("Label", DataKind.BL, 0), - new TextLoader.Column("Features", DataKind.R4, 1, 9) + new TextLoader.Column("Label", ScalarType.Boolean, 0), + new TextLoader.Column("Features", ScalarType.Single, 1, 9) } }).Read(GetDataPath("breast-cancer.txt")); diff --git a/test/Microsoft.ML.TestFramework/Datasets.cs b/test/Microsoft.ML.TestFramework/Datasets.cs index abc9862049..92935d745e 100644 --- a/test/Microsoft.ML.TestFramework/Datasets.cs +++ b/test/Microsoft.ML.TestFramework/Datasets.cs @@ -166,18 +166,18 @@ public static class TestDatasets GetLoaderColumns = () => { return new[] { - new TextLoader.Column("MedianHomeValue", DataKind.R4, 0), - new TextLoader.Column("CrimesPerCapita", DataKind.R4, 1), - new TextLoader.Column("PercentResidental", DataKind.R4, 2), - new TextLoader.Column("PercentNonRetail", DataKind.R4, 3), - new TextLoader.Column("CharlesRiver", DataKind.R4, 4), - new TextLoader.Column("NitricOxides", DataKind.R4, 5), - new TextLoader.Column("RoomsPerDwelling", DataKind.R4, 6), - new TextLoader.Column("PercentPre40s", DataKind.R4, 7), - new TextLoader.Column("EmploymentDistance", DataKind.R4, 8), - new TextLoader.Column("HighwayDistance", DataKind.R4, 9), - new TextLoader.Column("TaxRate", DataKind.R4, 10), - new TextLoader.Column("TeacherRatio", DataKind.R4, 11), + new TextLoader.Column("MedianHomeValue", ScalarType.Single, 0), + new TextLoader.Column("CrimesPerCapita", ScalarType.Single, 1), + new TextLoader.Column("PercentResidental", ScalarType.Single, 2), + new TextLoader.Column("PercentNonRetail", ScalarType.Single, 3), + new TextLoader.Column("CharlesRiver", ScalarType.Single, 4), + new TextLoader.Column("NitricOxides", ScalarType.Single, 5), + new TextLoader.Column("RoomsPerDwelling", ScalarType.Single, 6), + new TextLoader.Column("PercentPre40s", ScalarType.Single, 7), + new TextLoader.Column("EmploymentDistance", ScalarType.Single, 8), + new TextLoader.Column("HighwayDistance", ScalarType.Single, 9), + new TextLoader.Column("TaxRate", ScalarType.Single, 10), + new TextLoader.Column("TeacherRatio", ScalarType.Single, 11), }; } }; @@ -216,8 +216,8 @@ public static class TestDatasets { return new[] { - new TextLoader.Column("Label", DataKind.BL, 0), - new TextLoader.Column("SentimentText", DataKind.Text, 1) + new TextLoader.Column("Label", ScalarType.Boolean, 0), + new TextLoader.Column("SentimentText", ScalarType.String, 1) }; } }; @@ -404,11 +404,11 @@ public static class TestDatasets { return new[] { - new TextLoader.Column("SepalLength", DataKind.R4, 0), - new TextLoader.Column("SepalWidth", DataKind.R4, 1), - new TextLoader.Column("PetalLength", DataKind.R4, 2), - new TextLoader.Column("PetalWidth",DataKind.R4, 3), - new TextLoader.Column("Label", DataKind.Text, 4) + new TextLoader.Column("SepalLength", ScalarType.Single, 0), + new TextLoader.Column("SepalWidth", ScalarType.Single, 1), + new TextLoader.Column("PetalLength", ScalarType.Single, 2), + new TextLoader.Column("PetalWidth",ScalarType.Single, 3), + new TextLoader.Column("Label", ScalarType.String, 4) }; } }; diff --git a/test/Microsoft.ML.Tests/AnomalyDetectionTests.cs b/test/Microsoft.ML.Tests/AnomalyDetectionTests.cs index 63b14132db..a1cabb3739 100644 --- a/test/Microsoft.ML.Tests/AnomalyDetectionTests.cs +++ b/test/Microsoft.ML.Tests/AnomalyDetectionTests.cs @@ -2,15 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.IO; -using System.Linq; -using Microsoft.Data.DataView; using Microsoft.ML.Data; -using Microsoft.ML.ImageAnalytics; -using Microsoft.ML.Model; using Microsoft.ML.RunTests; using Xunit; using Xunit.Abstractions; @@ -38,8 +30,8 @@ public void RandomizedPcaTrainerBaselineTest() Separator = "\t", Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column(featureColumn, DataKind.R4, new [] { new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column(featureColumn, ScalarType.Single, new [] { new TextLoader.Range(1, 784) }) }, AllowSparse = true }); diff --git a/test/Microsoft.ML.Tests/ImagesTests.cs b/test/Microsoft.ML.Tests/ImagesTests.cs index cc73af5d2f..96664dad5a 100644 --- a/test/Microsoft.ML.Tests/ImagesTests.cs +++ b/test/Microsoft.ML.Tests/ImagesTests.cs @@ -33,15 +33,15 @@ public void TestEstimatorChain() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var invalidData = TextLoader.Create(env, new TextLoader.Options() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.R4, 0), + new TextLoader.Column("ImagePath", ScalarType.Single, 0), } }, new MultiFileSource(dataFile)); @@ -64,8 +64,8 @@ public void TestEstimatorSaveLoad() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); @@ -103,8 +103,8 @@ public void TestSaveImages() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -142,8 +142,8 @@ public void TestGreyscaleTransformImages() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -193,8 +193,8 @@ public void TestBackAndForthConversionWithAlphaInterleave() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -253,8 +253,8 @@ public void TestBackAndForthConversionWithoutAlphaInterleave() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -313,8 +313,8 @@ public void TestBackAndForthConversionWithDifferentOrder() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -375,8 +375,8 @@ public void TestBackAndForthConversionWithAlphaNoInterleave() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -435,8 +435,8 @@ public void TestBackAndForthConversionWithoutAlphaNoInterleave() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -495,8 +495,8 @@ public void TestBackAndForthConversionWithAlphaInterleaveNoOffset() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -556,8 +556,8 @@ public void TestBackAndForthConversionWithoutAlphaInterleaveNoOffset() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -616,8 +616,8 @@ public void TestBackAndForthConversionWithAlphaNoInterleaveNoOffset() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -734,7 +734,7 @@ public void ImageResizerTransformResizingModeFill() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0) + new TextLoader.Column("ImagePath", ScalarType.String, 0) } }, new MultiFileSource(dataFile)); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs index 33131d2bdf..e1172613e9 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs @@ -279,8 +279,8 @@ private void TextFeaturizationOn(string dataPath) // Define the reader: specify the data columns and where to find them in the text file. var reader = mlContext.Data.CreateTextLoader(new[] { - new TextLoader.Column("IsToxic", DataKind.BL, 0), - new TextLoader.Column("Message", DataKind.TX, 1), + new TextLoader.Column("IsToxic", ScalarType.Boolean, 0), + new TextLoader.Column("Message", ScalarType.String, 1), }, hasHeader: true ); @@ -346,13 +346,13 @@ private void CategoricalFeaturizationOn(params string[] dataPath) // Define the reader: specify the data columns and where to find them in the text file. var reader = mlContext.Data.CreateTextLoader(new[] { - new TextLoader.Column("Label", DataKind.BL, 0), + new TextLoader.Column("Label", ScalarType.Boolean, 0), // We will load all the categorical features into one vector column of size 8. - new TextLoader.Column("CategoricalFeatures", DataKind.TX, 1, 8), + new TextLoader.Column("CategoricalFeatures", ScalarType.String, 1, 8), // Similarly, load all numerical features into one vector of size 6. - new TextLoader.Column("NumericalFeatures", DataKind.R4, 9, 14), + new TextLoader.Column("NumericalFeatures", ScalarType.Single, 9, 14), // Let's also separately load the 'Workclass' column. - new TextLoader.Column("Workclass", DataKind.TX, 1), + new TextLoader.Column("Workclass", ScalarType.String, 1), }, hasHeader: true ); @@ -479,8 +479,8 @@ public void CustomTransformer() var mlContext = new MLContext(); var data = mlContext.Data.ReadFromTextFile(GetDataPath("adult.tiny.with-schema.txt"), new[] { - new TextLoader.Column("Income", DataKind.R4, 10), - new TextLoader.Column("Features", DataKind.R4, 12, 14) + new TextLoader.Column("Income", ScalarType.Single, 10), + new TextLoader.Column("Features", ScalarType.Single, 12, 14) }, hasHeader: true); PrepareData(mlContext, data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs b/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs index 3a6c643bef..179178d81b 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs @@ -298,10 +298,10 @@ public void TestTrainTestSplit() var dataPath = GetDataPath("adult.tiny.with-schema.txt"); // Create the reader: define the data columns and where to find them in the text file. var input = mlContext.Data.ReadFromTextFile(dataPath, new[] { - new TextLoader.Column("Label", DataKind.BL, 0), - new TextLoader.Column("Workclass", DataKind.TX, 1), - new TextLoader.Column("Education", DataKind.TX,2), - new TextLoader.Column("Age", DataKind.R4,9) + new TextLoader.Column("Label", ScalarType.Boolean, 0), + new TextLoader.Column("Workclass", ScalarType.String, 1), + new TextLoader.Column("Education", ScalarType.String,2), + new TextLoader.Column("Age", ScalarType.Single,9) }, hasHeader: true); // this function will accept dataview and return content of "Workclass" column as List of strings. Func> getWorkclass = (IDataView view) => diff --git a/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationTests.cs b/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationTests.cs index 537e5c787f..0b5745ea09 100644 --- a/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationTests.cs @@ -20,11 +20,11 @@ public void TrainAndPredictIrisModelTest() var reader = mlContext.Data.CreateTextLoader(columns: new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("SepalLength", DataKind.R4, 1), - new TextLoader.Column("SepalWidth", DataKind.R4, 2), - new TextLoader.Column("PetalLength", DataKind.R4, 3), - new TextLoader.Column("PetalWidth", DataKind.R4, 4) + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("SepalLength", ScalarType.Single, 1), + new TextLoader.Column("SepalWidth", ScalarType.Single, 2), + new TextLoader.Column("PetalLength", ScalarType.Single, 3), + new TextLoader.Column("PetalWidth", ScalarType.Single, 4) } ); diff --git a/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationWithStringLabelTests.cs b/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationWithStringLabelTests.cs index f84279c32d..a1c6a4e948 100644 --- a/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationWithStringLabelTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationWithStringLabelTests.cs @@ -17,11 +17,11 @@ public void TrainAndPredictIrisModelWithStringLabelTest() var reader = mlContext.Data.CreateTextLoader(columns: new[] { - new TextLoader.Column("SepalLength", DataKind.R4, 0), - new TextLoader.Column("SepalWidth", DataKind.R4, 1), - new TextLoader.Column("PetalLength", DataKind.R4, 2), - new TextLoader.Column("PetalWidth", DataKind.R4, 3), - new TextLoader.Column("IrisPlantType", DataKind.TX, 4), + new TextLoader.Column("SepalLength", ScalarType.Single, 0), + new TextLoader.Column("SepalWidth", ScalarType.Single, 1), + new TextLoader.Column("PetalLength", ScalarType.Single, 2), + new TextLoader.Column("PetalWidth", ScalarType.Single, 3), + new TextLoader.Column("IrisPlantType", ScalarType.String, 4), }, separatorChar: ',' ); diff --git a/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs b/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs index e13d1171cd..9480cae00b 100644 --- a/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs +++ b/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs @@ -23,8 +23,8 @@ public void OvaLogisticRegression() { Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 4) }), } }); @@ -55,8 +55,8 @@ public void OvaAveragedPerceptron() { Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 4) }), } }); @@ -88,8 +88,8 @@ public void OvaFastTree() { Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 4) }), } }); @@ -121,8 +121,8 @@ public void OvaLinearSvm() { Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 4) }), } }); diff --git a/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs b/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs index 28e6b56af7..57139bd2ab 100644 --- a/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs @@ -28,8 +28,8 @@ public void TensorFlowTransforCifarEndToEndTest() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Label", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Label", ScalarType.String, 1), } }, new MultiFileSource(dataFile)); diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs index ebd184a717..4e2949459e 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs @@ -18,11 +18,11 @@ public void TrainAndPredictIrisModelUsingDirectInstantiationTest() var reader = mlContext.Data.CreateTextLoader(columns: new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("SepalLength", DataKind.R4, 1), - new TextLoader.Column("SepalWidth", DataKind.R4, 2), - new TextLoader.Column("PetalLength", DataKind.R4, 3), - new TextLoader.Column("PetalWidth", DataKind.R4, 4) + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("SepalLength", ScalarType.Single, 1), + new TextLoader.Column("SepalWidth", ScalarType.Single, 2), + new TextLoader.Column("PetalLength", ScalarType.Single, 3), + new TextLoader.Column("PetalWidth", ScalarType.Single, 4) } ); diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs index 085336646f..cfe9956757 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs @@ -12,10 +12,8 @@ using Microsoft.ML.RunTests; using Microsoft.ML.TestFramework.Attributes; using Microsoft.ML.Transforms; -using Microsoft.ML.Transforms.Conversions; using Microsoft.ML.Transforms.Normalizers; using Microsoft.ML.Transforms.TensorFlow; -using Microsoft.ML.Transforms.Text; using Xunit; namespace Microsoft.ML.Scenarios @@ -493,8 +491,8 @@ public void TensorFlowTransformMNISTConvTest() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Label", DataKind.U4 , new [] { new TextLoader.Range(0) }, new KeyCount(10)), - new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", ScalarType.UInt32 , new [] { new TextLoader.Range(0) }, new KeyCount(10)), + new TextLoader.Column("Placeholder", ScalarType.Single, new []{ new TextLoader.Range(1, 784) }) }, hasHeader: true, @@ -536,8 +534,8 @@ public void TensorFlowTransformMNISTLRTrainingTest() var mlContext = new MLContext(seed: 1, conc: 1); var reader = mlContext.Data.CreateTextLoader(columns: new[] { - new TextLoader.Column("Label", DataKind.I8, 0), - new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", ScalarType.Int64, 0), + new TextLoader.Column("Placeholder", ScalarType.Single, new []{ new TextLoader.Range(1, 784) }) }, allowSparse: true ); @@ -630,9 +628,9 @@ private void ExecuteTFTransformMNISTConvTrainingTest(bool shuffle, int? shuffleS var reader = mlContext.Data.CreateTextLoader(new[] { - new TextLoader.Column("Label", DataKind.U4, new []{ new TextLoader.Range(0) }, new KeyCount(10)), - new TextLoader.Column("TfLabel", DataKind.I8, 0), - new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", ScalarType.UInt32, new []{ new TextLoader.Range(0) }, new KeyCount(10)), + new TextLoader.Column("TfLabel", ScalarType.Int64, 0), + new TextLoader.Column("Placeholder", ScalarType.Single, new []{ new TextLoader.Range(1, 784) }) }, allowSparse: true ); @@ -725,8 +723,8 @@ public void TensorFlowTransformMNISTConvSavedModelTest() var mlContext = new MLContext(seed: 1, conc: 1); var reader = mlContext.Data.CreateTextLoader(columns: new[] { - new TextLoader.Column("Label", DataKind.U4 , new [] { new TextLoader.Range(0) }, new KeyCount(10)), - new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", ScalarType.UInt32 , new [] { new TextLoader.Range(0) }, new KeyCount(10)), + new TextLoader.Column("Placeholder", ScalarType.Single, new []{ new TextLoader.Range(1, 784) }) }, hasHeader: true, allowSparse: true @@ -857,8 +855,8 @@ public void TensorFlowTransformCifar() var data = mlContext.Data.ReadFromTextFile(dataFile, columns: new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } ); @@ -901,8 +899,8 @@ public void TensorFlowTransformCifarSavedModel() var imageFolder = Path.GetDirectoryName(dataFile); var data = mlContext.Data.ReadFromTextFile(dataFile, columns: new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } ); var images = mlContext.Transforms.LoadImages(imageFolder, ("ImageReal", "ImagePath")).Fit(data).Transform(data); @@ -953,8 +951,8 @@ public void TensorFlowTransformCifarInvalidShape() var data = mlContext.Data.ReadFromTextFile(dataFile, columns: new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), + new TextLoader.Column("ImagePath", ScalarType.String, 0), + new TextLoader.Column("Name", ScalarType.String, 1), } ); var images = new ImageLoadingTransformer(mlContext, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -995,8 +993,8 @@ public void TensorFlowSentimentClassificationTest() var lookupMap = mlContext.Data.ReadFromTextFile(@"sentiment_model/imdb_word_index.csv", columns: new[] { - new TextLoader.Column("Words", DataKind.TX, 0), - new TextLoader.Column("Ids", DataKind.I4, 1), + new TextLoader.Column("Words", ScalarType.String, 0), + new TextLoader.Column("Ids", ScalarType.Int32, 1), }, separatorChar: ',' ); diff --git a/test/Microsoft.ML.Tests/TermEstimatorTests.cs b/test/Microsoft.ML.Tests/TermEstimatorTests.cs index 4cc8f02f92..b0dfab99cd 100644 --- a/test/Microsoft.ML.Tests/TermEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/TermEstimatorTests.cs @@ -10,7 +10,6 @@ using Microsoft.ML.Model; using Microsoft.ML.RunTests; using Microsoft.ML.Tools; -using Microsoft.ML.Transforms; using Microsoft.ML.Transforms.Conversions; using Xunit; using Xunit.Abstractions; @@ -58,13 +57,13 @@ void TestDifferentTypes() var loader = new TextLoader(ML, new TextLoader.Options { Columns = new[]{ - new TextLoader.Column("float1", DataKind.R4, 9), - new TextLoader.Column("float4", DataKind.R4, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), - new TextLoader.Column("double1", DataKind.R8, 9), - new TextLoader.Column("double4", DataKind.R8, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), - new TextLoader.Column("int1", DataKind.I4, 9), - new TextLoader.Column("text1", DataKind.TX, 1), - new TextLoader.Column("text2", DataKind.TX, new[]{new TextLoader.Range(1), new TextLoader.Range(2)}), + new TextLoader.Column("float1", ScalarType.Single, 9), + new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), + new TextLoader.Column("double1", ScalarType.Double, 9), + new TextLoader.Column("double4", ScalarType.Double, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), + new TextLoader.Column("int1", ScalarType.Int32, 9), + new TextLoader.Column("text1", ScalarType.String, 1), + new TextLoader.Column("text2", ScalarType.String, new[]{new TextLoader.Range(1), new TextLoader.Range(2)}), }, Separator = "\t", HasHeader = true diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs b/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs index 359e44b7e1..4dce1bdc74 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Linq; using Microsoft.ML.Data; using Microsoft.ML.FactorizationMachine; using Microsoft.ML.RunTests; @@ -70,11 +69,11 @@ private TextLoader.Options GetFafmBCLoaderArgs() HasHeader = false, Columns = new[] { - new TextLoader.Column("Feature1", DataKind.R4, new [] { new TextLoader.Range(1, 2) }), - new TextLoader.Column("Feature2", DataKind.R4, new [] { new TextLoader.Range(3, 4) }), - new TextLoader.Column("Feature3", DataKind.R4, new [] { new TextLoader.Range(5, 6) }), - new TextLoader.Column("Feature4", DataKind.R4, new [] { new TextLoader.Range(7, 9) }), - new TextLoader.Column("Label", DataKind.BL, 0) + new TextLoader.Column("Feature1", ScalarType.Single, new [] { new TextLoader.Range(1, 2) }), + new TextLoader.Column("Feature2", ScalarType.Single, new [] { new TextLoader.Range(3, 4) }), + new TextLoader.Column("Feature3", ScalarType.Single, new [] { new TextLoader.Range(5, 6) }), + new TextLoader.Column("Feature4", ScalarType.Single, new [] { new TextLoader.Range(7, 9) }), + new TextLoader.Column("Label", ScalarType.Boolean, 0) } }; } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs index 6d2243de8f..b7f457c0f2 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs @@ -151,9 +151,9 @@ private TextLoader.Options GetLoaderArgs(string labelColumnName, string matrixCo HasHeader = true, Columns = new[] { - new TextLoader.Column(labelColumnName, DataKind.R4, new [] { new TextLoader.Range(0) }), - new TextLoader.Column(matrixColumnIndexColumnName, DataKind.U4, new [] { new TextLoader.Range(1) }, new KeyCount(20)), - new TextLoader.Column(matrixRowIndexColumnName, DataKind.U4, new [] { new TextLoader.Range(2) }, new KeyCount(40)), + new TextLoader.Column(labelColumnName, ScalarType.Single, new [] { new TextLoader.Range(0) }), + new TextLoader.Column(matrixColumnIndexColumnName, ScalarType.UInt32, new [] { new TextLoader.Range(1) }, new KeyCount(20)), + new TextLoader.Column(matrixRowIndexColumnName, ScalarType.UInt32, new [] { new TextLoader.Range(2) }, new KeyCount(40)), } }; } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/PriorRandomTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/PriorRandomTests.cs index 84a71dadfb..c2ff4b1e48 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/PriorRandomTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/PriorRandomTests.cs @@ -5,7 +5,6 @@ using Microsoft.Data.DataView; using Microsoft.ML.Data; using Microsoft.ML.RunTests; -using Microsoft.ML.Trainers; using Xunit; namespace Microsoft.ML.Tests.TrainerEstimators @@ -20,10 +19,10 @@ private IDataView GetBreastCancerDataviewWithTextColumns() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", type: null, 0), - new TextLoader.Column("F1", DataKind.Text, 1), - new TextLoader.Column("F2", DataKind.I4, 2), - new TextLoader.Column("Rest", type: null, new [] { new TextLoader.Range(3, 9) }) + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("F1", ScalarType.String, 1), + new TextLoader.Column("F2", ScalarType.Int32, 2), + new TextLoader.Column("Rest", ScalarType.Single, new [] { new TextLoader.Range(3, 9) }) } }).Read(GetDataPath(TestDatasets.breastCancer.trainFilename)); } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs index 044b1be4f0..eb6fe11d2e 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs @@ -34,7 +34,7 @@ public void PCATrainerEstimator() Separator = "\t", Columns = new[] { - new TextLoader.Column(featureColumn, DataKind.R4, new [] { new TextLoader.Range(1, 784) }) + new TextLoader.Column(featureColumn, ScalarType.Single, new [] { new TextLoader.Range(1, 784) }) }, AllowSparse = true }); @@ -63,8 +63,8 @@ public void KMeansEstimator() Separator = "\t", Columns = new[] { - new TextLoader.Column(featureColumn, DataKind.R4, new [] { new TextLoader.Range(1, 784) }), - new TextLoader.Column(weights, DataKind.R4, 0) + new TextLoader.Column(featureColumn, ScalarType.Single, new [] { new TextLoader.Range(1, 784) }), + new TextLoader.Column(weights, ScalarType.Single, 0) }, AllowSparse = true }); @@ -168,8 +168,8 @@ public void TestEstimatorMultiClassNaiveBayesTrainer() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", DataKind.BL, 0), - new TextLoader.Column("SentimentText", DataKind.Text, 1) + new TextLoader.Column("Label", ScalarType.Boolean, 0), + new TextLoader.Column("SentimentText", ScalarType.String, 1) } }).Read(GetDataPath(TestDatasets.Sentiment.trainFilename)); @@ -188,9 +188,9 @@ public void TestEstimatorMultiClassNaiveBayesTrainer() Separator = "\t", Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Workclass", DataKind.Text, 1), - new TextLoader.Column("NumericFeatures", DataKind.R4, new [] { new TextLoader.Range(9, 14) }) + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("Workclass", ScalarType.String, 1), + new TextLoader.Column("NumericFeatures", ScalarType.Single, new [] { new TextLoader.Range(9, 14) }) } }).Read(GetDataPath(TestDatasets.adultRanking.trainFilename)); @@ -211,8 +211,8 @@ private IDataView GetRegressionPipeline() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 11), - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(0, 10) } ) + new TextLoader.Column("Label", ScalarType.Single, 11), + new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(0, 10) } ) } }).Read(GetDataPath(TestDatasets.generatedRegressionDatasetmacro.trainFilename)); } @@ -225,8 +225,8 @@ private TextLoader.Options GetIrisLoaderArgs() HasHeader = true, Columns = new[] { - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(0, 3) }), - new TextLoader.Column("Label", DataKind.Text, 4) + new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(0, 3) }), + new TextLoader.Column("Label", ScalarType.String, 4) } }; } @@ -238,8 +238,8 @@ private TextLoader.Options GetIrisLoaderArgs() Separator = "comma", Columns = new[] { - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(0, 3) }), - new TextLoader.Column("Label", DataKind.Text, 4) + new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(0, 3) }), + new TextLoader.Column("Label", ScalarType.String, 4) } }).Read(GetDataPath(IrisDataPath)); diff --git a/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs b/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs index 1a3614d25b..8eadf99f3f 100644 --- a/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs @@ -6,9 +6,7 @@ using Microsoft.Data.DataView; using Microsoft.ML.Data; using Microsoft.ML.Data.IO; -using Microsoft.ML.Internal.Utilities; using Microsoft.ML.RunTests; -using Microsoft.ML.Transforms; using Xunit; using Xunit.Abstractions; @@ -29,10 +27,10 @@ void TestConcat() var loader = new TextLoader(ML, new TextLoader.Options { Columns = new[]{ - new TextLoader.Column("float1", DataKind.R4, 9), - new TextLoader.Column("float4", DataKind.R4, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), - new TextLoader.Column("float6", DataKind.R4, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, 14) }), - new TextLoader.Column("vfloat", DataKind.R4, new[]{new TextLoader.Range(14, null) { AutoEnd = false, VariableEnd = true } }) + new TextLoader.Column("float1", ScalarType.Single, 9), + new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), + new TextLoader.Column("float6", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, 14) }), + new TextLoader.Column("vfloat", ScalarType.Single, new[]{new TextLoader.Range(14, null) { AutoEnd = false, VariableEnd = true } }) }, Separator = "\t", HasHeader = true @@ -87,9 +85,9 @@ public void ConcatWithAliases() var loader = new TextLoader(ML, new TextLoader.Options { Columns = new[]{ - new TextLoader.Column("float1", DataKind.R4, 9), - new TextLoader.Column("float4", DataKind.R4, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), - new TextLoader.Column("vfloat", DataKind.R4, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, null) { AutoEnd = false, VariableEnd = true } }) + new TextLoader.Column("float1", ScalarType.Single, 9), + new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), + new TextLoader.Column("vfloat", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, null) { AutoEnd = false, VariableEnd = true } }) }, Separator = "\t", HasHeader = true diff --git a/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs b/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs index be13496d59..f20cb92d96 100644 --- a/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs @@ -50,8 +50,8 @@ public void TestCustomTransformer() string dataPath = GetDataPath("adult.tiny.with-schema.txt"); var source = new MultiFileSource(dataPath); var loader = ML.Data.CreateTextLoader(new[] { - new TextLoader.Column("Float1", DataKind.R4, 9), - new TextLoader.Column("Float4", DataKind.R4, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }) + new TextLoader.Column("Float1", ScalarType.Single, 9), + new TextLoader.Column("Float4", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }) }, hasHeader: true); var data = loader.Read(source); @@ -90,9 +90,9 @@ public void TestSchemaPropagation() string dataPath = GetDataPath("adult.test"); var source = new MultiFileSource(dataPath); var loader = ML.Data.CreateTextLoader(new[] { - new TextLoader.Column("Float1", DataKind.R4, 0), - new TextLoader.Column("Float4", DataKind.R4, new[]{new TextLoader.Range(0), new TextLoader.Range(2), new TextLoader.Range(4), new TextLoader.Range(10) }), - new TextLoader.Column("Text1", DataKind.Text, 0) + new TextLoader.Column("Float1", ScalarType.Single, 0), + new TextLoader.Column("Float4", ScalarType.Single, new[]{new TextLoader.Range(0), new TextLoader.Range(2), new TextLoader.Range(4), new TextLoader.Range(10) }), + new TextLoader.Column("Text1", ScalarType.String, 0) }, separatorChar: ',', hasHeader: true); var data = loader.Read(source); diff --git a/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs b/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs index 55ccb06de1..a1488889ad 100644 --- a/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs @@ -30,15 +30,9 @@ public void KeyToValueWorkout() { Columns = new[] { - new TextLoader.Column("ScalarString", DataKind.TX, 1), - new TextLoader.Column("VectorString", DataKind.TX, new[] {new TextLoader.Range(1, 4) }), - new TextLoader.Column - { - Name="BareKey", - Source = new[] { new TextLoader.Range(0) }, - Type = DataKind.U4, - KeyCount = new KeyCount(6), - } + new TextLoader.Column("ScalarString", ScalarType.String, 1), + new TextLoader.Column("VectorString", ScalarType.String, new[] {new TextLoader.Range(1, 4) }), + new TextLoader.Column("BareKey", ScalarType.UInt32, new[] { new TextLoader.Range(0) }, new KeyCount(6)) } }); diff --git a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs index 8d5fa5bd88..74e916521f 100644 --- a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs @@ -35,12 +35,12 @@ public void NormalizerWorkout() var loader = new TextLoader(Env, new TextLoader.Options { Columns = new[] { - new TextLoader.Column("float1", DataKind.R4, 1), - new TextLoader.Column("float4", DataKind.R4, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("double1", DataKind.R8, 1), - new TextLoader.Column("double4", DataKind.R8, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("int1", DataKind.I4, 0), - new TextLoader.Column("float0", DataKind.R4, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }), + new TextLoader.Column("float1", ScalarType.Single, 1), + new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("double1", ScalarType.Double, 1), + new TextLoader.Column("double4", ScalarType.Double, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("int1", ScalarType.Int32, 0), + new TextLoader.Column("float0", ScalarType.Single, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }), }, HasHeader = true }, new MultiFileSource(dataPath)); @@ -100,12 +100,12 @@ public void NormalizerParameters() var loader = new TextLoader(Env, new TextLoader.Options { Columns = new[] { - new TextLoader.Column("float1", DataKind.R4, 1), - new TextLoader.Column("float4", DataKind.R4, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("double1", DataKind.R8, 1), - new TextLoader.Column("double4", DataKind.R8, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("int1", DataKind.I4, 0), - new TextLoader.Column("float0", DataKind.R4, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }) + new TextLoader.Column("float1", ScalarType.Single, 1), + new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("double1", ScalarType.Double, 1), + new TextLoader.Column("double4", ScalarType.Double, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("int1", ScalarType.Int32, 0), + new TextLoader.Column("float0", ScalarType.Single, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }) }, HasHeader = true }, new MultiFileSource(dataPath)); @@ -217,8 +217,8 @@ public void SimpleConstructorsAndExtensions() var loader = new TextLoader(Env, new TextLoader.Options { Columns = new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("float4", DataKind.R4, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", ScalarType.Single, 0), + new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(1, 4) }), } }); diff --git a/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs b/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs index aadf328c8b..398534ce79 100644 --- a/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs @@ -168,7 +168,7 @@ public void StopWordsRemoverFromFactory() { Columns = new[] { - new TextLoader.Column("Text", DataKind.TX, 1) + new TextLoader.Column("Text", ScalarType.String, 1) } }, new MultiFileSource(sentimentDataPath)); diff --git a/test/Microsoft.ML.Tests/Transformers/WordEmbeddingsTests.cs b/test/Microsoft.ML.Tests/Transformers/WordEmbeddingsTests.cs index 8f877eba5d..b9adb620f7 100644 --- a/test/Microsoft.ML.Tests/Transformers/WordEmbeddingsTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/WordEmbeddingsTests.cs @@ -5,7 +5,6 @@ using System.IO; using Microsoft.ML.Data; using Microsoft.ML.RunTests; -using Microsoft.ML.Transforms; using Microsoft.ML.Transforms.Text; using Xunit; using Xunit.Abstractions; @@ -30,8 +29,8 @@ public void TestWordEmbeddings() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", DataKind.BL, 0), - new TextLoader.Column("SentimentText", DataKind.Text, 1) + new TextLoader.Column("Label", ScalarType.Boolean, 0), + new TextLoader.Column("SentimentText", ScalarType.String, 1) } }).Read(GetDataPath(dataPath)); @@ -65,8 +64,8 @@ public void TestCustomWordEmbeddings() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", DataKind.BL, 0), - new TextLoader.Column("SentimentText", DataKind.Text, 1) + new TextLoader.Column("Label", ScalarType.Boolean, 0), + new TextLoader.Column("SentimentText", ScalarType.String, 1) } }).Read(GetDataPath(dataPath)); From c7f5880923c20b8aef8f5a970b8af63ddf6be0e4 Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Thu, 21 Feb 2019 15:34:47 -0800 Subject: [PATCH 03/12] Internalize-best-friend DataKind --- src/Microsoft.ML.Core/Data/DataKind.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.ML.Core/Data/DataKind.cs b/src/Microsoft.ML.Core/Data/DataKind.cs index cda5728224..835a385f42 100644 --- a/src/Microsoft.ML.Core/Data/DataKind.cs +++ b/src/Microsoft.ML.Core/Data/DataKind.cs @@ -52,7 +52,8 @@ public enum ScalarType : byte /// Data type specifier used in command line. is the underlying version of /// used for command line and entry point BC. /// - public enum DataKind : byte + [BestFriend] + internal enum DataKind : byte { // Notes: // * These values are serialized, so changing them breaks binary formats. @@ -118,9 +119,22 @@ public static DataKind FromIndex(int index) return (DataKind)(index + (int)KindMin); } + /// + /// This function converts to . + /// Because is a subset of , the conversion is straightforward. + /// public static DataKind ToDataKind(this ScalarType scalarType) => (DataKind)scalarType; - public static ScalarType ToScalarType(this DataKind kind) => (ScalarType)kind; + /// + /// This function converts to . + /// Because is a subset of , we should check if + /// can be found in . + /// + public static ScalarType ToScalarType(this DataKind kind) + { + Contracts.Check(kind != DataKind.UG); + return (ScalarType)kind; + } /// /// For integer DataKinds, this returns the maximum legal value. For un-supported kinds, From 93d3ffe1195067b1cb29ea35f0f8544568ce9adc Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Fri, 22 Feb 2019 10:20:13 -0800 Subject: [PATCH 04/12] DataKind ---> InternalDataKind --- .../Data/ColumnTypeExtensions.cs | 48 ++--- src/Microsoft.ML.Core/Data/DataKind.cs | 166 +++++++++--------- src/Microsoft.ML.Core/Data/KeyType.cs | 2 +- .../Commands/TypeInfoCommand.cs | 22 +-- .../DataLoadSave/Text/TextLoader.cs | 32 ++-- .../DataLoadSave/Text/TextLoaderParser.cs | 8 +- .../DataLoadSave/Text/TextSaver.cs | 2 +- .../DataView/ArrayDataViewBuilder.cs | 2 +- .../Transforms/Normalizer.cs | 8 +- .../Transforms/TypeConverting.cs | 28 +-- .../Transforms/ValueMapping.cs | 4 +- .../Utilities/TypeParsingUtils.cs | 8 +- src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs | 24 +-- .../PartitionedFileLoader.cs | 8 +- .../PartitionedPathParser.cs | 4 +- .../RecommenderUtils.cs | 2 +- .../ConvertStaticExtensions.cs | 66 +++---- .../StaticSchemaShape.cs | 2 +- .../TextLoaderStatic.cs | 36 ++-- .../TransformsStatic.cs | 14 +- .../MissingValueHandlingTransformer.cs | 2 +- .../UnitTests/CoreBaseTestClass.cs | 64 +++---- .../Datasets/TypeTestData.cs | 2 +- test/Microsoft.ML.Tests/FakeSchemaTest.cs | 2 +- 24 files changed, 278 insertions(+), 278 deletions(-) diff --git a/src/Microsoft.ML.Core/Data/ColumnTypeExtensions.cs b/src/Microsoft.ML.Core/Data/ColumnTypeExtensions.cs index df1a76f3d7..1213561385 100644 --- a/src/Microsoft.ML.Core/Data/ColumnTypeExtensions.cs +++ b/src/Microsoft.ML.Core/Data/ColumnTypeExtensions.cs @@ -61,13 +61,13 @@ public static int GetKeyCountAsInt32(this DataViewType columnType, IExceptionCon public static bool IsKnownSizeVector(this DataViewType columnType) => columnType.GetVectorSize() > 0; /// - /// Gets the equivalent for the 's RawType. - /// This can return default() if the RawType doesn't have a corresponding - /// . + /// Gets the equivalent for the 's RawType. + /// This can return default() if the RawType doesn't have a corresponding + /// . /// - public static DataKind GetRawKind(this DataViewType columnType) + public static InternalDataKind GetRawKind(this DataViewType columnType) { - columnType.RawType.TryGetDataKind(out DataKind result); + columnType.RawType.TryGetDataKind(out InternalDataKind result); return result; } @@ -106,24 +106,24 @@ public static PrimitiveDataViewType PrimitiveTypeFromType(Type type) return NumberTypeFromType(type); } - public static PrimitiveDataViewType PrimitiveTypeFromKind(DataKind kind) + public static PrimitiveDataViewType PrimitiveTypeFromKind(InternalDataKind kind) { - if (kind == DataKind.TX) + if (kind == InternalDataKind.TX) return TextDataViewType.Instance; - if (kind == DataKind.BL) + if (kind == InternalDataKind.BL) return BooleanDataViewType.Instance; - if (kind == DataKind.TS) + if (kind == InternalDataKind.TS) return TimeSpanDataViewType.Instance; - if (kind == DataKind.DT) + if (kind == InternalDataKind.DT) return DateTimeDataViewType.Instance; - if (kind == DataKind.DZ) + if (kind == InternalDataKind.DZ) return DateTimeOffsetDataViewType.Instance; return NumberTypeFromKind(kind); } public static NumberDataViewType NumberTypeFromType(Type type) { - DataKind kind; + InternalDataKind kind; if (type.TryGetDataKind(out kind)) return NumberTypeFromKind(kind); @@ -131,31 +131,31 @@ public static NumberDataViewType NumberTypeFromType(Type type) throw new InvalidOperationException($"Bad type in {nameof(ColumnTypeExtensions)}.{nameof(NumberTypeFromType)}: {type}"); } - public static NumberDataViewType NumberTypeFromKind(DataKind kind) + public static NumberDataViewType NumberTypeFromKind(InternalDataKind kind) { switch (kind) { - case DataKind.I1: + case InternalDataKind.I1: return NumberDataViewType.SByte; - case DataKind.U1: + case InternalDataKind.U1: return NumberDataViewType.Byte; - case DataKind.I2: + case InternalDataKind.I2: return NumberDataViewType.Int16; - case DataKind.U2: + case InternalDataKind.U2: return NumberDataViewType.UInt16; - case DataKind.I4: + case InternalDataKind.I4: return NumberDataViewType.Int32; - case DataKind.U4: + case InternalDataKind.U4: return NumberDataViewType.UInt32; - case DataKind.I8: + case InternalDataKind.I8: return NumberDataViewType.Int64; - case DataKind.U8: + case InternalDataKind.U8: return NumberDataViewType.UInt64; - case DataKind.R4: + case InternalDataKind.R4: return NumberDataViewType.Single; - case DataKind.R8: + case InternalDataKind.R8: return NumberDataViewType.Double; - case DataKind.UG: + case InternalDataKind.UG: return NumberDataViewType.DataViewRowId; } diff --git a/src/Microsoft.ML.Core/Data/DataKind.cs b/src/Microsoft.ML.Core/Data/DataKind.cs index 835a385f42..153e3dc33f 100644 --- a/src/Microsoft.ML.Core/Data/DataKind.cs +++ b/src/Microsoft.ML.Core/Data/DataKind.cs @@ -49,11 +49,11 @@ public enum ScalarType : byte } /// - /// Data type specifier used in command line. is the underlying version of + /// Data type specifier used in command line. is the underlying version of /// used for command line and entry point BC. /// [BestFriend] - internal enum DataKind : byte + internal enum InternalDataKind : byte { // Notes: // * These values are serialized, so changing them breaks binary formats. @@ -98,14 +98,14 @@ internal enum DataKind : byte [BestFriend] internal static class DataKindExtensions { - public const DataKind KindMin = DataKind.I1; - public const DataKind KindLim = DataKind.U16 + 1; + public const InternalDataKind KindMin = InternalDataKind.I1; + public const InternalDataKind KindLim = InternalDataKind.U16 + 1; public const int KindCount = KindLim - KindMin; /// /// Maps a DataKind to a value suitable for indexing into an array of size KindCount. /// - public static int ToIndex(this DataKind kind) + public static int ToIndex(this InternalDataKind kind) { return kind - KindMin; } @@ -113,26 +113,26 @@ public static int ToIndex(this DataKind kind) /// /// Maps from an index into an array of size KindCount to the corresponding DataKind /// - public static DataKind FromIndex(int index) + public static InternalDataKind FromIndex(int index) { Contracts.Check(0 <= index && index < KindCount); - return (DataKind)(index + (int)KindMin); + return (InternalDataKind)(index + (int)KindMin); } /// - /// This function converts to . - /// Because is a subset of , the conversion is straightforward. + /// This function converts to . + /// Because is a subset of , the conversion is straightforward. /// - public static DataKind ToDataKind(this ScalarType scalarType) => (DataKind)scalarType; + public static InternalDataKind ToDataKind(this ScalarType scalarType) => (InternalDataKind)scalarType; /// /// This function converts to . - /// Because is a subset of , we should check if + /// Because is a subset of , we should check if /// can be found in . /// - public static ScalarType ToScalarType(this DataKind kind) + public static ScalarType ToScalarType(this InternalDataKind kind) { - Contracts.Check(kind != DataKind.UG); + Contracts.Check(kind != InternalDataKind.UG); return (ScalarType)kind; } @@ -140,25 +140,25 @@ public static ScalarType ToScalarType(this DataKind kind) /// For integer DataKinds, this returns the maximum legal value. For un-supported kinds, /// it returns zero. /// - public static ulong ToMaxInt(this DataKind kind) + public static ulong ToMaxInt(this InternalDataKind kind) { switch (kind) { - case DataKind.I1: + case InternalDataKind.I1: return (ulong)sbyte.MaxValue; - case DataKind.U1: + case InternalDataKind.U1: return byte.MaxValue; - case DataKind.I2: + case InternalDataKind.I2: return (ulong)short.MaxValue; - case DataKind.U2: + case InternalDataKind.U2: return ushort.MaxValue; - case DataKind.I4: + case InternalDataKind.I4: return int.MaxValue; - case DataKind.U4: + case InternalDataKind.U4: return uint.MaxValue; - case DataKind.I8: + case InternalDataKind.I8: return long.MaxValue; - case DataKind.U8: + case InternalDataKind.U8: return ulong.MaxValue; } @@ -195,25 +195,25 @@ public static ulong ToMaxInt(this Type type) /// For integer DataKinds, this returns the minimum legal value. For un-supported kinds, /// it returns one. /// - public static long ToMinInt(this DataKind kind) + public static long ToMinInt(this InternalDataKind kind) { switch (kind) { - case DataKind.I1: + case InternalDataKind.I1: return sbyte.MinValue; - case DataKind.U1: + case InternalDataKind.U1: return byte.MinValue; - case DataKind.I2: + case InternalDataKind.I2: return short.MinValue; - case DataKind.U2: + case InternalDataKind.U2: return ushort.MinValue; - case DataKind.I4: + case InternalDataKind.I4: return int.MinValue; - case DataKind.U4: + case InternalDataKind.U4: return uint.MinValue; - case DataKind.I8: + case InternalDataKind.I8: return long.MinValue; - case DataKind.U8: + case InternalDataKind.U8: return 0; } @@ -223,41 +223,41 @@ public static long ToMinInt(this DataKind kind) /// /// Maps a DataKind to the associated .Net representation type. /// - public static Type ToType(this DataKind kind) + public static Type ToType(this InternalDataKind kind) { switch (kind) { - case DataKind.I1: + case InternalDataKind.I1: return typeof(sbyte); - case DataKind.U1: + case InternalDataKind.U1: return typeof(byte); - case DataKind.I2: + case InternalDataKind.I2: return typeof(short); - case DataKind.U2: + case InternalDataKind.U2: return typeof(ushort); - case DataKind.I4: + case InternalDataKind.I4: return typeof(int); - case DataKind.U4: + case InternalDataKind.U4: return typeof(uint); - case DataKind.I8: + case InternalDataKind.I8: return typeof(long); - case DataKind.U8: + case InternalDataKind.U8: return typeof(ulong); - case DataKind.R4: + case InternalDataKind.R4: return typeof(Single); - case DataKind.R8: + case InternalDataKind.R8: return typeof(Double); - case DataKind.TX: + case InternalDataKind.TX: return typeof(ReadOnlyMemory); - case DataKind.BL: + case InternalDataKind.BL: return typeof(bool); - case DataKind.TS: + case InternalDataKind.TS: return typeof(TimeSpan); - case DataKind.DT: + case InternalDataKind.DT: return typeof(DateTime); - case DataKind.DZ: + case InternalDataKind.DZ: return typeof(DateTimeOffset); - case DataKind.UG: + case InternalDataKind.UG: return typeof(DataViewRowId); } @@ -267,46 +267,46 @@ public static Type ToType(this DataKind kind) /// /// Try to map a System.Type to a corresponding DataKind value. /// - public static bool TryGetDataKind(this Type type, out DataKind kind) + public static bool TryGetDataKind(this Type type, out InternalDataKind kind) { Contracts.CheckValueOrNull(type); // REVIEW: Make this more efficient. Should we have a global dictionary? if (type == typeof(sbyte)) - kind = DataKind.I1; + kind = InternalDataKind.I1; else if (type == typeof(byte)) - kind = DataKind.U1; + kind = InternalDataKind.U1; else if (type == typeof(short)) - kind = DataKind.I2; + kind = InternalDataKind.I2; else if (type == typeof(ushort)) - kind = DataKind.U2; + kind = InternalDataKind.U2; else if (type == typeof(int)) - kind = DataKind.I4; + kind = InternalDataKind.I4; else if (type == typeof(uint)) - kind = DataKind.U4; + kind = InternalDataKind.U4; else if (type == typeof(long)) - kind = DataKind.I8; + kind = InternalDataKind.I8; else if (type == typeof(ulong)) - kind = DataKind.U8; + kind = InternalDataKind.U8; else if (type == typeof(Single)) - kind = DataKind.R4; + kind = InternalDataKind.R4; else if (type == typeof(Double)) - kind = DataKind.R8; + kind = InternalDataKind.R8; else if (type == typeof(ReadOnlyMemory) || type == typeof(string)) - kind = DataKind.TX; + kind = InternalDataKind.TX; else if (type == typeof(bool)) - kind = DataKind.BL; + kind = InternalDataKind.BL; else if (type == typeof(TimeSpan)) - kind = DataKind.TS; + kind = InternalDataKind.TS; else if (type == typeof(DateTime)) - kind = DataKind.DT; + kind = InternalDataKind.DT; else if (type == typeof(DateTimeOffset)) - kind = DataKind.DZ; + kind = InternalDataKind.DZ; else if (type == typeof(DataViewRowId)) - kind = DataKind.UG; + kind = InternalDataKind.UG; else { - kind = default(DataKind); + kind = default(InternalDataKind); return false; } @@ -317,41 +317,41 @@ public static bool TryGetDataKind(this Type type, out DataKind kind) /// Get the canonical string for a DataKind. Note that using DataKind.ToString() is not stable /// and is also slow, so use this instead. /// - public static string GetString(this DataKind kind) + public static string GetString(this InternalDataKind kind) { switch (kind) { - case DataKind.I1: + case InternalDataKind.I1: return "I1"; - case DataKind.I2: + case InternalDataKind.I2: return "I2"; - case DataKind.I4: + case InternalDataKind.I4: return "I4"; - case DataKind.I8: + case InternalDataKind.I8: return "I8"; - case DataKind.U1: + case InternalDataKind.U1: return "U1"; - case DataKind.U2: + case InternalDataKind.U2: return "U2"; - case DataKind.U4: + case InternalDataKind.U4: return "U4"; - case DataKind.U8: + case InternalDataKind.U8: return "U8"; - case DataKind.R4: + case InternalDataKind.R4: return "R4"; - case DataKind.R8: + case InternalDataKind.R8: return "R8"; - case DataKind.BL: + case InternalDataKind.BL: return "BL"; - case DataKind.TX: + case InternalDataKind.TX: return "TX"; - case DataKind.TS: + case InternalDataKind.TS: return "TS"; - case DataKind.DT: + case InternalDataKind.DT: return "DT"; - case DataKind.DZ: + case InternalDataKind.DZ: return "DZ"; - case DataKind.UG: + case InternalDataKind.UG: return "UG"; } return ""; diff --git a/src/Microsoft.ML.Core/Data/KeyType.cs b/src/Microsoft.ML.Core/Data/KeyType.cs index 9671b1e205..877d2900fc 100644 --- a/src/Microsoft.ML.Core/Data/KeyType.cs +++ b/src/Microsoft.ML.Core/Data/KeyType.cs @@ -85,7 +85,7 @@ public override int GetHashCode() public override string ToString() { - DataKind rawKind = this.GetRawKind(); + InternalDataKind rawKind = this.GetRawKind(); return string.Format("Key<{0}, {1}-{2}>", rawKind.GetString(), 0, Count - 1); } } diff --git a/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs b/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs index ae3364b3b4..4d6cadfc36 100644 --- a/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs @@ -48,9 +48,9 @@ public TypeNaInfo(bool hasNa, bool defaultIsNa) } } - private sealed class SetOfKindsComparer : IEqualityComparer> + private sealed class SetOfKindsComparer : IEqualityComparer> { - public bool Equals(ISet x, ISet y) + public bool Equals(ISet x, ISet y) { Contracts.AssertValueOrNull(x); Contracts.AssertValueOrNull(y); @@ -59,7 +59,7 @@ public bool Equals(ISet x, ISet y) return x.SetEquals(y); } - public int GetHashCode(ISet obj) + public int GetHashCode(ISet obj) { Contracts.AssertValueOrNull(obj); int hash = 0; @@ -78,20 +78,20 @@ public void Run() { var conv = Conversions.Instance; var comp = new SetOfKindsComparer(); - var dstToSrcMap = new Dictionary, HashSet>(comp); - var srcToDstMap = new Dictionary>(); + var dstToSrcMap = new Dictionary, HashSet>(comp); + var srcToDstMap = new Dictionary>(); - var kinds = Enum.GetValues(typeof(DataKind)).Cast().Distinct().OrderBy(k => k).ToArray(); + var kinds = Enum.GetValues(typeof(InternalDataKind)).Cast().Distinct().OrderBy(k => k).ToArray(); var types = kinds.Select(kind => ColumnTypeExtensions.PrimitiveTypeFromKind(kind)).ToArray(); - HashSet nonIdentity = null; + HashSet nonIdentity = null; // For each kind and its associated type. for (int i = 0; i < types.Length; ++i) { ch.AssertValue(types[i]); var info = Utils.MarshalInvoke(KindReport, types[i].RawType, ch, types[i]); - var dstKinds = new HashSet(); + var dstKinds = new HashSet(); Delegate del; bool isIdentity; for (int j = 0; j < types.Length; ++j) @@ -105,9 +105,9 @@ public void Run() ch.Assert(isIdentity); srcToDstMap[types[i].GetRawKind()] = dstKinds; - HashSet srcKinds; + HashSet srcKinds; if (!dstToSrcMap.TryGetValue(dstKinds, out srcKinds)) - dstToSrcMap[dstKinds] = srcKinds = new HashSet(); + dstToSrcMap[dstKinds] = srcKinds = new HashSet(); srcKinds.Add(types[i].GetRawKind()); } @@ -115,7 +115,7 @@ public void Run() for (int i = 0; i < kinds.Length; ++i) { var dsts = srcToDstMap[kinds[i]]; - HashSet srcs; + HashSet srcs; if (!dstToSrcMap.TryGetValue(dsts, out srcs)) continue; ch.Assert(Utils.Size(dsts) >= 1); diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index 9473280414..7b949ec697 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -77,10 +77,10 @@ public Column(string name, ScalarType type, Range[] source, KeyCount keyCount = /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. If defaults to a float. + /// of the items in the column. If defaults to a float. /// Source index range(s) of the column. /// For a key column, this defines the range of values. - private Column(string name, DataKind? type, Range[] source, KeyCount keyCount = null) + private Column(string name, InternalDataKind? type, Range[] source, KeyCount keyCount = null) { Contracts.CheckValue(name, nameof(name)); Contracts.CheckValue(source, nameof(source)); @@ -98,12 +98,12 @@ private Column(string name, DataKind? type, Range[] source, KeyCount keyCount = public string Name; /// - /// of the items in the column. If defaults to a float. - /// Although is internal, 's information can be publically accessed by . + /// of the items in the column. If defaults to a float. + /// Although is internal, 's information can be publically accessed by . /// [Argument(ArgumentType.AtMostOnce, HelpText = "Type of the items in the column")] [BestFriend] - internal DataKind? Type; + internal InternalDataKind? Type; /// /// of the items in the column. @@ -147,10 +147,10 @@ private bool TryParse(string str) return false; if (rgstr.Length == 3) { - DataKind kind; + InternalDataKind kind; if (!TypeParsingUtils.TryParseDataKind(rgstr[istr++], out kind, out KeyCount)) return false; - Type = kind == default ? default(DataKind?) : kind; + Type = kind == default ? default(InternalDataKind?) : kind; } return TryParseSource(rgstr[istr++]); @@ -551,7 +551,7 @@ internal sealed class ColInfo { public readonly string Name; // REVIEW: Fix this for keys. - public readonly DataKind Kind; + public readonly InternalDataKind Kind; public readonly DataViewType ColType; public readonly Segment[] Segments; @@ -711,15 +711,15 @@ public Bindings(TextLoader parent, Column[] cols, IMultiStreamSource headerFile, ch.Info("Duplicate name(s) specified - later columns will hide earlier ones"); PrimitiveDataViewType itemType; - DataKind kind; + InternalDataKind kind; if (col.KeyCount != null) { itemType = TypeParsingUtils.ConstructKeyType(col.Type, col.KeyCount); } else { - kind = col.Type ?? DataKind.Num; - ch.CheckUserArg(Enum.IsDefined(typeof(DataKind), kind), nameof(Column.Type), "Bad item type"); + kind = col.Type ?? InternalDataKind.Num; + ch.CheckUserArg(Enum.IsDefined(typeof(InternalDataKind), kind), nameof(Column.Type), "Bad item type"); itemType = ColumnTypeExtensions.PrimitiveTypeFromKind(kind); } @@ -876,8 +876,8 @@ public Bindings(ModelLoadContext ctx, TextLoader parent) string name = ctx.LoadNonEmptyString(); PrimitiveDataViewType itemType; - var kind = (DataKind)ctx.Reader.ReadByte(); - Contracts.CheckDecode(Enum.IsDefined(typeof(DataKind), kind)); + var kind = (InternalDataKind)ctx.Reader.ReadByte(); + Contracts.CheckDecode(Enum.IsDefined(typeof(InternalDataKind), kind)); bool isKey = ctx.Reader.ReadBoolByte(); if (isKey) { @@ -963,8 +963,8 @@ internal void Save(ModelSaveContext ctx) var info = Infos[iinfo]; ctx.SaveNonEmptyString(info.Name); var type = info.ColType.GetItemType(); - DataKind rawKind = type.GetRawKind(); - Contracts.Assert((DataKind)(byte)rawKind == rawKind); + InternalDataKind rawKind = type.GetRawKind(); + Contracts.Assert((InternalDataKind)(byte)rawKind == rawKind); ctx.Writer.Write((byte)rawKind); ctx.Writer.WriteBoolByte(type is KeyType); if (type is KeyType key) @@ -1480,7 +1480,7 @@ internal static TextLoader CreateTextReader(IHostEnvironment host, var column = new Column(); column.Name = mappingAttrName?.Name ?? memberInfo.Name; column.Source = mappingAttr.Sources.ToArray(); - DataKind dk; + InternalDataKind dk; switch (memberInfo) { case FieldInfo field: diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs index c0ce3935d0..71e0b2b184 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs @@ -103,14 +103,14 @@ public Func GetCreatorVec(KeyType key) return (Func)meth.Invoke(this, new object[] { key }); } - public Func GetCreatorOne(DataKind kind) + public Func GetCreatorOne(InternalDataKind kind) { int index = kind.ToIndex(); Contracts.Assert(0 <= index & index < _creatorsOne.Length); return _creatorsOne[index]; } - public Func GetCreatorVec(DataKind kind) + public Func GetCreatorVec(InternalDataKind kind) { int index = kind.ToIndex(); Contracts.Assert(0 <= index & index < _creatorsOne.Length); @@ -654,8 +654,8 @@ public Parser(TextLoader parent) _infos = parent._bindings.Infos; _creator = new Func[_infos.Length]; var cache = ValueCreatorCache.Instance; - var mapOne = new Dictionary>(); - var mapVec = new Dictionary>(); + var mapOne = new Dictionary>(); + var mapVec = new Dictionary>(); for (int i = 0; i < _creator.Length; i++) { var info = _infos[i]; diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs index 29d7e7654a..897396328d 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs @@ -503,7 +503,7 @@ private TextLoader.Column GetColumn(string name, DataViewType type, int? start) if (itemType is KeyType key) keyCount = new KeyCount(key.Count); - DataKind kind = itemType.GetRawKind(); + InternalDataKind kind = itemType.GetRawKind(); TextLoader.Range[] source = null; TextLoader.Range range = null; diff --git a/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs b/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs index f38e427d30..2e7a483776 100644 --- a/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs +++ b/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs @@ -85,7 +85,7 @@ public void AddColumn(string name, ValueGetter> _host.CheckValue(getKeyValues, nameof(getKeyValues)); _host.CheckParam(keyCount > 0, nameof(keyCount)); CheckLength(name, values); - values.GetType().GetElementType().TryGetDataKind(out DataKind kind); + values.GetType().GetElementType().TryGetDataKind(out InternalDataKind kind); _columns.Add(new AssignmentColumn(new KeyType(kind.ToType(), keyCount), values)); _getKeyValues.Add(name, getKeyValues); _names.Add(name); diff --git a/src/Microsoft.ML.Data/Transforms/Normalizer.cs b/src/Microsoft.ML.Data/Transforms/Normalizer.cs index be88e2eb65..9cf05dd698 100644 --- a/src/Microsoft.ML.Data/Transforms/Normalizer.cs +++ b/src/Microsoft.ML.Data/Transforms/Normalizer.cs @@ -338,8 +338,8 @@ internal static DataViewType LoadType(ModelLoadContext ctx) Contracts.CheckDecode(vectorSize >= 0); Contracts.CheckDecode(vectorSize > 0 || !isVector); - DataKind itemKind = (DataKind)ctx.Reader.ReadByte(); - Contracts.CheckDecode(itemKind == DataKind.R4 || itemKind == DataKind.R8); + InternalDataKind itemKind = (InternalDataKind)ctx.Reader.ReadByte(); + Contracts.CheckDecode(itemKind == InternalDataKind.R4 || itemKind == InternalDataKind.R8); var itemType = ColumnTypeExtensions.PrimitiveTypeFromKind(itemKind); return isVector ? (DataViewType)(new VectorType(itemType, vectorSize)) : itemType; @@ -359,8 +359,8 @@ internal static void SaveType(ModelSaveContext ctx, DataViewType type) ctx.Writer.Write(vectorType?.Size ?? 0); DataViewType itemType = vectorType?.ItemType ?? type; - itemType.RawType.TryGetDataKind(out DataKind itemKind); - Contracts.Assert(itemKind == DataKind.R4 || itemKind == DataKind.R8); + itemType.RawType.TryGetDataKind(out InternalDataKind itemKind); + Contracts.Assert(itemKind == InternalDataKind.R4 || itemKind == InternalDataKind.R8); ctx.Writer.Write((byte)itemKind); } } diff --git a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs index ab8b5e540e..8281551491 100644 --- a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs +++ b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs @@ -61,7 +61,7 @@ public sealed class TypeConvertingTransformer : OneToOneTransformerBase internal class Column : OneToOneColumn { [Argument(ArgumentType.AtMostOnce, HelpText = "The result type", ShortName = "type")] - public DataKind? ResultType; + public InternalDataKind? ResultType; [Argument(ArgumentType.Multiple, HelpText = "For a key column, this defines the cardinality/count of valid key values", ShortName = "key", Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly)] public KeyCount KeyCount; @@ -88,9 +88,9 @@ private protected override bool TryParse(string str) if (extra == null) return true; - if (!TypeParsingUtils.TryParseDataKind(extra, out DataKind kind, out KeyCount)) + if (!TypeParsingUtils.TryParseDataKind(extra, out InternalDataKind kind, out KeyCount)) return false; - ResultType = kind == default ? default(DataKind?) : kind; + ResultType = kind == default ? default(InternalDataKind?) : kind; return true; } @@ -135,7 +135,7 @@ internal class Options : TransformInputBase public Column[] Columns; [Argument(ArgumentType.AtMostOnce, HelpText = "The result type", ShortName = "type", SortOrder = 2)] - public DataKind? ResultType; + public InternalDataKind? ResultType; [Argument(ArgumentType.Multiple, HelpText = "For a key column, this defines the range of values", ShortName = "key", Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly)] public KeyCount KeyCount; @@ -221,7 +221,7 @@ private protected override void SaveModel(ModelSaveContext ctx) for (int i = 0; i < _columns.Length; i++) { - Host.Assert((DataKind)(byte)_columns[i].OutputType.ToDataKind() == _columns[i].OutputType.ToDataKind()); + Host.Assert((InternalDataKind)(byte)_columns[i].OutputType.ToDataKind() == _columns[i].OutputType.ToDataKind()); if (_columns[i].OutputKeyCount != null) { byte b = (byte)_columns[i].OutputType; @@ -264,8 +264,8 @@ private TypeConvertingTransformer(IHost host, ModelLoadContext ctx) for (int i = 0; i < columnsLength; i++) { byte b = ctx.Reader.ReadByte(); - var kind = (DataKind)(b & 0x7F); - Host.CheckDecode(Enum.IsDefined(typeof(DataKind), kind)); + var kind = (InternalDataKind)(b & 0x7F); + Host.CheckDecode(Enum.IsDefined(typeof(InternalDataKind), kind)); KeyCount keyCount = null; ulong count = 0; if ((b & 0x80) != 0) @@ -322,15 +322,15 @@ internal static IDataTransform Create(IHostEnvironment env, Options options, IDa keyCount = KeyCount.Parse(options.Range); } - DataKind kind; + InternalDataKind kind; if (tempResultType == null) { if (keyCount == null) - kind = DataKind.Num; + kind = InternalDataKind.Num; else { var srcType = input.Schema[item.Source ?? item.Name].Type; - kind = srcType is KeyType ? srcType.GetRawKind() : DataKind.U8; + kind = srcType is KeyType ? srcType.GetRawKind() : InternalDataKind.U8; } } else @@ -352,7 +352,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, Dat private protected override IRowMapper MakeRowMapper(DataViewSchema schema) => new Mapper(this, schema); - internal static bool GetNewType(IExceptionContext ectx, DataViewType srcType, DataKind kind, KeyCount keyCount, out PrimitiveDataViewType itemType) + internal static bool GetNewType(IExceptionContext ectx, DataViewType srcType, InternalDataKind kind, KeyCount keyCount, out PrimitiveDataViewType itemType) { if (keyCount != null) { @@ -411,11 +411,11 @@ public Mapper(TypeConvertingTransformer parent, DataViewSchema inputSchema) } } - private static bool CanConvertToType(IExceptionContext ectx, DataViewType srcType, DataKind kind, KeyCount keyCount, + private static bool CanConvertToType(IExceptionContext ectx, DataViewType srcType, InternalDataKind kind, KeyCount keyCount, out PrimitiveDataViewType itemType, out DataViewType typeDst) { ectx.AssertValue(srcType); - ectx.Assert(Enum.IsDefined(typeof(DataKind), kind)); + ectx.Assert(Enum.IsDefined(typeof(InternalDataKind), kind)); typeDst = null; if (!GetNewType(ectx, srcType, kind, keyCount, out itemType)) @@ -572,7 +572,7 @@ public ColumnInfo(string name, Type type, string inputColumnName, KeyCount outpu { Name = name; InputColumnName = inputColumnName ?? name; - if (!type.TryGetDataKind(out DataKind OutputKind)) + if (!type.TryGetDataKind(out InternalDataKind OutputKind)) throw Contracts.ExceptUserArg(nameof(type), $"Unsupported type {type}."); OutputType = OutputKind.ToScalarType(); OutputKeyCount = outputKeyCount; diff --git a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs index cbfb3cd1bc..a4e05a89e5 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs @@ -168,7 +168,7 @@ internal static PrimitiveDataViewType GetPrimitiveType(Type rawType, out bool is isVectorType = true; } - if (!type.TryGetDataKind(out DataKind kind)) + if (!type.TryGetDataKind(out InternalDataKind kind)) throw new InvalidOperationException($"Unsupported type {type} used in mapping."); return ColumnTypeExtensions.PrimitiveTypeFromKind(kind); @@ -733,7 +733,7 @@ protected static PrimitiveDataViewType GetPrimitiveType(Type rawType, out bool i isVectorType = true; } - if (!type.TryGetDataKind(out DataKind kind)) + if (!type.TryGetDataKind(out InternalDataKind kind)) throw Contracts.Except($"Unsupported type {type} used in mapping."); return ColumnTypeExtensions.PrimitiveTypeFromKind(kind); diff --git a/src/Microsoft.ML.Data/Utilities/TypeParsingUtils.cs b/src/Microsoft.ML.Data/Utilities/TypeParsingUtils.cs index 7e6194f6db..c3bc1e9491 100644 --- a/src/Microsoft.ML.Data/Utilities/TypeParsingUtils.cs +++ b/src/Microsoft.ML.Data/Utilities/TypeParsingUtils.cs @@ -18,13 +18,13 @@ internal static class TypeParsingUtils { /// /// Attempt to parse the string into a data kind and (optionally) a keyCount. This method does not check whether - /// the returned can really be made into a key with the specified . + /// the returned can really be made into a key with the specified . /// /// The string to parse. /// The parsed data kind. /// The parsed key count, or null if there's no key specification. /// Whether the parsing succeeded or not. - public static bool TryParseDataKind(string str, out DataKind dataKind, out KeyCount keyCount) + public static bool TryParseDataKind(string str, out InternalDataKind dataKind, out KeyCount keyCount) { Contracts.CheckValue(str, nameof(str)); keyCount = null; @@ -52,12 +52,12 @@ public static bool TryParseDataKind(string str, out DataKind dataKind, out KeyCo /// /// Construct a out of the data kind and the keyCount. /// - public static KeyType ConstructKeyType(DataKind? type, KeyCount keyCount) + public static KeyType ConstructKeyType(InternalDataKind? type, KeyCount keyCount) { Contracts.CheckValue(keyCount, nameof(keyCount)); KeyType keyType; - Type rawType = type.HasValue ? type.Value.ToType() : DataKind.U8.ToType(); + Type rawType = type.HasValue ? type.Value.ToType() : InternalDataKind.U8.ToType(); Contracts.CheckUserArg(KeyType.IsValidDataType(rawType), nameof(TextLoader.Column.Type), "Bad item type for Key"); if (keyCount.Count == null) diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs b/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs index 241d43615b..2be81943cd 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs @@ -192,19 +192,19 @@ internal sealed class OnnxUtils typeof(UInt32), typeof(UInt64) }; - private static Dictionary _typeToKindMap= - new Dictionary + private static Dictionary _typeToKindMap= + new Dictionary { - { typeof(Single) , DataKind.R4}, - { typeof(Double) , DataKind.R8}, - { typeof(Int16) , DataKind.I2}, - { typeof(Int32) , DataKind.I4}, - { typeof(Int64) , DataKind.I8}, - { typeof(UInt16) , DataKind.U2}, - { typeof(UInt32) , DataKind.U4}, - { typeof(UInt64) , DataKind.U8}, - { typeof(String) , DataKind.TX}, - { typeof(Boolean) , DataKind.BL}, + { typeof(Single) , InternalDataKind.R4}, + { typeof(Double) , InternalDataKind.R8}, + { typeof(Int16) , InternalDataKind.I2}, + { typeof(Int32) , InternalDataKind.I4}, + { typeof(Int64) , InternalDataKind.I8}, + { typeof(UInt16) , InternalDataKind.U2}, + { typeof(UInt32) , InternalDataKind.U4}, + { typeof(UInt64) , InternalDataKind.U8}, + { typeof(String) , InternalDataKind.TX}, + { typeof(Boolean) , InternalDataKind.BL}, }; /// diff --git a/src/Microsoft.ML.Parquet/PartitionedFileLoader.cs b/src/Microsoft.ML.Parquet/PartitionedFileLoader.cs index 055d34f3b9..2d7c298bc4 100644 --- a/src/Microsoft.ML.Parquet/PartitionedFileLoader.cs +++ b/src/Microsoft.ML.Parquet/PartitionedFileLoader.cs @@ -87,7 +87,7 @@ public sealed class Column public string Name; [Argument(ArgumentType.AtMostOnce, HelpText = "Data type of the column.")] - public DataKind? Type; + public InternalDataKind? Type; [Argument(ArgumentType.Required, HelpText = "Index of the directory representing this column.")] public int Source; @@ -118,8 +118,8 @@ private static bool TryParse(string str, out Column column) return false; } - DataKind? kind = null; - if (kindStr != null && TypeParsingUtils.TryParseDataKind(kindStr, out DataKind parsedKind, out var keyCount)) + InternalDataKind? kind = null; + if (kindStr != null && TypeParsingUtils.TryParseDataKind(kindStr, out InternalDataKind parsedKind, out var keyCount)) { kind = parsedKind; } @@ -197,7 +197,7 @@ public PartitionedFileLoader(IHostEnvironment env, Arguments args, IMultiStreamS { Name = "Path", Source = FilePathColIndex, - Type = DataKind.Text + Type = InternalDataKind.Text }; columns = columns.Concat(new[] { pathCol }).ToArray(); diff --git a/src/Microsoft.ML.Parquet/PartitionedPathParser.cs b/src/Microsoft.ML.Parquet/PartitionedPathParser.cs index 70a01be64b..b453b99ccb 100644 --- a/src/Microsoft.ML.Parquet/PartitionedPathParser.cs +++ b/src/Microsoft.ML.Parquet/PartitionedPathParser.cs @@ -82,7 +82,7 @@ public class Arguments : IPartitionedPathParserFactory public PartitionedFileLoader.Column[] Columns; [Argument(ArgumentType.AtMostOnce, HelpText = "Data type of each column.")] - public DataKind Type = DataKind.Text; + public InternalDataKind Type = InternalDataKind.Text; public IPartitionedPathParser CreateComponent(IHostEnvironment env) => new SimplePartitionedPathParser(env, this); } @@ -294,7 +294,7 @@ void ICanSaveModel.Save(ModelSaveContext ctx) { Name = names[i], Source = i, - Type = DataKind.Text + Type = InternalDataKind.Text }; } diff --git a/src/Microsoft.ML.Recommender/RecommenderUtils.cs b/src/Microsoft.ML.Recommender/RecommenderUtils.cs index b33ef0427d..4e561f0dc4 100644 --- a/src/Microsoft.ML.Recommender/RecommenderUtils.cs +++ b/src/Microsoft.ML.Recommender/RecommenderUtils.cs @@ -38,7 +38,7 @@ private static bool TryMarshalGoodRowColumnType(DataViewType type, out KeyType k /// /// Checks whether a column kind in a is unique, and its type - /// is a key of known cardinality. + /// is a key of known cardinality. /// /// The training examples /// The column role to try to extract diff --git a/src/Microsoft.ML.StaticPipe/ConvertStaticExtensions.cs b/src/Microsoft.ML.StaticPipe/ConvertStaticExtensions.cs index 464ee1a0b2..cbb301730c 100644 --- a/src/Microsoft.ML.StaticPipe/ConvertStaticExtensions.cs +++ b/src/Microsoft.ML.StaticPipe/ConvertStaticExtensions.cs @@ -15,21 +15,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For double inputs. @@ -38,21 +38,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For sbyte inputs. @@ -61,21 +61,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For short inputs. @@ -84,21 +84,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For int inputs. @@ -107,21 +107,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For long inputs. @@ -130,21 +130,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For byte inputs. @@ -153,21 +153,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For ushort inputs. @@ -176,21 +176,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For uint inputs. @@ -199,21 +199,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For ulong inputs. @@ -222,21 +222,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion #region For bool inputs. @@ -245,21 +245,21 @@ public static partial class ConvertStaticExtensions /// /// The input column. /// Float column. - public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Scalar ToFloat(this Scalar input) => new ImplScalar(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to array of floats. /// /// The input column. /// Column with array of floats. - public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static Vector ToFloat(this Vector input) => new ImplVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); /// /// Convert to variable array of floats. /// /// The input column. /// Column with variable array of floats. - public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), DataKind.R4); + public static VarVector ToFloat(this VarVector input) => new ImplVarVector(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); #endregion } diff --git a/src/Microsoft.ML.StaticPipe/StaticSchemaShape.cs b/src/Microsoft.ML.StaticPipe/StaticSchemaShape.cs index 1f35d211a5..e830b29934 100644 --- a/src/Microsoft.ML.StaticPipe/StaticSchemaShape.cs +++ b/src/Microsoft.ML.StaticPipe/StaticSchemaShape.cs @@ -324,7 +324,7 @@ private static Type GetTypeOrNull(DataViewSchema.Column col) /// /// Note that this can return a different type than the actual physical representation type, for example, for - /// the return type is , even though we do not use that + /// the return type is , even though we do not use that /// type for communicating text. /// /// The basic type used to represent an item type in the static pipeline diff --git a/src/Microsoft.ML.StaticPipe/TextLoaderStatic.cs b/src/Microsoft.ML.StaticPipe/TextLoaderStatic.cs index e19f40cf88..b27a1ddd58 100644 --- a/src/Microsoft.ML.StaticPipe/TextLoaderStatic.cs +++ b/src/Microsoft.ML.StaticPipe/TextLoaderStatic.cs @@ -131,7 +131,7 @@ internal Context(Reconciler rec) /// /// The zero-based index of the field to read from. /// The column representation. - public Scalar LoadBool(int ordinal) => Load(DataKind.BL, ordinal); + public Scalar LoadBool(int ordinal) => Load(InternalDataKind.BL, ordinal); /// /// Reads a vector Boolean column from a range of fields in the text file. @@ -141,7 +141,7 @@ internal Context(Reconciler rec) /// Note that if this is null, it will read to the end of the line. The file(s) /// will be inspected to get the length of the type. /// The column representation. - public Vector LoadBool(int minOrdinal, int? maxOrdinal) => Load(DataKind.BL, minOrdinal, maxOrdinal); + public Vector LoadBool(int minOrdinal, int? maxOrdinal) => Load(InternalDataKind.BL, minOrdinal, maxOrdinal); /// /// Create a representation for a key loaded from TextLoader as an unsigned integer (32 bits). @@ -150,14 +150,14 @@ internal Context(Reconciler rec) /// If specified, it's the count or cardinality of valid key values. /// Using null initalizes to uint.MaxValue /// The column representation. - public Key LoadKey(int ordinal, ulong? keyCount) => Load(DataKind.U4, ordinal, keyCount); + public Key LoadKey(int ordinal, ulong? keyCount) => Load(InternalDataKind.U4, ordinal, keyCount); /// /// Reads a scalar single-precision floating point column from a single field in the text file. /// /// The zero-based index of the field to read from. /// The column representation. - public Scalar LoadFloat(int ordinal) => Load(DataKind.R4, ordinal); + public Scalar LoadFloat(int ordinal) => Load(InternalDataKind.R4, ordinal); /// /// Reads a vector single-precision column from a range of fields in the text file. @@ -167,14 +167,14 @@ internal Context(Reconciler rec) /// Note that if this is null, it will read to the end of the line. The file(s) /// will be inspected to get the length of the type. /// The column representation. - public Vector LoadFloat(int minOrdinal, int? maxOrdinal) => Load(DataKind.R4, minOrdinal, maxOrdinal); + public Vector LoadFloat(int minOrdinal, int? maxOrdinal) => Load(InternalDataKind.R4, minOrdinal, maxOrdinal); /// /// Reads a scalar double-precision floating point column from a single field in the text file. /// /// The zero-based index of the field to read from. /// The column representation. - public Scalar LoadDouble(int ordinal) => Load(DataKind.R8, ordinal); + public Scalar LoadDouble(int ordinal) => Load(InternalDataKind.R8, ordinal); /// /// Reads a vector double-precision column from a range of fields in the text file. @@ -184,14 +184,14 @@ internal Context(Reconciler rec) /// Note that if this is null, it will read to the end of the line. The file(s) /// will be inspected to get the length of the type. /// The column representation. - public Vector LoadDouble(int minOrdinal, int? maxOrdinal) => Load(DataKind.R8, minOrdinal, maxOrdinal); + public Vector LoadDouble(int minOrdinal, int? maxOrdinal) => Load(InternalDataKind.R8, minOrdinal, maxOrdinal); /// /// Reads a scalar textual column from a single field in the text file. /// /// The zero-based index of the field to read from. /// The column representation. - public Scalar LoadText(int ordinal) => Load(DataKind.TX, ordinal); + public Scalar LoadText(int ordinal) => Load(InternalDataKind.TX, ordinal); /// /// Reads a vector textual column from a range of fields in the text file. @@ -201,15 +201,15 @@ internal Context(Reconciler rec) /// Note that if this is null, it will read to the end of the line. The file(s) /// will be inspected to get the length of the type. /// The column representation. - public Vector LoadText(int minOrdinal, int? maxOrdinal) => Load(DataKind.TX, minOrdinal, maxOrdinal); + public Vector LoadText(int minOrdinal, int? maxOrdinal) => Load(InternalDataKind.TX, minOrdinal, maxOrdinal); - private Scalar Load(DataKind kind, int ordinal) + private Scalar Load(InternalDataKind kind, int ordinal) { Contracts.CheckParam(ordinal >= 0, nameof(ordinal), "Should be non-negative"); return new MyScalar(_rec, kind, ordinal); } - private Vector Load(DataKind kind, int minOrdinal, int? maxOrdinal) + private Vector Load(InternalDataKind kind, int minOrdinal, int? maxOrdinal) { Contracts.CheckParam(minOrdinal >= 0, nameof(minOrdinal), "Should be non-negative"); var v = maxOrdinal >= minOrdinal; @@ -217,7 +217,7 @@ private Vector Load(DataKind kind, int minOrdinal, int? maxOrdinal) return new MyVector(_rec, kind, minOrdinal, maxOrdinal); } - private Key Load(DataKind kind, int ordinal, ulong? keyCount) + private Key Load(InternalDataKind kind, int ordinal, ulong? keyCount) { Contracts.CheckParam(ordinal >= 0, nameof(ordinal), "Should be non-negative"); return new MyKey(_rec, kind, ordinal, keyCount); @@ -230,14 +230,14 @@ private Key Load(DataKind kind, int ordinal, ulong? keyCount) private class MyKey : Key, IPipelineArgColumn { // The storage type that the targeted content would be loaded as. - private readonly DataKind _kind; + private readonly InternalDataKind _kind; // The position where the key value gets read from. private readonly int _oridinal; // The count or cardinality of valid key values. Its value is null if unbounded. private readonly ulong? _keyCount; // Contstuct a representation for a key-typed column loaded from a text file. Key values are assumed to be contiguous. - public MyKey(Reconciler rec, DataKind kind, int oridinal, ulong? keyCount=null) + public MyKey(Reconciler rec, InternalDataKind kind, int oridinal, ulong? keyCount=null) : base(rec, null) { _kind = kind; @@ -259,10 +259,10 @@ public TextLoader.Column Create() private class MyScalar : Scalar, IPipelineArgColumn { - private readonly DataKind _kind; + private readonly InternalDataKind _kind; private readonly int _ordinal; - public MyScalar(Reconciler rec, DataKind kind, int ordinal) + public MyScalar(Reconciler rec, InternalDataKind kind, int ordinal) : base(rec, null) { _kind = kind; @@ -281,11 +281,11 @@ public TextLoader.Column Create() private class MyVector : Vector, IPipelineArgColumn { - private readonly DataKind _kind; + private readonly InternalDataKind _kind; private readonly int _min; private readonly int? _max; - public MyVector(Reconciler rec, DataKind kind, int min, int? max) + public MyVector(Reconciler rec, InternalDataKind kind, int min, int? max) : base(rec, null) { _kind = kind; diff --git a/src/Microsoft.ML.StaticPipe/TransformsStatic.cs b/src/Microsoft.ML.StaticPipe/TransformsStatic.cs index d21cc2b859..77cb4952df 100644 --- a/src/Microsoft.ML.StaticPipe/TransformsStatic.cs +++ b/src/Microsoft.ML.StaticPipe/TransformsStatic.cs @@ -889,14 +889,14 @@ public static partial class ConvertStaticExtensions private interface IConvertCol { PipelineColumn Input { get; } - DataKind Kind { get; } + InternalDataKind Kind { get; } } private sealed class ImplScalar : Scalar, IConvertCol { public PipelineColumn Input { get; } - public DataKind Kind { get; } - public ImplScalar(PipelineColumn input, DataKind kind) : base(Rec.Inst, input) + public InternalDataKind Kind { get; } + public ImplScalar(PipelineColumn input, InternalDataKind kind) : base(Rec.Inst, input) { Input = input; Kind = kind; @@ -906,8 +906,8 @@ public ImplScalar(PipelineColumn input, DataKind kind) : base(Rec.Inst, input) private sealed class ImplVector : Vector, IConvertCol { public PipelineColumn Input { get; } - public DataKind Kind { get; } - public ImplVector(PipelineColumn input, DataKind kind) : base(Rec.Inst, input) + public InternalDataKind Kind { get; } + public ImplVector(PipelineColumn input, InternalDataKind kind) : base(Rec.Inst, input) { Input = input; Kind = kind; @@ -917,8 +917,8 @@ public ImplVector(PipelineColumn input, DataKind kind) : base(Rec.Inst, input) private sealed class ImplVarVector : VarVector, IConvertCol { public PipelineColumn Input { get; } - public DataKind Kind { get; } - public ImplVarVector(PipelineColumn input, DataKind kind) : base(Rec.Inst, input) + public InternalDataKind Kind { get; } + public ImplVarVector(PipelineColumn input, InternalDataKind kind) : base(Rec.Inst, input) { Input = input; Kind = kind; diff --git a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs index 8ab6a0aa84..5eee619962 100644 --- a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs +++ b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs @@ -181,7 +181,7 @@ internal static IDataTransform Create(IHostEnvironment env, Options options, IDa // Add a ConvertTransform column if necessary. if (!identity) { - if (!replaceItemType.RawType.TryGetDataKind(out DataKind replaceItemTypeKind)) + if (!replaceItemType.RawType.TryGetDataKind(out InternalDataKind replaceItemTypeKind)) { throw h.Except("Cannot get a DataKind for type '{0}'", replaceItemType.RawType); } diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/CoreBaseTestClass.cs b/test/Microsoft.ML.Core.Tests/UnitTests/CoreBaseTestClass.cs index 05362b583f..fa33ec5e17 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/CoreBaseTestClass.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/CoreBaseTestClass.cs @@ -165,40 +165,40 @@ protected Func GetColumnComparer(DataViewRow r1, DataViewRow r2, int col, switch (kind) { - case DataKind.I1: + case InternalDataKind.I1: return GetComparerVec(r1, r2, col, size, (x, y) => x == y); - case DataKind.U1: + case InternalDataKind.U1: return GetComparerVec(r1, r2, col, size, (x, y) => x == y); - case DataKind.I2: + case InternalDataKind.I2: return GetComparerVec(r1, r2, col, size, (x, y) => x == y); - case DataKind.U2: + case InternalDataKind.U2: return GetComparerVec(r1, r2, col, size, (x, y) => x == y); - case DataKind.I4: + case InternalDataKind.I4: return GetComparerVec(r1, r2, col, size, (x, y) => x == y); - case DataKind.U4: + case InternalDataKind.U4: return GetComparerVec(r1, r2, col, size, (x, y) => x == y); - case DataKind.I8: + case InternalDataKind.I8: return GetComparerVec(r1, r2, col, size, (x, y) => x == y); - case DataKind.U8: + case InternalDataKind.U8: return GetComparerVec(r1, r2, col, size, (x, y) => x == y); - case DataKind.R4: + case InternalDataKind.R4: return GetComparerVec(r1, r2, col, size, (x, y) => FloatUtils.GetBits(x) == FloatUtils.GetBits(y)); - case DataKind.R8: + case InternalDataKind.R8: if (exactDoubles) return GetComparerVec(r1, r2, col, size, (x, y) => FloatUtils.GetBits(x) == FloatUtils.GetBits(y)); else return GetComparerVec(r1, r2, col, size, EqualWithEps); - case DataKind.Text: + case InternalDataKind.Text: return GetComparerVec>(r1, r2, col, size, (a, b) => a.Span.SequenceEqual(b.Span)); - case DataKind.Bool: + case InternalDataKind.Bool: return GetComparerVec(r1, r2, col, size, (x, y) => x == y); - case DataKind.TimeSpan: + case InternalDataKind.TimeSpan: return GetComparerVec(r1, r2, col, size, (x, y) => x.Ticks == y.Ticks); - case DataKind.DT: + case InternalDataKind.DT: return GetComparerVec(r1, r2, col, size, (x, y) => x.Ticks == y.Ticks); - case DataKind.DZ: + case InternalDataKind.DZ: return GetComparerVec(r1, r2, col, size, (x, y) => x.Equals(y)); - case DataKind.UG: + case InternalDataKind.UG: return GetComparerVec(r1, r2, col, size, (x, y) => x.Equals(y)); } } @@ -208,40 +208,40 @@ protected Func GetColumnComparer(DataViewRow r1, DataViewRow r2, int col, Contracts.Assert(result); switch (kind) { - case DataKind.I1: + case InternalDataKind.I1: return GetComparerOne(r1, r2, col, (x, y) => x == y); - case DataKind.U1: + case InternalDataKind.U1: return GetComparerOne(r1, r2, col, (x, y) => x == y); - case DataKind.I2: + case InternalDataKind.I2: return GetComparerOne(r1, r2, col, (x, y) => x == y); - case DataKind.U2: + case InternalDataKind.U2: return GetComparerOne(r1, r2, col, (x, y) => x == y); - case DataKind.I4: + case InternalDataKind.I4: return GetComparerOne(r1, r2, col, (x, y) => x == y); - case DataKind.U4: + case InternalDataKind.U4: return GetComparerOne(r1, r2, col, (x, y) => x == y); - case DataKind.I8: + case InternalDataKind.I8: return GetComparerOne(r1, r2, col, (x, y) => x == y); - case DataKind.U8: + case InternalDataKind.U8: return GetComparerOne(r1, r2, col, (x, y) => x == y); - case DataKind.R4: + case InternalDataKind.R4: return GetComparerOne(r1, r2, col, (x, y) => FloatUtils.GetBits(x) == FloatUtils.GetBits(y)); - case DataKind.R8: + case InternalDataKind.R8: if (exactDoubles) return GetComparerOne(r1, r2, col, (x, y) => FloatUtils.GetBits(x) == FloatUtils.GetBits(y)); else return GetComparerOne(r1, r2, col, EqualWithEps); - case DataKind.Text: + case InternalDataKind.Text: return GetComparerOne>(r1, r2, col, (a, b) => a.Span.SequenceEqual(b.Span)); - case DataKind.Bool: + case InternalDataKind.Bool: return GetComparerOne(r1, r2, col, (x, y) => x == y); - case DataKind.TimeSpan: + case InternalDataKind.TimeSpan: return GetComparerOne(r1, r2, col, (x, y) => x.Ticks == y.Ticks); - case DataKind.DT: + case InternalDataKind.DT: return GetComparerOne(r1, r2, col, (x, y) => x.Ticks == y.Ticks); - case DataKind.DZ: + case InternalDataKind.DZ: return GetComparerOne(r1, r2, col, (x, y) => x.Equals(y)); - case DataKind.UG: + case InternalDataKind.UG: return GetComparerOne(r1, r2, col, (x, y) => x.Equals(y)); } } diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs b/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs index a694b817b5..2a1cb630b1 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs +++ b/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML.Functional.Tests.Datasets { /// - /// A class containing one property per . + /// A class containing one property per . /// /// /// This class has annotations for automatic deserialization from a file, and contains helper methods diff --git a/test/Microsoft.ML.Tests/FakeSchemaTest.cs b/test/Microsoft.ML.Tests/FakeSchemaTest.cs index 208a62a796..c442bd1dbb 100644 --- a/test/Microsoft.ML.Tests/FakeSchemaTest.cs +++ b/test/Microsoft.ML.Tests/FakeSchemaTest.cs @@ -41,7 +41,7 @@ void SimpleTest() Assert.Equal(10, columnA.Type.GetValueCount()); Assert.Equal("B", columnB.Name); - Assert.Equal(DataKind.U4, columnB.Type.GetRawKind()); + Assert.Equal(InternalDataKind.U4, columnB.Type.GetRawKind()); Assert.Equal(10u, columnB.Type.GetKeyCount()); Assert.Equal("C", columnC.Name); From 7f28030c5b91e3ada54df94f23661219bbf56cde Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Fri, 22 Feb 2019 10:48:13 -0800 Subject: [PATCH 05/12] ScalarType ---> DataKind (massive renaming) --- .../Dynamic/Calibrator.cs | 4 +- .../Dynamic/FeatureSelectionTransform.cs | 4 +- .../Dynamic/FieldAwareFactorizationMachine.cs | 4 +- .../ImageAnalytics/ConvertToGrayScale.cs | 4 +- .../Dynamic/ImageAnalytics/ExtractPixels.cs | 4 +- .../Dynamic/ImageAnalytics/LoadImages.cs | 4 +- .../Dynamic/ImageAnalytics/ResizeImages.cs | 4 +- .../Dynamic/LogisticRegression.cs | 30 +++++------ .../Dynamic/TensorFlow/TextClassification.cs | 4 +- .../SDCALogisticRegression.cs | 4 +- .../Dynamic/Trainers/PriorTrainerSample.cs | 4 +- .../Dynamic/Trainers/RandomTrainerSample.cs | 4 +- .../Regression/OrdinaryLeastSquares.cs | 4 +- .../OrdinaryLeastSquaresWithOptions.cs | 4 +- src/Microsoft.ML.Core/Data/DataKind.cs | 50 ++++++++--------- .../DataLoadSave/Text/TextLoader.cs | 26 ++++----- .../ConversionsExtensionsCatalog.cs | 6 +-- .../Transforms/TypeConverting.cs | 38 ++++++------- .../Transforms/ValueMapping.cs | 12 ++--- .../ValueToKeyMappingTransformer.cs | 2 +- .../FeatureCombiner.cs | 4 +- src/Microsoft.ML.FastTree/FastTree.cs | 2 +- .../SamplesDatasetUtils.cs | 54 +++++++++---------- .../Text/StopWordsRemovingTransformer.cs | 2 +- .../KMeansAndLogisticRegressionBench.cs | 6 +-- .../PredictionEngineBench.cs | 18 +++---- test/Microsoft.ML.Benchmarks/RffTransform.cs | 4 +- ...sticDualCoordinateAscentClassifierBench.cs | 24 ++++----- .../UnitTests/TestEntryPoints.cs | 34 ++++++------ .../UnitTests/TestHosts.cs | 2 +- .../Datasets/TypeTestData.cs | 34 ++++++------ .../TestIniModels.cs | 8 +-- test/Microsoft.ML.TestFramework/Datasets.cs | 38 ++++++------- .../AnomalyDetectionTests.cs | 4 +- test/Microsoft.ML.Tests/ImagesTests.cs | 52 +++++++++--------- .../CookbookSamplesDynamicApi.cs | 16 +++--- .../Scenarios/Api/TestApi.cs | 8 +-- .../Scenarios/IrisPlantClassificationTests.cs | 10 ++-- ...PlantClassificationWithStringLabelTests.cs | 10 ++-- test/Microsoft.ML.Tests/Scenarios/OvaTest.cs | 16 +++--- .../Scenarios/TensorflowTests.cs | 4 +- .../IrisPlantClassificationTests.cs | 10 ++-- .../TensorflowTests.cs | 40 +++++++------- test/Microsoft.ML.Tests/TermEstimatorTests.cs | 14 ++--- .../TrainerEstimators/FAFMEstimator.cs | 10 ++-- .../MatrixFactorizationTests.cs | 6 +-- .../TrainerEstimators/PriorRandomTests.cs | 8 +-- .../TrainerEstimators/TrainerEstimators.cs | 28 +++++----- .../Transformers/ConcatTests.cs | 14 ++--- .../Transformers/ConvertTests.cs | 34 ++++++------ .../Transformers/CustomMappingTests.cs | 10 ++-- .../Transformers/KeyToValueTests.cs | 6 +-- .../Transformers/NormalizerTests.cs | 28 +++++----- .../Transformers/TextFeaturizerTests.cs | 2 +- .../Transformers/WordEmbeddingsTests.cs | 8 +-- 55 files changed, 392 insertions(+), 392 deletions(-) diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Calibrator.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Calibrator.cs index 179698fde7..f9b03fa5d3 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Calibrator.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Calibrator.cs @@ -34,8 +34,8 @@ public static void Example() HasHeader = true, Columns = new[] { - new TextLoader.Column("Sentiment", ScalarType.Boolean, 0), - new TextLoader.Column("SentimentText", ScalarType.String, 1) + new TextLoader.Column("Sentiment", DataKind.Boolean, 0), + new TextLoader.Column("SentimentText", DataKind.String, 1) } }); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/FeatureSelectionTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/FeatureSelectionTransform.cs index d36f1b3b1e..f9023b524e 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/FeatureSelectionTransform.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/FeatureSelectionTransform.cs @@ -33,8 +33,8 @@ public static void Example() var reader = ml.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Label", ScalarType.Boolean, 0), - new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 9) }) + new TextLoader.Column("Label", DataKind.Boolean, 0), + new TextLoader.Column("Features", DataKind.Single, new [] { new TextLoader.Range(1, 9) }) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/FieldAwareFactorizationMachine.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/FieldAwareFactorizationMachine.cs index 88486b91b8..299638c573 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/FieldAwareFactorizationMachine.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/FieldAwareFactorizationMachine.cs @@ -25,8 +25,8 @@ public static void Example() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Sentiment", ScalarType.Boolean, 0), - new TextLoader.Column("SentimentText", ScalarType.String, 1) + new TextLoader.Column("Sentiment", DataKind.Boolean, 0), + new TextLoader.Column("SentimentText", DataKind.String, 1) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ConvertToGrayScale.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ConvertToGrayScale.cs index 0b77d606e5..3f67cbe84f 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ConvertToGrayScale.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ConvertToGrayScale.cs @@ -27,8 +27,8 @@ public static void Example() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }).Read(imagesDataFile); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ExtractPixels.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ExtractPixels.cs index 3a4910d6fd..d24539a5da 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ExtractPixels.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ExtractPixels.cs @@ -28,8 +28,8 @@ public static void Example() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }).Read(imagesDataFile); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/LoadImages.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/LoadImages.cs index 34eaaa55e5..c2b1cca9c1 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/LoadImages.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/LoadImages.cs @@ -27,8 +27,8 @@ public static void Example() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }).Read(imagesDataFile); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ResizeImages.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ResizeImages.cs index 4370ce311b..2d15396dc6 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ResizeImages.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ImageAnalytics/ResizeImages.cs @@ -27,8 +27,8 @@ public static void Example() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }).Read(imagesDataFile); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/LogisticRegression.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/LogisticRegression.cs index d89d6a4d4d..f0c9d574a7 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/LogisticRegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/LogisticRegression.cs @@ -37,21 +37,21 @@ public static void Example() HasHeader = true, Columns = new[] { - new TextLoader.Column("age", ScalarType.Single, 0), - new TextLoader.Column("workclass", ScalarType.String, 1), - new TextLoader.Column("fnlwgt", ScalarType.Single, 2), - new TextLoader.Column("education", ScalarType.String, 3), - new TextLoader.Column("education-num", ScalarType.Single, 4), - new TextLoader.Column("marital-status", ScalarType.String, 5), - new TextLoader.Column("occupation", ScalarType.String, 6), - new TextLoader.Column("relationship", ScalarType.String, 7), - new TextLoader.Column("ethnicity", ScalarType.String, 8), - new TextLoader.Column("sex", ScalarType.String, 9), - new TextLoader.Column("capital-gain", ScalarType.Single, 10), - new TextLoader.Column("capital-loss", ScalarType.Single, 11), - new TextLoader.Column("hours-per-week", ScalarType.Single, 12), - new TextLoader.Column("native-country", ScalarType.String, 13), - new TextLoader.Column("Label", ScalarType.Boolean, 14) + new TextLoader.Column("age", DataKind.Single, 0), + new TextLoader.Column("workclass", DataKind.String, 1), + new TextLoader.Column("fnlwgt", DataKind.Single, 2), + new TextLoader.Column("education", DataKind.String, 3), + new TextLoader.Column("education-num", DataKind.Single, 4), + new TextLoader.Column("marital-status", DataKind.String, 5), + new TextLoader.Column("occupation", DataKind.String, 6), + new TextLoader.Column("relationship", DataKind.String, 7), + new TextLoader.Column("ethnicity", DataKind.String, 8), + new TextLoader.Column("sex", DataKind.String, 9), + new TextLoader.Column("capital-gain", DataKind.Single, 10), + new TextLoader.Column("capital-loss", DataKind.Single, 11), + new TextLoader.Column("hours-per-week", DataKind.Single, 12), + new TextLoader.Column("native-country", DataKind.String, 13), + new TextLoader.Column("Label", DataKind.Boolean, 14) } }); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/TextClassification.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/TextClassification.cs index 3656f20ff3..8ced00d6ec 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/TextClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/TextClassification.cs @@ -36,8 +36,8 @@ public static void Example() var lookupMap = mlContext.Data.ReadFromTextFile(Path.Combine(modelLocation, "imdb_word_index.csv"), columns: new[] { - new TextLoader.Column("Words", ScalarType.String, 0), - new TextLoader.Column("Ids", ScalarType.Int32, 1), + new TextLoader.Column("Words", DataKind.String, 0), + new TextLoader.Column("Ids", DataKind.Int32, 1), }, separatorChar: ',' ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCALogisticRegression.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCALogisticRegression.cs index fc85cfef1f..76f70a6b30 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCALogisticRegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCALogisticRegression.cs @@ -28,8 +28,8 @@ public static void Example() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Sentiment", ScalarType.Boolean, 0), - new TextLoader.Column("SentimentText", ScalarType.String, 1) + new TextLoader.Column("Sentiment", DataKind.Boolean, 0), + new TextLoader.Column("SentimentText", DataKind.String, 1) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/PriorTrainerSample.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/PriorTrainerSample.cs index 3183deee57..4143e65463 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/PriorTrainerSample.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/PriorTrainerSample.cs @@ -26,8 +26,8 @@ public static void Example() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Sentiment", ScalarType.Single, 0), - new TextLoader.Column("SentimentText", ScalarType.String, 1) + new TextLoader.Column("Sentiment", DataKind.Single, 0), + new TextLoader.Column("SentimentText", DataKind.String, 1) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/RandomTrainerSample.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/RandomTrainerSample.cs index b156e013aa..a58b5cf100 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/RandomTrainerSample.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/RandomTrainerSample.cs @@ -26,8 +26,8 @@ public static void Example() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Sentiment", ScalarType.Single, 0), - new TextLoader.Column("SentimentText", ScalarType.String, 1) + new TextLoader.Column("Sentiment", DataKind.Single, 0), + new TextLoader.Column("SentimentText", DataKind.String, 1) }, hasHeader: true ); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs index 741c319a43..003962c5bc 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs @@ -28,8 +28,8 @@ public static void Example() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("Features", ScalarType.Single, 1, 6) + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("Features", DataKind.Single, 1, 6) } }); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs index d9245c4473..21a6a9e1ae 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs @@ -29,8 +29,8 @@ public static void Example() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("Features", ScalarType.Single, 1, 6) + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("Features", DataKind.Single, 1, 6) } }); diff --git a/src/Microsoft.ML.Core/Data/DataKind.cs b/src/Microsoft.ML.Core/Data/DataKind.cs index 153e3dc33f..443acf94d0 100644 --- a/src/Microsoft.ML.Core/Data/DataKind.cs +++ b/src/Microsoft.ML.Core/Data/DataKind.cs @@ -29,7 +29,7 @@ namespace Microsoft.ML.Data /// : type of . /// /// - public enum ScalarType : byte + public enum DataKind : byte { SByte = 1, Byte = 2, @@ -49,7 +49,7 @@ public enum ScalarType : byte } /// - /// Data type specifier used in command line. is the underlying version of + /// Data type specifier used in command line. is the underlying version of /// used for command line and entry point BC. /// [BestFriend] @@ -60,31 +60,31 @@ internal enum InternalDataKind : byte // * We intentionally skip zero. // * Some code depends on sizeof(DataKind) == sizeof(byte). - I1 = ScalarType.SByte, - U1 = ScalarType.Byte, - I2 = ScalarType.Int16, - U2 = ScalarType.UInt16, - I4 = ScalarType.Int32, - U4 = ScalarType.UInt32, - I8 = ScalarType.Int64, - U8 = ScalarType.UInt64, - R4 = ScalarType.Single, - R8 = ScalarType.Double, + I1 = DataKind.SByte, + U1 = DataKind.Byte, + I2 = DataKind.Int16, + U2 = DataKind.UInt16, + I4 = DataKind.Int32, + U4 = DataKind.UInt32, + I8 = DataKind.Int64, + U8 = DataKind.UInt64, + R4 = DataKind.Single, + R8 = DataKind.Double, Num = R4, - TX = ScalarType.String, + TX = DataKind.String, #pragma warning disable MSML_GeneralName // The data kind enum has its own logic, independent of C# naming conventions. TXT = TX, Text = TX, - BL = ScalarType.Boolean, + BL = DataKind.Boolean, Bool = BL, - TS = ScalarType.TimeSpan, + TS = DataKind.TimeSpan, TimeSpan = TS, - DT = ScalarType.DateTime, + DT = DataKind.DateTime, DateTime = DT, - DZ = ScalarType.DateTimeOffset, + DZ = DataKind.DateTimeOffset, DateTimeZone = DZ, UG = 16, // Unsigned 16-byte integer. @@ -120,20 +120,20 @@ public static InternalDataKind FromIndex(int index) } /// - /// This function converts to . - /// Because is a subset of , the conversion is straightforward. + /// This function converts to . + /// Because is a subset of , the conversion is straightforward. /// - public static InternalDataKind ToDataKind(this ScalarType scalarType) => (InternalDataKind)scalarType; + public static InternalDataKind ToDataKind(this DataKind dataKind) => (InternalDataKind)dataKind; /// - /// This function converts to . - /// Because is a subset of , we should check if - /// can be found in . + /// This function converts to . + /// Because is a subset of , we should check if + /// can be found in . /// - public static ScalarType ToScalarType(this InternalDataKind kind) + public static DataKind ToScalarType(this InternalDataKind kind) { Contracts.Check(kind != InternalDataKind.UG); - return (ScalarType)kind; + return (DataKind)kind; } /// diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index 7b949ec697..a8b8dec429 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -49,10 +49,10 @@ public Column() { } /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. + /// of the items in the column. /// Index of the column. - public Column(string name, ScalarType type, int index) - : this(name, type.ToDataKind(), new[] { new Range(index) }) + public Column(string name, DataKind dataKind, int index) + : this(name, dataKind.ToDataKind(), new[] { new Range(index) }) { } @@ -60,16 +60,16 @@ public Column(string name, ScalarType type, int index) /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. + /// of the items in the column. /// The minimum inclusive index of the column. /// The maximum-inclusive index of the column. - public Column(string name, ScalarType type, int minIndex, int maxIndex) - : this(name, type.ToDataKind(), new[] { new Range(minIndex, maxIndex) }) + public Column(string name, DataKind dataKind, int minIndex, int maxIndex) + : this(name, dataKind.ToDataKind(), new[] { new Range(minIndex, maxIndex) }) { } - public Column(string name, ScalarType type, Range[] source, KeyCount keyCount = null) - : this(name, type.ToDataKind(), source, keyCount) + public Column(string name, DataKind dataKind, Range[] source, KeyCount keyCount = null) + : this(name, dataKind.ToDataKind(), source, keyCount) { } @@ -77,16 +77,16 @@ public Column(string name, ScalarType type, Range[] source, KeyCount keyCount = /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. If defaults to a float. + /// of the items in the column. If defaults to a float. /// Source index range(s) of the column. /// For a key column, this defines the range of values. - private Column(string name, InternalDataKind? type, Range[] source, KeyCount keyCount = null) + private Column(string name, InternalDataKind? kind, Range[] source, KeyCount keyCount = null) { Contracts.CheckValue(name, nameof(name)); Contracts.CheckValue(source, nameof(source)); Name = name; - Type = type; + Type = kind; Source = source; KeyCount = keyCount; } @@ -106,10 +106,10 @@ private Column(string name, InternalDataKind? type, Range[] source, KeyCount key internal InternalDataKind? Type; /// - /// of the items in the column. + /// of the items in the column. /// /// It's a public interface to access the information in an internal DataKind. - public ScalarType ItemType => Type.HasValue ? Type.Value.ToScalarType() : ScalarType.Single; + public DataKind ItemType => Type.HasValue ? Type.Value.ToScalarType() : DataKind.Single; /// /// Source index range(s) of the column. diff --git a/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs b/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs index d906076480..3b6430f2a6 100644 --- a/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs @@ -46,10 +46,10 @@ public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms /// The transform's catalog. /// Name of the column resulting from the transformation of . /// Name of the column to transform. If set to , the value of the will be used as source. - /// The expected type of the converted column. + /// The expected kind of the output column. public static TypeConvertingEstimator ConvertType(this TransformsCatalog.ConversionTransforms catalog, string outputColumnName, string inputColumnName = null, - ScalarType outputType = ConvertDefaults.DefaultOutputKind) - => new TypeConvertingEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnName, inputColumnName, outputType); + DataKind outputKind = ConvertDefaults.DefaultOutputKind) + => new TypeConvertingEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnName, inputColumnName, outputKind); /// /// Changes column type of the input column. diff --git a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs index 8281551491..b391814c77 100644 --- a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs +++ b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs @@ -189,10 +189,10 @@ private static (string outputColumnName, string inputColumnName)[] GetColumnPair /// Host Environment. /// Name of the output column. /// Name of the column to be transformed. If this is null '' will be used. - /// The expected type of the converted column. + /// The expected type of the converted column. /// New key count if we work with key type. - internal TypeConvertingTransformer(IHostEnvironment env, string outputColumnName, ScalarType outputType, string inputColumnName = null, KeyCount outputKeyCount = null) - : this(env, new TypeConvertingEstimator.ColumnInfo(outputColumnName, outputType, inputColumnName ?? outputColumnName, outputKeyCount)) + internal TypeConvertingTransformer(IHostEnvironment env, string outputColumnName, DataKind outputKind, string inputColumnName = null, KeyCount outputKeyCount = null) + : this(env, new TypeConvertingEstimator.ColumnInfo(outputColumnName, outputKind, inputColumnName ?? outputColumnName, outputKeyCount)) { } @@ -221,16 +221,16 @@ private protected override void SaveModel(ModelSaveContext ctx) for (int i = 0; i < _columns.Length; i++) { - Host.Assert((InternalDataKind)(byte)_columns[i].OutputType.ToDataKind() == _columns[i].OutputType.ToDataKind()); + Host.Assert((InternalDataKind)(byte)_columns[i].OutputKind.ToDataKind() == _columns[i].OutputKind.ToDataKind()); if (_columns[i].OutputKeyCount != null) { - byte b = (byte)_columns[i].OutputType; + byte b = (byte)_columns[i].OutputKind; b |= 0x80; ctx.Writer.Write(b); - ctx.Writer.Write(_columns[i].OutputKeyCount.Count ?? _columns[i].OutputType.ToDataKind().ToMaxInt()); + ctx.Writer.Write(_columns[i].OutputKeyCount.Count ?? _columns[i].OutputKind.ToDataKind().ToMaxInt()); } else - ctx.Writer.Write((byte)_columns[i].OutputType); + ctx.Writer.Write((byte)_columns[i].OutputKind); } } @@ -401,7 +401,7 @@ public Mapper(TypeConvertingTransformer parent, DataViewSchema inputSchema) { inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].inputColumnName, out _srcCols[i]); var srcCol = inputSchema[_srcCols[i]]; - if (!CanConvertToType(Host, srcCol.Type, _parent._columns[i].OutputType.ToDataKind(), _parent._columns[i].OutputKeyCount, + if (!CanConvertToType(Host, srcCol.Type, _parent._columns[i].OutputKind.ToDataKind(), _parent._columns[i].OutputKeyCount, out PrimitiveDataViewType itemType, out _types[i])) { throw Host.ExceptParam(nameof(inputSchema), @@ -502,7 +502,7 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, string srcVariableName, var opType = "CSharp"; var node = ctx.CreateNode(opType, srcVariableName, dstVariableName, ctx.GetNodeName(opType)); node.AddAttribute("type", LoaderSignature); - node.AddAttribute("to", (byte)_parent._columns[iinfo].OutputType); + node.AddAttribute("to", (byte)_parent._columns[iinfo].OutputKind); if (_parent._columns[iinfo].OutputKeyCount != null) { var key = (KeyType)_types[iinfo].GetItemType(); @@ -521,7 +521,7 @@ public sealed class TypeConvertingEstimator : TrivialEstimator @@ -540,7 +540,7 @@ public sealed class ColumnInfo /// /// The expected kind of the converted column. /// - internal readonly ScalarType OutputType; + internal readonly DataKind OutputKind; /// /// New key count, if we work with key type. /// @@ -550,14 +550,14 @@ public sealed class ColumnInfo /// Describes how the transformer handles one column pair. /// /// Name of the column resulting from the transformation of . - /// The expected kind of the converted column. + /// The expected kind of the converted column. /// Name of column to transform. If set to , the value of the will be used as source. /// New key count, if we work with key type. - public ColumnInfo(string name, ScalarType outputType, string inputColumnName, KeyCount outputKeyCount = null) + public ColumnInfo(string name, DataKind outputKind, string inputColumnName, KeyCount outputKeyCount = null) { Name = name; InputColumnName = inputColumnName ?? name; - OutputType = outputType; + OutputKind = outputKind; OutputKeyCount = outputKeyCount; } @@ -574,7 +574,7 @@ public ColumnInfo(string name, Type type, string inputColumnName, KeyCount outpu InputColumnName = inputColumnName ?? name; if (!type.TryGetDataKind(out InternalDataKind OutputKind)) throw Contracts.ExceptUserArg(nameof(type), $"Unsupported type {type}."); - OutputType = OutputKind.ToScalarType(); + this.OutputKind = OutputKind.ToScalarType(); OutputKeyCount = outputKeyCount; } } @@ -585,11 +585,11 @@ public ColumnInfo(string name, Type type, string inputColumnName, KeyCount outpu /// Host Environment. /// Name of the column resulting from the transformation of . /// Name of the column to transform. If set to , the value of the will be used as source. - /// The expected type of the converted column. + /// The expected kind of the converted column. internal TypeConvertingEstimator(IHostEnvironment env, string outputColumnName, string inputColumnName = null, - ScalarType outputType = Defaults.DefaultOutputKind) - : this(env, new ColumnInfo(outputColumnName, outputType, inputColumnName ?? outputColumnName)) + DataKind outputKind = Defaults.DefaultOutputKind) + : this(env, new ColumnInfo(outputColumnName, outputKind, inputColumnName ?? outputColumnName)) { } @@ -613,7 +613,7 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) { if (!inputSchema.TryFindColumn(colInfo.InputColumnName, out var col)) throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.InputColumnName); - if (!TypeConvertingTransformer.GetNewType(Host, col.ItemType, colInfo.OutputType.ToDataKind(), colInfo.OutputKeyCount, out PrimitiveDataViewType newType)) + if (!TypeConvertingTransformer.GetNewType(Host, col.ItemType, colInfo.OutputKind.ToDataKind(), colInfo.OutputKeyCount, out PrimitiveDataViewType newType)) throw Host.ExceptParam(nameof(inputSchema), $"Can't convert {colInfo.InputColumnName} into {newType.ToString()}"); if (!Data.Conversion.Conversions.Instance.TryGetStandardConversion(col.ItemType, newType, out Delegate del, out bool identity)) throw Host.ExceptParam(nameof(inputSchema), $"Don't know how to convert {colInfo.InputColumnName} into {newType.ToString()}"); diff --git a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs index a4e05a89e5..b117476d70 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs @@ -490,14 +490,14 @@ private static TextLoader.Column GenerateValueColumn(IHostEnvironment env, } } - TextLoader.Column valueColumn = new TextLoader.Column(valueColumnName, ScalarType.UInt32, 1); + TextLoader.Column valueColumn = new TextLoader.Column(valueColumnName, DataKind.UInt32, 1); if (keyMax < int.MaxValue) valueColumn.KeyCount = new KeyCount(keyMax + 1); else if (keyMax < uint.MaxValue) valueColumn.KeyCount = new KeyCount(); else { - valueColumn.Type = ScalarType.UInt64.ToDataKind(); + valueColumn.Type = DataKind.UInt64.ToDataKind(); valueColumn.KeyCount = new KeyCount(); } @@ -598,8 +598,8 @@ private static IDataTransform Create(IHostEnvironment env, Options options, IDat // types unless ValueAsKeyType is specified. if (options.ValuesAsKeyType) { - keyColumn = new TextLoader.Column(keyColumnName, ScalarType.String, 0); - valueColumn = new TextLoader.Column(valueColumnName, ScalarType.String, 1); + keyColumn = new TextLoader.Column(keyColumnName, DataKind.String, 0); + valueColumn = new TextLoader.Column(valueColumnName, DataKind.String, 1); var txtArgs = new TextLoader.Options() { Columns = new TextLoader.Column[] @@ -621,8 +621,8 @@ private static IDataTransform Create(IHostEnvironment env, Options options, IDat } else { - keyColumn = new TextLoader.Column(keyColumnName, ScalarType.String, 0); - valueColumn = new TextLoader.Column(valueColumnName, ScalarType.Single, 1); + keyColumn = new TextLoader.Column(keyColumnName, DataKind.String, 0); + valueColumn = new TextLoader.Column(valueColumnName, DataKind.Single, 1); } loader = TextLoader.Create( diff --git a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs index eec170daaa..aaba6cdebf 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs @@ -440,7 +440,7 @@ internal static IDataView GetKeyDataViewOrNull(IHostEnvironment env, IChannel ch nameof(Options.TermsColumn), src); } keyData = new TextLoader(env, - columns: new[] { new TextLoader.Column("Term", ScalarType.String, 0) }, + columns: new[] { new TextLoader.Column("Term", DataKind.String, 0) }, dataSample: fileSource) .Read(fileSource); src = "Term"; diff --git a/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs b/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs index 917890b530..bf0873251a 100644 --- a/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs +++ b/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs @@ -185,7 +185,7 @@ private static IDataView ApplyConvert(List c // This happens when the training is done on an XDF and the scoring is done on a data frame. var colName = GetUniqueName(); concatNames.Add(new KeyValuePair(col.Name, colName)); - Utils.Add(ref cvt, new TypeConvertingEstimator.ColumnInfo(colName, ScalarType.Single, col.Name)); + Utils.Add(ref cvt, new TypeConvertingEstimator.ColumnInfo(colName, DataKind.Single, col.Name)); continue; } } @@ -300,7 +300,7 @@ public static CommonOutputs.TransformOutput PrepareRegressionLabel(IHostEnvironm return new CommonOutputs.TransformOutput { Model = new TransformModelImpl(env, nop, input.Data), OutputData = nop }; } - var xf = new TypeConvertingTransformer(host, new TypeConvertingEstimator.ColumnInfo(input.LabelColumn, ScalarType.Single, input.LabelColumn)).Transform(input.Data); + var xf = new TypeConvertingTransformer(host, new TypeConvertingEstimator.ColumnInfo(input.LabelColumn, DataKind.Single, input.LabelColumn)).Transform(input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModelImpl(env, xf, input.Data), OutputData = xf }; } } diff --git a/src/Microsoft.ML.FastTree/FastTree.cs b/src/Microsoft.ML.FastTree/FastTree.cs index f6d4b16208..e49916622a 100644 --- a/src/Microsoft.ML.FastTree/FastTree.cs +++ b/src/Microsoft.ML.FastTree/FastTree.cs @@ -1375,7 +1375,7 @@ private Dataset Construct(RoleMappedData examples, ref int numExamples, int maxB } // Convert the group column, if one exists. if (examples.Schema.Group?.Name is string groupName) - data = new TypeConvertingTransformer(Host, new TypeConvertingEstimator.ColumnInfo(groupName, ScalarType.UInt64, groupName)).Transform(data); + data = new TypeConvertingTransformer(Host, new TypeConvertingEstimator.ColumnInfo(groupName, DataKind.UInt64, groupName)).Transform(data); // Since we've passed it through a few transforms, reconstitute the mapping on the // newly transformed data. diff --git a/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs b/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs index 0dd47e9f96..79ce680470 100644 --- a/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs +++ b/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs @@ -33,18 +33,18 @@ public static IDataView LoadHousingRegressionDataset(MLContext mlContext) var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("MedianHomeValue", ScalarType.Single, 0), - new TextLoader.Column("CrimesPerCapita", ScalarType.Single, 1), - new TextLoader.Column("PercentResidental", ScalarType.Single, 2), - new TextLoader.Column("PercentNonRetail", ScalarType.Single, 3), - new TextLoader.Column("CharlesRiver", ScalarType.Single, 4), - new TextLoader.Column("NitricOxides", ScalarType.Single, 5), - new TextLoader.Column("RoomsPerDwelling", ScalarType.Single, 6), - new TextLoader.Column("PercentPre40s", ScalarType.Single, 7), - new TextLoader.Column("EmploymentDistance", ScalarType.Single, 8), - new TextLoader.Column("HighwayDistance", ScalarType.Single, 9), - new TextLoader.Column("TaxRate", ScalarType.Single, 10), - new TextLoader.Column("TeacherRatio", ScalarType.Single, 11), + new TextLoader.Column("MedianHomeValue", DataKind.Single, 0), + new TextLoader.Column("CrimesPerCapita", DataKind.Single, 1), + new TextLoader.Column("PercentResidental", DataKind.Single, 2), + new TextLoader.Column("PercentNonRetail", DataKind.Single, 3), + new TextLoader.Column("CharlesRiver", DataKind.Single, 4), + new TextLoader.Column("NitricOxides", DataKind.Single, 5), + new TextLoader.Column("RoomsPerDwelling", DataKind.Single, 6), + new TextLoader.Column("PercentPre40s", DataKind.Single, 7), + new TextLoader.Column("EmploymentDistance", DataKind.Single, 8), + new TextLoader.Column("HighwayDistance", DataKind.Single, 9), + new TextLoader.Column("TaxRate", DataKind.Single, 10), + new TextLoader.Column("TeacherRatio", DataKind.Single, 11), }, hasHeader: true ); @@ -103,21 +103,21 @@ public static IDataView LoadFeaturizedAdultDataset(MLContext mlContext) var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("age", ScalarType.Single, 0), - new TextLoader.Column("workclass", ScalarType.String, 1), - new TextLoader.Column("fnlwgt", ScalarType.Single, 2), - new TextLoader.Column("education", ScalarType.String, 3), - new TextLoader.Column("education-num", ScalarType.Single, 4), - new TextLoader.Column("marital-status", ScalarType.String, 5), - new TextLoader.Column("occupation", ScalarType.String, 6), - new TextLoader.Column("relationship", ScalarType.String, 7), - new TextLoader.Column("ethnicity", ScalarType.String, 8), - new TextLoader.Column("sex", ScalarType.String, 9), - new TextLoader.Column("capital-gain", ScalarType.Single, 10), - new TextLoader.Column("capital-loss", ScalarType.Single, 11), - new TextLoader.Column("hours-per-week", ScalarType.Single, 12), - new TextLoader.Column("native-country", ScalarType.Single, 13), - new TextLoader.Column("IsOver50K", ScalarType.Boolean, 14), + new TextLoader.Column("age", DataKind.Single, 0), + new TextLoader.Column("workclass", DataKind.String, 1), + new TextLoader.Column("fnlwgt", DataKind.Single, 2), + new TextLoader.Column("education", DataKind.String, 3), + new TextLoader.Column("education-num", DataKind.Single, 4), + new TextLoader.Column("marital-status", DataKind.String, 5), + new TextLoader.Column("occupation", DataKind.String, 6), + new TextLoader.Column("relationship", DataKind.String, 7), + new TextLoader.Column("ethnicity", DataKind.String, 8), + new TextLoader.Column("sex", DataKind.String, 9), + new TextLoader.Column("capital-gain", DataKind.Single, 10), + new TextLoader.Column("capital-loss", DataKind.Single, 11), + new TextLoader.Column("hours-per-week", DataKind.Single, 12), + new TextLoader.Column("native-country", DataKind.Single, 13), + new TextLoader.Column("IsOver50K", DataKind.Boolean, 14), }, separatorChar: ',', hasHeader: true diff --git a/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs b/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs index f7e8935c33..9c5015722f 100644 --- a/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs +++ b/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs @@ -741,7 +741,7 @@ private IDataLoader GetLoaderForStopwords(IChannel ch, string dataFile, Host, columns: new[] { - new TextLoader.Column(stopwordsCol, ScalarType.String, 0) + new TextLoader.Column(stopwordsCol, DataKind.String, 0) }, dataSample: fileSource).Read(fileSource) as IDataLoader; } diff --git a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs b/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs index 151a30db8a..1dbc74c9d0 100644 --- a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs +++ b/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs @@ -23,12 +23,12 @@ public CalibratedModelParametersBase messages.Add(e.Message); // create a dummy text reader to trigger log messages - env.Data.CreateTextLoader(new TextLoader.Options { Columns = new[] { new TextLoader.Column("TestColumn", ScalarType.Single, 0) } }); + env.Data.CreateTextLoader(new TextLoader.Options { Columns = new[] { new TextLoader.Column("TestColumn", DataKind.Single, 0) } }); Assert.True(messages.Count > 0); } diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs b/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs index 2a1cb630b1..223320cb0a 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs +++ b/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML.Functional.Tests.Datasets { /// - /// A class containing one property per . + /// A class containing one property per . /// /// /// This class has annotations for automatic deserialization from a file, and contains helper methods @@ -79,22 +79,22 @@ public static TextLoader GetTextLoader(MLContext mlContext, char separator) { return mlContext.Data.CreateTextLoader( new[] { - new TextLoader.Column("Label", ScalarType.Boolean, 0), - new TextLoader.Column("I1", ScalarType.SByte, 1), - new TextLoader.Column("U1", ScalarType.Byte, 2), - new TextLoader.Column("I2", ScalarType.Int16, 3), - new TextLoader.Column("U2", ScalarType.UInt16, 4), - new TextLoader.Column("I4", ScalarType.Int32, 5), - new TextLoader.Column("U4", ScalarType.UInt32, 6), - new TextLoader.Column("I8", ScalarType.Int64, 7), - new TextLoader.Column("U8", ScalarType.UInt64, 8), - new TextLoader.Column("R4", ScalarType.Single, 9), - new TextLoader.Column("R8", ScalarType.Double, 10), - new TextLoader.Column("Tx", ScalarType.String, 11), - new TextLoader.Column("Ts", ScalarType.TimeSpan, 12), - new TextLoader.Column("Dt", ScalarType.DateTime, 13), - new TextLoader.Column("Dz", ScalarType.DateTimeOffset, 14), - new TextLoader.Column("Features", ScalarType.Single, 15, 15 + _numFeatures - 1), + new TextLoader.Column("Label", DataKind.Boolean, 0), + new TextLoader.Column("I1", DataKind.SByte, 1), + new TextLoader.Column("U1", DataKind.Byte, 2), + new TextLoader.Column("I2", DataKind.Int16, 3), + new TextLoader.Column("U2", DataKind.UInt16, 4), + new TextLoader.Column("I4", DataKind.Int32, 5), + new TextLoader.Column("U4", DataKind.UInt32, 6), + new TextLoader.Column("I8", DataKind.Int64, 7), + new TextLoader.Column("U8", DataKind.UInt64, 8), + new TextLoader.Column("R4", DataKind.Single, 9), + new TextLoader.Column("R8", DataKind.Double, 10), + new TextLoader.Column("Tx", DataKind.String, 11), + new TextLoader.Column("Ts", DataKind.TimeSpan, 12), + new TextLoader.Column("Dt", DataKind.DateTime, 13), + new TextLoader.Column("Dz", DataKind.DateTimeOffset, 14), + new TextLoader.Column("Features", DataKind.Single, 15, 15 + _numFeatures - 1), }, separatorChar: separator, hasHeader: true, diff --git a/test/Microsoft.ML.Predictor.Tests/TestIniModels.cs b/test/Microsoft.ML.Predictor.Tests/TestIniModels.cs index ed3c493a1b..ce4579d629 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestIniModels.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestIniModels.cs @@ -521,8 +521,8 @@ public void TestGamRegressionIni() HasHeader = false, Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("Features", ScalarType.Single, 1, 9) + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("Features", DataKind.Single, 1, 9) } }).Read(GetDataPath("breast-cancer.txt")); @@ -560,8 +560,8 @@ public void TestGamBinaryClassificationIni() HasHeader = false, Columns = new[] { - new TextLoader.Column("Label", ScalarType.Boolean, 0), - new TextLoader.Column("Features", ScalarType.Single, 1, 9) + new TextLoader.Column("Label", DataKind.Boolean, 0), + new TextLoader.Column("Features", DataKind.Single, 1, 9) } }).Read(GetDataPath("breast-cancer.txt")); diff --git a/test/Microsoft.ML.TestFramework/Datasets.cs b/test/Microsoft.ML.TestFramework/Datasets.cs index 92935d745e..d279332cad 100644 --- a/test/Microsoft.ML.TestFramework/Datasets.cs +++ b/test/Microsoft.ML.TestFramework/Datasets.cs @@ -166,18 +166,18 @@ public static class TestDatasets GetLoaderColumns = () => { return new[] { - new TextLoader.Column("MedianHomeValue", ScalarType.Single, 0), - new TextLoader.Column("CrimesPerCapita", ScalarType.Single, 1), - new TextLoader.Column("PercentResidental", ScalarType.Single, 2), - new TextLoader.Column("PercentNonRetail", ScalarType.Single, 3), - new TextLoader.Column("CharlesRiver", ScalarType.Single, 4), - new TextLoader.Column("NitricOxides", ScalarType.Single, 5), - new TextLoader.Column("RoomsPerDwelling", ScalarType.Single, 6), - new TextLoader.Column("PercentPre40s", ScalarType.Single, 7), - new TextLoader.Column("EmploymentDistance", ScalarType.Single, 8), - new TextLoader.Column("HighwayDistance", ScalarType.Single, 9), - new TextLoader.Column("TaxRate", ScalarType.Single, 10), - new TextLoader.Column("TeacherRatio", ScalarType.Single, 11), + new TextLoader.Column("MedianHomeValue", DataKind.Single, 0), + new TextLoader.Column("CrimesPerCapita", DataKind.Single, 1), + new TextLoader.Column("PercentResidental", DataKind.Single, 2), + new TextLoader.Column("PercentNonRetail", DataKind.Single, 3), + new TextLoader.Column("CharlesRiver", DataKind.Single, 4), + new TextLoader.Column("NitricOxides", DataKind.Single, 5), + new TextLoader.Column("RoomsPerDwelling", DataKind.Single, 6), + new TextLoader.Column("PercentPre40s", DataKind.Single, 7), + new TextLoader.Column("EmploymentDistance", DataKind.Single, 8), + new TextLoader.Column("HighwayDistance", DataKind.Single, 9), + new TextLoader.Column("TaxRate", DataKind.Single, 10), + new TextLoader.Column("TeacherRatio", DataKind.Single, 11), }; } }; @@ -216,8 +216,8 @@ public static class TestDatasets { return new[] { - new TextLoader.Column("Label", ScalarType.Boolean, 0), - new TextLoader.Column("SentimentText", ScalarType.String, 1) + new TextLoader.Column("Label", DataKind.Boolean, 0), + new TextLoader.Column("SentimentText", DataKind.String, 1) }; } }; @@ -404,11 +404,11 @@ public static class TestDatasets { return new[] { - new TextLoader.Column("SepalLength", ScalarType.Single, 0), - new TextLoader.Column("SepalWidth", ScalarType.Single, 1), - new TextLoader.Column("PetalLength", ScalarType.Single, 2), - new TextLoader.Column("PetalWidth",ScalarType.Single, 3), - new TextLoader.Column("Label", ScalarType.String, 4) + new TextLoader.Column("SepalLength", DataKind.Single, 0), + new TextLoader.Column("SepalWidth", DataKind.Single, 1), + new TextLoader.Column("PetalLength", DataKind.Single, 2), + new TextLoader.Column("PetalWidth",DataKind.Single, 3), + new TextLoader.Column("Label", DataKind.String, 4) }; } }; diff --git a/test/Microsoft.ML.Tests/AnomalyDetectionTests.cs b/test/Microsoft.ML.Tests/AnomalyDetectionTests.cs index a1cabb3739..03fbafbf7f 100644 --- a/test/Microsoft.ML.Tests/AnomalyDetectionTests.cs +++ b/test/Microsoft.ML.Tests/AnomalyDetectionTests.cs @@ -30,8 +30,8 @@ public void RandomizedPcaTrainerBaselineTest() Separator = "\t", Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column(featureColumn, ScalarType.Single, new [] { new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column(featureColumn, DataKind.Single, new [] { new TextLoader.Range(1, 784) }) }, AllowSparse = true }); diff --git a/test/Microsoft.ML.Tests/ImagesTests.cs b/test/Microsoft.ML.Tests/ImagesTests.cs index 96664dad5a..976e7790d5 100644 --- a/test/Microsoft.ML.Tests/ImagesTests.cs +++ b/test/Microsoft.ML.Tests/ImagesTests.cs @@ -33,15 +33,15 @@ public void TestEstimatorChain() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var invalidData = TextLoader.Create(env, new TextLoader.Options() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.Single, 0), + new TextLoader.Column("ImagePath", DataKind.Single, 0), } }, new MultiFileSource(dataFile)); @@ -64,8 +64,8 @@ public void TestEstimatorSaveLoad() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); @@ -103,8 +103,8 @@ public void TestSaveImages() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -142,8 +142,8 @@ public void TestGreyscaleTransformImages() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -193,8 +193,8 @@ public void TestBackAndForthConversionWithAlphaInterleave() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -253,8 +253,8 @@ public void TestBackAndForthConversionWithoutAlphaInterleave() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -313,8 +313,8 @@ public void TestBackAndForthConversionWithDifferentOrder() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -375,8 +375,8 @@ public void TestBackAndForthConversionWithAlphaNoInterleave() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -435,8 +435,8 @@ public void TestBackAndForthConversionWithoutAlphaNoInterleave() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -495,8 +495,8 @@ public void TestBackAndForthConversionWithAlphaInterleaveNoOffset() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -556,8 +556,8 @@ public void TestBackAndForthConversionWithoutAlphaInterleaveNoOffset() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -616,8 +616,8 @@ public void TestBackAndForthConversionWithAlphaNoInterleaveNoOffset() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -734,7 +734,7 @@ public void ImageResizerTransformResizingModeFill() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0) + new TextLoader.Column("ImagePath", DataKind.String, 0) } }, new MultiFileSource(dataFile)); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs index e1172613e9..a8b73ed447 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs @@ -279,8 +279,8 @@ private void TextFeaturizationOn(string dataPath) // Define the reader: specify the data columns and where to find them in the text file. var reader = mlContext.Data.CreateTextLoader(new[] { - new TextLoader.Column("IsToxic", ScalarType.Boolean, 0), - new TextLoader.Column("Message", ScalarType.String, 1), + new TextLoader.Column("IsToxic", DataKind.Boolean, 0), + new TextLoader.Column("Message", DataKind.String, 1), }, hasHeader: true ); @@ -346,13 +346,13 @@ private void CategoricalFeaturizationOn(params string[] dataPath) // Define the reader: specify the data columns and where to find them in the text file. var reader = mlContext.Data.CreateTextLoader(new[] { - new TextLoader.Column("Label", ScalarType.Boolean, 0), + new TextLoader.Column("Label", DataKind.Boolean, 0), // We will load all the categorical features into one vector column of size 8. - new TextLoader.Column("CategoricalFeatures", ScalarType.String, 1, 8), + new TextLoader.Column("CategoricalFeatures", DataKind.String, 1, 8), // Similarly, load all numerical features into one vector of size 6. - new TextLoader.Column("NumericalFeatures", ScalarType.Single, 9, 14), + new TextLoader.Column("NumericalFeatures", DataKind.Single, 9, 14), // Let's also separately load the 'Workclass' column. - new TextLoader.Column("Workclass", ScalarType.String, 1), + new TextLoader.Column("Workclass", DataKind.String, 1), }, hasHeader: true ); @@ -479,8 +479,8 @@ public void CustomTransformer() var mlContext = new MLContext(); var data = mlContext.Data.ReadFromTextFile(GetDataPath("adult.tiny.with-schema.txt"), new[] { - new TextLoader.Column("Income", ScalarType.Single, 10), - new TextLoader.Column("Features", ScalarType.Single, 12, 14) + new TextLoader.Column("Income", DataKind.Single, 10), + new TextLoader.Column("Features", DataKind.Single, 12, 14) }, hasHeader: true); PrepareData(mlContext, data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs b/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs index 179178d81b..498d0a053c 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs @@ -298,10 +298,10 @@ public void TestTrainTestSplit() var dataPath = GetDataPath("adult.tiny.with-schema.txt"); // Create the reader: define the data columns and where to find them in the text file. var input = mlContext.Data.ReadFromTextFile(dataPath, new[] { - new TextLoader.Column("Label", ScalarType.Boolean, 0), - new TextLoader.Column("Workclass", ScalarType.String, 1), - new TextLoader.Column("Education", ScalarType.String,2), - new TextLoader.Column("Age", ScalarType.Single,9) + new TextLoader.Column("Label", DataKind.Boolean, 0), + new TextLoader.Column("Workclass", DataKind.String, 1), + new TextLoader.Column("Education", DataKind.String,2), + new TextLoader.Column("Age", DataKind.Single,9) }, hasHeader: true); // this function will accept dataview and return content of "Workclass" column as List of strings. Func> getWorkclass = (IDataView view) => diff --git a/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationTests.cs b/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationTests.cs index 0b5745ea09..76c28195e7 100644 --- a/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationTests.cs @@ -20,11 +20,11 @@ public void TrainAndPredictIrisModelTest() var reader = mlContext.Data.CreateTextLoader(columns: new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("SepalLength", ScalarType.Single, 1), - new TextLoader.Column("SepalWidth", ScalarType.Single, 2), - new TextLoader.Column("PetalLength", ScalarType.Single, 3), - new TextLoader.Column("PetalWidth", ScalarType.Single, 4) + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("SepalLength", DataKind.Single, 1), + new TextLoader.Column("SepalWidth", DataKind.Single, 2), + new TextLoader.Column("PetalLength", DataKind.Single, 3), + new TextLoader.Column("PetalWidth", DataKind.Single, 4) } ); diff --git a/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationWithStringLabelTests.cs b/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationWithStringLabelTests.cs index a1c6a4e948..bdfe1b56a4 100644 --- a/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationWithStringLabelTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/IrisPlantClassificationWithStringLabelTests.cs @@ -17,11 +17,11 @@ public void TrainAndPredictIrisModelWithStringLabelTest() var reader = mlContext.Data.CreateTextLoader(columns: new[] { - new TextLoader.Column("SepalLength", ScalarType.Single, 0), - new TextLoader.Column("SepalWidth", ScalarType.Single, 1), - new TextLoader.Column("PetalLength", ScalarType.Single, 2), - new TextLoader.Column("PetalWidth", ScalarType.Single, 3), - new TextLoader.Column("IrisPlantType", ScalarType.String, 4), + new TextLoader.Column("SepalLength", DataKind.Single, 0), + new TextLoader.Column("SepalWidth", DataKind.Single, 1), + new TextLoader.Column("PetalLength", DataKind.Single, 2), + new TextLoader.Column("PetalWidth", DataKind.Single, 3), + new TextLoader.Column("IrisPlantType", DataKind.String, 4), }, separatorChar: ',' ); diff --git a/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs b/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs index 9480cae00b..0a133252b7 100644 --- a/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs +++ b/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs @@ -23,8 +23,8 @@ public void OvaLogisticRegression() { Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("Features", DataKind.Single, new [] { new TextLoader.Range(1, 4) }), } }); @@ -55,8 +55,8 @@ public void OvaAveragedPerceptron() { Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("Features", DataKind.Single, new [] { new TextLoader.Range(1, 4) }), } }); @@ -88,8 +88,8 @@ public void OvaFastTree() { Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("Features", DataKind.Single, new [] { new TextLoader.Range(1, 4) }), } }); @@ -121,8 +121,8 @@ public void OvaLinearSvm() { Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("Features", DataKind.Single, new [] { new TextLoader.Range(1, 4) }), } }); diff --git a/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs b/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs index 57139bd2ab..a2116b5bb3 100644 --- a/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs @@ -28,8 +28,8 @@ public void TensorFlowTransforCifarEndToEndTest() { Columns = new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Label", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Label", DataKind.String, 1), } }, new MultiFileSource(dataFile)); diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs index 4e2949459e..d2f77039e8 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs @@ -18,11 +18,11 @@ public void TrainAndPredictIrisModelUsingDirectInstantiationTest() var reader = mlContext.Data.CreateTextLoader(columns: new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("SepalLength", ScalarType.Single, 1), - new TextLoader.Column("SepalWidth", ScalarType.Single, 2), - new TextLoader.Column("PetalLength", ScalarType.Single, 3), - new TextLoader.Column("PetalWidth", ScalarType.Single, 4) + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("SepalLength", DataKind.Single, 1), + new TextLoader.Column("SepalWidth", DataKind.Single, 2), + new TextLoader.Column("PetalLength", DataKind.Single, 3), + new TextLoader.Column("PetalWidth", DataKind.Single, 4) } ); diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs index cfe9956757..1f02337466 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs @@ -491,8 +491,8 @@ public void TensorFlowTransformMNISTConvTest() var reader = mlContext.Data.CreateTextLoader( columns: new[] { - new TextLoader.Column("Label", ScalarType.UInt32 , new [] { new TextLoader.Range(0) }, new KeyCount(10)), - new TextLoader.Column("Placeholder", ScalarType.Single, new []{ new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", DataKind.UInt32 , new [] { new TextLoader.Range(0) }, new KeyCount(10)), + new TextLoader.Column("Placeholder", DataKind.Single, new []{ new TextLoader.Range(1, 784) }) }, hasHeader: true, @@ -533,12 +533,12 @@ public void TensorFlowTransformMNISTLRTrainingTest() { var mlContext = new MLContext(seed: 1, conc: 1); var reader = mlContext.Data.CreateTextLoader(columns: new[] - { - new TextLoader.Column("Label", ScalarType.Int64, 0), - new TextLoader.Column("Placeholder", ScalarType.Single, new []{ new TextLoader.Range(1, 784) }) - }, + { + new TextLoader.Column("Label", DataKind.Int64, 0), + new TextLoader.Column("Placeholder", DataKind.Single, new []{ new TextLoader.Range(1, 784) }) + }, allowSparse: true - ); + ); var trainData = reader.Read(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); var testData = reader.Read(GetDataPath(TestDatasets.mnistOneClass.testFilename)); @@ -628,9 +628,9 @@ private void ExecuteTFTransformMNISTConvTrainingTest(bool shuffle, int? shuffleS var reader = mlContext.Data.CreateTextLoader(new[] { - new TextLoader.Column("Label", ScalarType.UInt32, new []{ new TextLoader.Range(0) }, new KeyCount(10)), - new TextLoader.Column("TfLabel", ScalarType.Int64, 0), - new TextLoader.Column("Placeholder", ScalarType.Single, new []{ new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", DataKind.UInt32, new []{ new TextLoader.Range(0) }, new KeyCount(10)), + new TextLoader.Column("TfLabel", DataKind.Int64, 0), + new TextLoader.Column("Placeholder", DataKind.Single, new []{ new TextLoader.Range(1, 784) }) }, allowSparse: true ); @@ -723,8 +723,8 @@ public void TensorFlowTransformMNISTConvSavedModelTest() var mlContext = new MLContext(seed: 1, conc: 1); var reader = mlContext.Data.CreateTextLoader(columns: new[] { - new TextLoader.Column("Label", ScalarType.UInt32 , new [] { new TextLoader.Range(0) }, new KeyCount(10)), - new TextLoader.Column("Placeholder", ScalarType.Single, new []{ new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", DataKind.UInt32 , new [] { new TextLoader.Range(0) }, new KeyCount(10)), + new TextLoader.Column("Placeholder", DataKind.Single, new []{ new TextLoader.Range(1, 784) }) }, hasHeader: true, allowSparse: true @@ -855,8 +855,8 @@ public void TensorFlowTransformCifar() var data = mlContext.Data.ReadFromTextFile(dataFile, columns: new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } ); @@ -899,8 +899,8 @@ public void TensorFlowTransformCifarSavedModel() var imageFolder = Path.GetDirectoryName(dataFile); var data = mlContext.Data.ReadFromTextFile(dataFile, columns: new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } ); var images = mlContext.Transforms.LoadImages(imageFolder, ("ImageReal", "ImagePath")).Fit(data).Transform(data); @@ -951,8 +951,8 @@ public void TensorFlowTransformCifarInvalidShape() var data = mlContext.Data.ReadFromTextFile(dataFile, columns: new[] { - new TextLoader.Column("ImagePath", ScalarType.String, 0), - new TextLoader.Column("Name", ScalarType.String, 1), + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), } ); var images = new ImageLoadingTransformer(mlContext, imageFolder, ("ImageReal", "ImagePath")).Transform(data); @@ -993,8 +993,8 @@ public void TensorFlowSentimentClassificationTest() var lookupMap = mlContext.Data.ReadFromTextFile(@"sentiment_model/imdb_word_index.csv", columns: new[] { - new TextLoader.Column("Words", ScalarType.String, 0), - new TextLoader.Column("Ids", ScalarType.Int32, 1), + new TextLoader.Column("Words", DataKind.String, 0), + new TextLoader.Column("Ids", DataKind.Int32, 1), }, separatorChar: ',' ); diff --git a/test/Microsoft.ML.Tests/TermEstimatorTests.cs b/test/Microsoft.ML.Tests/TermEstimatorTests.cs index b0dfab99cd..757b073b07 100644 --- a/test/Microsoft.ML.Tests/TermEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/TermEstimatorTests.cs @@ -57,13 +57,13 @@ void TestDifferentTypes() var loader = new TextLoader(ML, new TextLoader.Options { Columns = new[]{ - new TextLoader.Column("float1", ScalarType.Single, 9), - new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), - new TextLoader.Column("double1", ScalarType.Double, 9), - new TextLoader.Column("double4", ScalarType.Double, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), - new TextLoader.Column("int1", ScalarType.Int32, 9), - new TextLoader.Column("text1", ScalarType.String, 1), - new TextLoader.Column("text2", ScalarType.String, new[]{new TextLoader.Range(1), new TextLoader.Range(2)}), + new TextLoader.Column("float1", DataKind.Single, 9), + new TextLoader.Column("float4", DataKind.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), + new TextLoader.Column("double1", DataKind.Double, 9), + new TextLoader.Column("double4", DataKind.Double, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), + new TextLoader.Column("int1", DataKind.Int32, 9), + new TextLoader.Column("text1", DataKind.String, 1), + new TextLoader.Column("text2", DataKind.String, new[]{new TextLoader.Range(1), new TextLoader.Range(2)}), }, Separator = "\t", HasHeader = true diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs b/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs index 4dce1bdc74..c93c4315cb 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs @@ -69,11 +69,11 @@ private TextLoader.Options GetFafmBCLoaderArgs() HasHeader = false, Columns = new[] { - new TextLoader.Column("Feature1", ScalarType.Single, new [] { new TextLoader.Range(1, 2) }), - new TextLoader.Column("Feature2", ScalarType.Single, new [] { new TextLoader.Range(3, 4) }), - new TextLoader.Column("Feature3", ScalarType.Single, new [] { new TextLoader.Range(5, 6) }), - new TextLoader.Column("Feature4", ScalarType.Single, new [] { new TextLoader.Range(7, 9) }), - new TextLoader.Column("Label", ScalarType.Boolean, 0) + new TextLoader.Column("Feature1", DataKind.Single, new [] { new TextLoader.Range(1, 2) }), + new TextLoader.Column("Feature2", DataKind.Single, new [] { new TextLoader.Range(3, 4) }), + new TextLoader.Column("Feature3", DataKind.Single, new [] { new TextLoader.Range(5, 6) }), + new TextLoader.Column("Feature4", DataKind.Single, new [] { new TextLoader.Range(7, 9) }), + new TextLoader.Column("Label", DataKind.Boolean, 0) } }; } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs index b7f457c0f2..06dcec0a1a 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs @@ -151,9 +151,9 @@ private TextLoader.Options GetLoaderArgs(string labelColumnName, string matrixCo HasHeader = true, Columns = new[] { - new TextLoader.Column(labelColumnName, ScalarType.Single, new [] { new TextLoader.Range(0) }), - new TextLoader.Column(matrixColumnIndexColumnName, ScalarType.UInt32, new [] { new TextLoader.Range(1) }, new KeyCount(20)), - new TextLoader.Column(matrixRowIndexColumnName, ScalarType.UInt32, new [] { new TextLoader.Range(2) }, new KeyCount(40)), + new TextLoader.Column(labelColumnName, DataKind.Single, new [] { new TextLoader.Range(0) }), + new TextLoader.Column(matrixColumnIndexColumnName, DataKind.UInt32, new [] { new TextLoader.Range(1) }, new KeyCount(20)), + new TextLoader.Column(matrixRowIndexColumnName, DataKind.UInt32, new [] { new TextLoader.Range(2) }, new KeyCount(40)), } }; } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/PriorRandomTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/PriorRandomTests.cs index c2ff4b1e48..c52c4ac8f9 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/PriorRandomTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/PriorRandomTests.cs @@ -19,10 +19,10 @@ private IDataView GetBreastCancerDataviewWithTextColumns() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("F1", ScalarType.String, 1), - new TextLoader.Column("F2", ScalarType.Int32, 2), - new TextLoader.Column("Rest", ScalarType.Single, new [] { new TextLoader.Range(3, 9) }) + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("F1", DataKind.String, 1), + new TextLoader.Column("F2", DataKind.Int32, 2), + new TextLoader.Column("Rest", DataKind.Single, new [] { new TextLoader.Range(3, 9) }) } }).Read(GetDataPath(TestDatasets.breastCancer.trainFilename)); } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs index eb6fe11d2e..a76e736fca 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs @@ -34,7 +34,7 @@ public void PCATrainerEstimator() Separator = "\t", Columns = new[] { - new TextLoader.Column(featureColumn, ScalarType.Single, new [] { new TextLoader.Range(1, 784) }) + new TextLoader.Column(featureColumn, DataKind.Single, new [] { new TextLoader.Range(1, 784) }) }, AllowSparse = true }); @@ -63,8 +63,8 @@ public void KMeansEstimator() Separator = "\t", Columns = new[] { - new TextLoader.Column(featureColumn, ScalarType.Single, new [] { new TextLoader.Range(1, 784) }), - new TextLoader.Column(weights, ScalarType.Single, 0) + new TextLoader.Column(featureColumn, DataKind.Single, new [] { new TextLoader.Range(1, 784) }), + new TextLoader.Column(weights, DataKind.Single, 0), }, AllowSparse = true }); @@ -168,8 +168,8 @@ public void TestEstimatorMultiClassNaiveBayesTrainer() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", ScalarType.Boolean, 0), - new TextLoader.Column("SentimentText", ScalarType.String, 1) + new TextLoader.Column("Label", DataKind.Boolean, 0), + new TextLoader.Column("SentimentText", DataKind.String, 1) } }).Read(GetDataPath(TestDatasets.Sentiment.trainFilename)); @@ -188,9 +188,9 @@ public void TestEstimatorMultiClassNaiveBayesTrainer() Separator = "\t", Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("Workclass", ScalarType.String, 1), - new TextLoader.Column("NumericFeatures", ScalarType.Single, new [] { new TextLoader.Range(9, 14) }) + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("Workclass", DataKind.String, 1), + new TextLoader.Column("NumericFeatures", DataKind.Single, new [] { new TextLoader.Range(9, 14) }) } }).Read(GetDataPath(TestDatasets.adultRanking.trainFilename)); @@ -211,8 +211,8 @@ private IDataView GetRegressionPipeline() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 11), - new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(0, 10) } ) + new TextLoader.Column("Label", DataKind.Single, 11), + new TextLoader.Column("Features", DataKind.Single, new [] { new TextLoader.Range(0, 10) } ) } }).Read(GetDataPath(TestDatasets.generatedRegressionDatasetmacro.trainFilename)); } @@ -225,8 +225,8 @@ private TextLoader.Options GetIrisLoaderArgs() HasHeader = true, Columns = new[] { - new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(0, 3) }), - new TextLoader.Column("Label", ScalarType.String, 4) + new TextLoader.Column("Features", DataKind.Single, new [] { new TextLoader.Range(0, 3) }), + new TextLoader.Column("Label", DataKind.String, 4) } }; } @@ -238,8 +238,8 @@ private TextLoader.Options GetIrisLoaderArgs() Separator = "comma", Columns = new[] { - new TextLoader.Column("Features", ScalarType.Single, new [] { new TextLoader.Range(0, 3) }), - new TextLoader.Column("Label", ScalarType.String, 4) + new TextLoader.Column("Features", DataKind.Single, new [] { new TextLoader.Range(0, 3) }), + new TextLoader.Column("Label", DataKind.String, 4) } }).Read(GetDataPath(IrisDataPath)); diff --git a/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs b/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs index 8eadf99f3f..ceaefbc8d1 100644 --- a/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs @@ -27,10 +27,10 @@ void TestConcat() var loader = new TextLoader(ML, new TextLoader.Options { Columns = new[]{ - new TextLoader.Column("float1", ScalarType.Single, 9), - new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), - new TextLoader.Column("float6", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, 14) }), - new TextLoader.Column("vfloat", ScalarType.Single, new[]{new TextLoader.Range(14, null) { AutoEnd = false, VariableEnd = true } }) + new TextLoader.Column("float1", DataKind.Single, 9), + new TextLoader.Column("float4", DataKind.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), + new TextLoader.Column("float6", DataKind.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, 14) }), + new TextLoader.Column("vfloat", DataKind.Single, new[]{new TextLoader.Range(14, null) { AutoEnd = false, VariableEnd = true } }) }, Separator = "\t", HasHeader = true @@ -85,9 +85,9 @@ public void ConcatWithAliases() var loader = new TextLoader(ML, new TextLoader.Options { Columns = new[]{ - new TextLoader.Column("float1", ScalarType.Single, 9), - new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), - new TextLoader.Column("vfloat", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, null) { AutoEnd = false, VariableEnd = true } }) + new TextLoader.Column("float1", DataKind.Single, 9), + new TextLoader.Column("float4", DataKind.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }), + new TextLoader.Column("vfloat", DataKind.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, null) { AutoEnd = false, VariableEnd = true } }) }, Separator = "\t", HasHeader = true diff --git a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs index 71a38d7a8e..67f74aea44 100644 --- a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs @@ -75,8 +75,8 @@ public void TestConvertWorkout() var data = new[] { new TestClass() { A = 1, B = new int[2] { 1,4 } }, new TestClass() { A = 2, B = new int[2] { 3,4 } }}; var dataView = ML.Data.ReadFromEnumerable(data); - var pipe = ML.Transforms.Conversion.ConvertType(columns: new[] {new TypeConvertingEstimator.ColumnInfo("ConvA", ScalarType.Single, "A"), - new TypeConvertingEstimator.ColumnInfo("ConvB", ScalarType.Single, "B")}); + var pipe = ML.Transforms.Conversion.ConvertType(columns: new[] {new TypeConvertingEstimator.ColumnInfo("ConvA", DataKind.Single, "A"), + new TypeConvertingEstimator.ColumnInfo("ConvB", DataKind.Single, "B")}); TestEstimatorCore(pipe, dataView); var allTypesData = new[] @@ -115,18 +115,18 @@ public void TestConvertWorkout() var allTypesDataView = ML.Data.ReadFromEnumerable(allTypesData); var allTypesPipe = ML.Transforms.Conversion.ConvertType(columns: new[] { - new TypeConvertingEstimator.ColumnInfo("ConvA", ScalarType.Single, "AA"), - new TypeConvertingEstimator.ColumnInfo("ConvB", ScalarType.Single, "AB"), - new TypeConvertingEstimator.ColumnInfo("ConvC", ScalarType.Single, "AC"), - new TypeConvertingEstimator.ColumnInfo("ConvD", ScalarType.Single, "AD"), - new TypeConvertingEstimator.ColumnInfo("ConvE", ScalarType.Single, "AE"), - new TypeConvertingEstimator.ColumnInfo("ConvF", ScalarType.Single, "AF"), - new TypeConvertingEstimator.ColumnInfo("ConvG", ScalarType.Single, "AG"), - new TypeConvertingEstimator.ColumnInfo("ConvH", ScalarType.Single, "AH"), - new TypeConvertingEstimator.ColumnInfo("ConvK", ScalarType.Single, "AK"), - new TypeConvertingEstimator.ColumnInfo("ConvL", ScalarType.Single, "AL"), - new TypeConvertingEstimator.ColumnInfo("ConvM", ScalarType.Single, "AM"), - new TypeConvertingEstimator.ColumnInfo("ConvN", ScalarType.Single, "AN")} + new TypeConvertingEstimator.ColumnInfo("ConvA", DataKind.Single, "AA"), + new TypeConvertingEstimator.ColumnInfo("ConvB", DataKind.Single, "AB"), + new TypeConvertingEstimator.ColumnInfo("ConvC", DataKind.Single, "AC"), + new TypeConvertingEstimator.ColumnInfo("ConvD", DataKind.Single, "AD"), + new TypeConvertingEstimator.ColumnInfo("ConvE", DataKind.Single, "AE"), + new TypeConvertingEstimator.ColumnInfo("ConvF", DataKind.Single, "AF"), + new TypeConvertingEstimator.ColumnInfo("ConvG", DataKind.Single, "AG"), + new TypeConvertingEstimator.ColumnInfo("ConvH", DataKind.Single, "AH"), + new TypeConvertingEstimator.ColumnInfo("ConvK", DataKind.Single, "AK"), + new TypeConvertingEstimator.ColumnInfo("ConvL", DataKind.Single, "AL"), + new TypeConvertingEstimator.ColumnInfo("ConvM", DataKind.Single, "AM"), + new TypeConvertingEstimator.ColumnInfo("ConvN", DataKind.Single, "AN")} ); TestEstimatorCore(allTypesPipe, allTypesDataView); @@ -207,8 +207,8 @@ public void TestMetadata() new OneHotEncodingEstimator.ColumnInfo("CatA", "A", OneHotEncodingTransformer.OutputKind.Ind), new OneHotEncodingEstimator.ColumnInfo("CatB", "B", OneHotEncodingTransformer.OutputKind.Key) }).Append(ML.Transforms.Conversion.ConvertType(new[] { - new TypeConvertingEstimator.ColumnInfo("ConvA", ScalarType.Double, "CatA"), - new TypeConvertingEstimator.ColumnInfo("ConvB", ScalarType.UInt16, "CatB") + new TypeConvertingEstimator.ColumnInfo("ConvA", DataKind.Double, "CatA"), + new TypeConvertingEstimator.ColumnInfo("ConvB", DataKind.UInt16, "CatB") })); var dataView = ML.Data.ReadFromEnumerable(data); dataView = pipe.Fit(dataView).Transform(dataView); @@ -266,7 +266,7 @@ public void TypeConvertKeyBackCompatTest() var outDataOld = modelOld.Transform(dataView); var modelNew = ML.Transforms.Conversion.ConvertType(new[] { new TypeConvertingEstimator.ColumnInfo("convertedKey", - ScalarType.UInt64, "key", new KeyCount(4)) }).Fit(dataView); + DataKind.UInt64, "key", new KeyCount(4)) }).Fit(dataView); var outDataNew = modelNew.Transform(dataView); // Check that old and new model produce the same result. diff --git a/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs b/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs index f20cb92d96..77137f94a0 100644 --- a/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs @@ -50,8 +50,8 @@ public void TestCustomTransformer() string dataPath = GetDataPath("adult.tiny.with-schema.txt"); var source = new MultiFileSource(dataPath); var loader = ML.Data.CreateTextLoader(new[] { - new TextLoader.Column("Float1", ScalarType.Single, 9), - new TextLoader.Column("Float4", ScalarType.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }) + new TextLoader.Column("Float1", DataKind.Single, 9), + new TextLoader.Column("Float4", DataKind.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }) }, hasHeader: true); var data = loader.Read(source); @@ -90,9 +90,9 @@ public void TestSchemaPropagation() string dataPath = GetDataPath("adult.test"); var source = new MultiFileSource(dataPath); var loader = ML.Data.CreateTextLoader(new[] { - new TextLoader.Column("Float1", ScalarType.Single, 0), - new TextLoader.Column("Float4", ScalarType.Single, new[]{new TextLoader.Range(0), new TextLoader.Range(2), new TextLoader.Range(4), new TextLoader.Range(10) }), - new TextLoader.Column("Text1", ScalarType.String, 0) + new TextLoader.Column("Float1", DataKind.Single, 0), + new TextLoader.Column("Float4", DataKind.Single, new[]{new TextLoader.Range(0), new TextLoader.Range(2), new TextLoader.Range(4), new TextLoader.Range(10) }), + new TextLoader.Column("Text1", DataKind.String, 0) }, separatorChar: ',', hasHeader: true); var data = loader.Read(source); diff --git a/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs b/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs index a1488889ad..c04f363d07 100644 --- a/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs @@ -30,9 +30,9 @@ public void KeyToValueWorkout() { Columns = new[] { - new TextLoader.Column("ScalarString", ScalarType.String, 1), - new TextLoader.Column("VectorString", ScalarType.String, new[] {new TextLoader.Range(1, 4) }), - new TextLoader.Column("BareKey", ScalarType.UInt32, new[] { new TextLoader.Range(0) }, new KeyCount(6)) + new TextLoader.Column("ScalarString", DataKind.String, 1), + new TextLoader.Column("VectorString", DataKind.String, new[] {new TextLoader.Range(1, 4) }), + new TextLoader.Column("BareKey", DataKind.UInt32, new[] { new TextLoader.Range(0) }, new KeyCount(6)) } }); diff --git a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs index 74e916521f..cd84e9a058 100644 --- a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs @@ -35,12 +35,12 @@ public void NormalizerWorkout() var loader = new TextLoader(Env, new TextLoader.Options { Columns = new[] { - new TextLoader.Column("float1", ScalarType.Single, 1), - new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("double1", ScalarType.Double, 1), - new TextLoader.Column("double4", ScalarType.Double, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("int1", ScalarType.Int32, 0), - new TextLoader.Column("float0", ScalarType.Single, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }), + new TextLoader.Column("float1", DataKind.Single, 1), + new TextLoader.Column("float4", DataKind.Single, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("double1", DataKind.Double, 1), + new TextLoader.Column("double4", DataKind.Double, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("int1", DataKind.Int32, 0), + new TextLoader.Column("float0", DataKind.Single, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }), }, HasHeader = true }, new MultiFileSource(dataPath)); @@ -100,12 +100,12 @@ public void NormalizerParameters() var loader = new TextLoader(Env, new TextLoader.Options { Columns = new[] { - new TextLoader.Column("float1", ScalarType.Single, 1), - new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("double1", ScalarType.Double, 1), - new TextLoader.Column("double4", ScalarType.Double, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("int1", ScalarType.Int32, 0), - new TextLoader.Column("float0", ScalarType.Single, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }) + new TextLoader.Column("float1", DataKind.Single, 1), + new TextLoader.Column("float4", DataKind.Single, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("double1", DataKind.Double, 1), + new TextLoader.Column("double4", DataKind.Double, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("int1", DataKind.Int32, 0), + new TextLoader.Column("float0", DataKind.Single, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }) }, HasHeader = true }, new MultiFileSource(dataPath)); @@ -217,8 +217,8 @@ public void SimpleConstructorsAndExtensions() var loader = new TextLoader(Env, new TextLoader.Options { Columns = new[] { - new TextLoader.Column("Label", ScalarType.Single, 0), - new TextLoader.Column("float4", ScalarType.Single, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("float4", DataKind.Single, new[]{new TextLoader.Range(1, 4) }), } }); diff --git a/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs b/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs index 398534ce79..2ddb8b3895 100644 --- a/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs @@ -168,7 +168,7 @@ public void StopWordsRemoverFromFactory() { Columns = new[] { - new TextLoader.Column("Text", ScalarType.String, 1) + new TextLoader.Column("Text", DataKind.String, 1) } }, new MultiFileSource(sentimentDataPath)); diff --git a/test/Microsoft.ML.Tests/Transformers/WordEmbeddingsTests.cs b/test/Microsoft.ML.Tests/Transformers/WordEmbeddingsTests.cs index b9adb620f7..0f6b68deb7 100644 --- a/test/Microsoft.ML.Tests/Transformers/WordEmbeddingsTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/WordEmbeddingsTests.cs @@ -29,8 +29,8 @@ public void TestWordEmbeddings() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", ScalarType.Boolean, 0), - new TextLoader.Column("SentimentText", ScalarType.String, 1) + new TextLoader.Column("Label", DataKind.Boolean, 0), + new TextLoader.Column("SentimentText", DataKind.String, 1) } }).Read(GetDataPath(dataPath)); @@ -64,8 +64,8 @@ public void TestCustomWordEmbeddings() HasHeader = true, Columns = new[] { - new TextLoader.Column("Label", ScalarType.Boolean, 0), - new TextLoader.Column("SentimentText", ScalarType.String, 1) + new TextLoader.Column("Label", DataKind.Boolean, 0), + new TextLoader.Column("SentimentText", DataKind.String, 1) } }).Read(GetDataPath(dataPath)); From 70b5936e193bc888a646e3deab49a78269e0c7e0 Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Fri, 22 Feb 2019 14:14:31 -0800 Subject: [PATCH 06/12] Address comments --- src/Microsoft.ML.Core/Data/DataKind.cs | 40 +++++++++---------- .../DataLoadSave/Text/TextLoader.cs | 15 +++++-- .../Transforms/TypeConverting.cs | 16 ++++---- .../Transforms/ValueMapping.cs | 2 +- .../TransformsStatic.cs | 2 +- .../MissingValueHandlingTransformer.cs | 2 +- .../Transformers/ConvertTests.cs | 2 +- 7 files changed, 41 insertions(+), 38 deletions(-) diff --git a/src/Microsoft.ML.Core/Data/DataKind.cs b/src/Microsoft.ML.Core/Data/DataKind.cs index 443acf94d0..bd61bc96a6 100644 --- a/src/Microsoft.ML.Core/Data/DataKind.cs +++ b/src/Microsoft.ML.Core/Data/DataKind.cs @@ -8,43 +8,39 @@ namespace Microsoft.ML.Data { /// - /// Data type specifier used in text loader and type converters. + /// Data type specifiers used in text loader and type converters. /// - /// - /// - /// : 1-byte integer, type of . - /// : 1-byte unsigned integer, type of . - /// : 2-byte integer, type of . - /// : 2-byte usigned integer, type of . - /// : 4-byte integer, type of . - /// : 4-byte usigned integer, type of . - /// : 8-byte integer, type of . - /// : 8-byte usigned integer, type of . - /// : 4-byte floating-point number, type of . - /// : 8-byte floating-point number, type of . - /// : string, type of . - /// : boolean variable type, type of . - /// : type of . - /// : type of . - /// : type of . - /// - /// public enum DataKind : byte { + /// : 1-byte integer, type of . SByte = 1, + /// : 1-byte unsigned integer, type of . Byte = 2, + /// : 2-byte integer, type of . Int16 = 3, + /// : 2-byte usigned integer, type of . UInt16 = 4, + /// : 4-byte integer, type of . Int32 = 5, + /// : 4-byte usigned integer, type of . UInt32 = 6, + /// : 8-byte integer, type of . Int64 = 7, + /// : 8-byte usigned integer, type of . UInt64 = 8, + /// : 4-byte floating-point number, type of . Single = 9, + /// : 8-byte floating-point number, type of . Double = 10, + /// : string, type of . String = 11, + /// : boolean variable type, type of . Boolean = 12, + /// : type of . TimeSpan = 13, + /// : type of . DateTime = 14, + /// : type of . DateTimeOffset = 15, } @@ -123,14 +119,14 @@ public static InternalDataKind FromIndex(int index) /// This function converts to . /// Because is a subset of , the conversion is straightforward. /// - public static InternalDataKind ToDataKind(this DataKind dataKind) => (InternalDataKind)dataKind; + public static InternalDataKind ToInternalDataKind(this DataKind dataKind) => (InternalDataKind)dataKind; /// /// This function converts to . /// Because is a subset of , we should check if /// can be found in . /// - public static DataKind ToScalarType(this InternalDataKind kind) + public static DataKind ToDataKind(this InternalDataKind kind) { Contracts.Check(kind != InternalDataKind.UG); return (DataKind)kind; diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index a8b8dec429..0f76c12b48 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -52,7 +52,7 @@ public Column() { } /// of the items in the column. /// Index of the column. public Column(string name, DataKind dataKind, int index) - : this(name, dataKind.ToDataKind(), new[] { new Range(index) }) + : this(name, dataKind.ToInternalDataKind(), new[] { new Range(index) }) { } @@ -64,12 +64,19 @@ public Column(string name, DataKind dataKind, int index) /// The minimum inclusive index of the column. /// The maximum-inclusive index of the column. public Column(string name, DataKind dataKind, int minIndex, int maxIndex) - : this(name, dataKind.ToDataKind(), new[] { new Range(minIndex, maxIndex) }) + : this(name, dataKind.ToInternalDataKind(), new[] { new Range(minIndex, maxIndex) }) { } + /// + /// Describes how an input column should be mapped to an column. + /// + /// Name of the column. + /// of the items in the column. + /// Source index range(s) of the column. + /// For a key column, this defines the range of values. public Column(string name, DataKind dataKind, Range[] source, KeyCount keyCount = null) - : this(name, dataKind.ToDataKind(), source, keyCount) + : this(name, dataKind.ToInternalDataKind(), source, keyCount) { } @@ -109,7 +116,7 @@ private Column(string name, InternalDataKind? kind, Range[] source, KeyCount key /// of the items in the column. /// /// It's a public interface to access the information in an internal DataKind. - public DataKind ItemType => Type.HasValue ? Type.Value.ToScalarType() : DataKind.Single; + public DataKind ItemType => Type.HasValue ? Type.Value.ToDataKind() : DataKind.Single; /// /// Source index range(s) of the column. diff --git a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs index b391814c77..ea45b796fb 100644 --- a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs +++ b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs @@ -221,13 +221,13 @@ private protected override void SaveModel(ModelSaveContext ctx) for (int i = 0; i < _columns.Length; i++) { - Host.Assert((InternalDataKind)(byte)_columns[i].OutputKind.ToDataKind() == _columns[i].OutputKind.ToDataKind()); + Host.Assert((InternalDataKind)(byte)_columns[i].OutputKind.ToInternalDataKind() == _columns[i].OutputKind.ToInternalDataKind()); if (_columns[i].OutputKeyCount != null) { byte b = (byte)_columns[i].OutputKind; b |= 0x80; ctx.Writer.Write(b); - ctx.Writer.Write(_columns[i].OutputKeyCount.Count ?? _columns[i].OutputKind.ToDataKind().ToMaxInt()); + ctx.Writer.Write(_columns[i].OutputKeyCount.Count ?? _columns[i].OutputKind.ToInternalDataKind().ToMaxInt()); } else ctx.Writer.Write((byte)_columns[i].OutputKind); @@ -289,7 +289,7 @@ private TypeConvertingTransformer(IHost host, ModelLoadContext ctx) keyCount = new KeyCount(count); } - _columns[i] = new TypeConvertingEstimator.ColumnInfo(ColumnPairs[i].outputColumnName, kind.ToScalarType(), ColumnPairs[i].inputColumnName, keyCount); + _columns[i] = new TypeConvertingEstimator.ColumnInfo(ColumnPairs[i].outputColumnName, kind.ToDataKind(), ColumnPairs[i].inputColumnName, keyCount); } } @@ -337,7 +337,7 @@ internal static IDataTransform Create(IHostEnvironment env, Options options, IDa { kind = tempResultType.Value; } - cols[i] = new TypeConvertingEstimator.ColumnInfo(item.Name, kind.ToScalarType(), item.Source ?? item.Name, keyCount); + cols[i] = new TypeConvertingEstimator.ColumnInfo(item.Name, kind.ToDataKind(), item.Source ?? item.Name, keyCount); }; return new TypeConvertingTransformer(env, cols).MakeDataTransform(input); } @@ -401,7 +401,7 @@ public Mapper(TypeConvertingTransformer parent, DataViewSchema inputSchema) { inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].inputColumnName, out _srcCols[i]); var srcCol = inputSchema[_srcCols[i]]; - if (!CanConvertToType(Host, srcCol.Type, _parent._columns[i].OutputKind.ToDataKind(), _parent._columns[i].OutputKeyCount, + if (!CanConvertToType(Host, srcCol.Type, _parent._columns[i].OutputKind.ToInternalDataKind(), _parent._columns[i].OutputKeyCount, out PrimitiveDataViewType itemType, out _types[i])) { throw Host.ExceptParam(nameof(inputSchema), @@ -540,7 +540,7 @@ public sealed class ColumnInfo /// /// The expected kind of the converted column. /// - internal readonly DataKind OutputKind; + public readonly DataKind OutputKind; /// /// New key count, if we work with key type. /// @@ -574,7 +574,7 @@ public ColumnInfo(string name, Type type, string inputColumnName, KeyCount outpu InputColumnName = inputColumnName ?? name; if (!type.TryGetDataKind(out InternalDataKind OutputKind)) throw Contracts.ExceptUserArg(nameof(type), $"Unsupported type {type}."); - this.OutputKind = OutputKind.ToScalarType(); + this.OutputKind = OutputKind.ToDataKind(); OutputKeyCount = outputKeyCount; } } @@ -613,7 +613,7 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) { if (!inputSchema.TryFindColumn(colInfo.InputColumnName, out var col)) throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.InputColumnName); - if (!TypeConvertingTransformer.GetNewType(Host, col.ItemType, colInfo.OutputKind.ToDataKind(), colInfo.OutputKeyCount, out PrimitiveDataViewType newType)) + if (!TypeConvertingTransformer.GetNewType(Host, col.ItemType, colInfo.OutputKind.ToInternalDataKind(), colInfo.OutputKeyCount, out PrimitiveDataViewType newType)) throw Host.ExceptParam(nameof(inputSchema), $"Can't convert {colInfo.InputColumnName} into {newType.ToString()}"); if (!Data.Conversion.Conversions.Instance.TryGetStandardConversion(col.ItemType, newType, out Delegate del, out bool identity)) throw Host.ExceptParam(nameof(inputSchema), $"Don't know how to convert {colInfo.InputColumnName} into {newType.ToString()}"); diff --git a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs index b117476d70..b62cd8d221 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs @@ -497,7 +497,7 @@ private static TextLoader.Column GenerateValueColumn(IHostEnvironment env, valueColumn.KeyCount = new KeyCount(); else { - valueColumn.Type = DataKind.UInt64.ToDataKind(); + valueColumn.Type = DataKind.UInt64.ToInternalDataKind(); valueColumn.KeyCount = new KeyCount(); } diff --git a/src/Microsoft.ML.StaticPipe/TransformsStatic.cs b/src/Microsoft.ML.StaticPipe/TransformsStatic.cs index 77cb4952df..69645722e7 100644 --- a/src/Microsoft.ML.StaticPipe/TransformsStatic.cs +++ b/src/Microsoft.ML.StaticPipe/TransformsStatic.cs @@ -936,7 +936,7 @@ public override IEstimator Reconcile(IHostEnvironment env, Pipelin for (int i = 0; i < toOutput.Length; ++i) { var tcol = (IConvertCol)toOutput[i]; - infos[i] = new TypeConvertingEstimator.ColumnInfo(outputNames[toOutput[i]], tcol.Kind.ToScalarType(), inputNames[tcol.Input]); + infos[i] = new TypeConvertingEstimator.ColumnInfo(outputNames[toOutput[i]], tcol.Kind.ToDataKind(), inputNames[tcol.Input]); } return new TypeConvertingEstimator(env, infos); } diff --git a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs index 5eee619962..7016cb40f1 100644 --- a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs +++ b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs @@ -185,7 +185,7 @@ internal static IDataTransform Create(IHostEnvironment env, Options options, IDa { throw h.Except("Cannot get a DataKind for type '{0}'", replaceItemType.RawType); } - naConvCols.Add(new TypeConvertingEstimator.ColumnInfo(tmpIsMissingColName, replaceItemTypeKind.ToScalarType(), tmpIsMissingColName)); + naConvCols.Add(new TypeConvertingEstimator.ColumnInfo(tmpIsMissingColName, replaceItemTypeKind.ToDataKind(), tmpIsMissingColName)); } // Add the NAReplaceTransform column. diff --git a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs index 67f74aea44..17715fbe6b 100644 --- a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs @@ -243,7 +243,7 @@ public void TypeConvertKeyBackCompatTest() { // Model generated using the following command before the change removing Min and Count from KeyType. // ML.Transforms.Conversion.ConvertType(new[] { new TypeConvertingEstimator.ColumnInfo("key", "convertedKey", - // ScalarType.Ulong, new KeyCount(4)) }).Fit(dataView); + // DataKind.UInt64, new KeyCount(4)) }).Fit(dataView); var dataArray = new[] { new SimpleSchemaUIntColumn() { key = 0 }, From c76762828288c9a3555bfb49f6a0bd6745f2aa98 Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Fri, 22 Feb 2019 15:16:42 -0800 Subject: [PATCH 07/12] Address comments --- src/Microsoft.ML.Core/Data/DataKind.cs | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/Microsoft.ML.Core/Data/DataKind.cs b/src/Microsoft.ML.Core/Data/DataKind.cs index bd61bc96a6..edaf6f7329 100644 --- a/src/Microsoft.ML.Core/Data/DataKind.cs +++ b/src/Microsoft.ML.Core/Data/DataKind.cs @@ -8,39 +8,40 @@ namespace Microsoft.ML.Data { /// - /// Data type specifiers used in text loader and type converters. + /// Specifies a simple data type. /// + // Data type specifiers mainly used in creating text loader and type converter. public enum DataKind : byte { - /// : 1-byte integer, type of . + /// 1-byte integer, type of . SByte = 1, - /// : 1-byte unsigned integer, type of . + /// 1-byte unsigned integer, type of . Byte = 2, - /// : 2-byte integer, type of . + /// 2-byte integer, type of . Int16 = 3, - /// : 2-byte usigned integer, type of . + /// 2-byte usigned integer, type of . UInt16 = 4, - /// : 4-byte integer, type of . + /// 4-byte integer, type of . Int32 = 5, - /// : 4-byte usigned integer, type of . + /// 4-byte usigned integer, type of . UInt32 = 6, - /// : 8-byte integer, type of . + /// 8-byte integer, type of . Int64 = 7, - /// : 8-byte usigned integer, type of . + /// 8-byte usigned integer, type of . UInt64 = 8, - /// : 4-byte floating-point number, type of . + /// 4-byte floating-point number, type of . Single = 9, - /// : 8-byte floating-point number, type of . + /// 8-byte floating-point number, type of . Double = 10, - /// : string, type of . + /// string, type of . String = 11, - /// : boolean variable type, type of . + /// boolean variable type, type of . Boolean = 12, - /// : type of . + /// type of . TimeSpan = 13, - /// : type of . + /// type of . DateTime = 14, - /// : type of . + /// type of . DateTimeOffset = 15, } From 9a803a0db8e7907d4d7738426f2a927fde3aa242 Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Fri, 22 Feb 2019 16:33:19 -0800 Subject: [PATCH 08/12] Address comments --- .../DataLoadSave/Text/TextLoader.cs | 28 +++++++++---------- .../Common/EntryPoints/core_manifest.json | 4 +-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index 0f76c12b48..de089bc683 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -49,7 +49,7 @@ public Column() { } /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. + /// of the items in the column. /// Index of the column. public Column(string name, DataKind dataKind, int index) : this(name, dataKind.ToInternalDataKind(), new[] { new Range(index) }) @@ -60,7 +60,7 @@ public Column(string name, DataKind dataKind, int index) /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. + /// of the items in the column. /// The minimum inclusive index of the column. /// The maximum-inclusive index of the column. public Column(string name, DataKind dataKind, int minIndex, int maxIndex) @@ -72,7 +72,7 @@ public Column(string name, DataKind dataKind, int minIndex, int maxIndex) /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. + /// of the items in the column. /// Source index range(s) of the column. /// For a key column, this defines the range of values. public Column(string name, DataKind dataKind, Range[] source, KeyCount keyCount = null) @@ -84,10 +84,10 @@ public Column(string name, DataKind dataKind, Range[] source, KeyCount keyCount /// Describes how an input column should be mapped to an column. /// /// Name of the column. - /// of the items in the column. If defaults to a float. + /// of the items in the column. /// Source index range(s) of the column. /// For a key column, this defines the range of values. - private Column(string name, InternalDataKind? kind, Range[] source, KeyCount keyCount = null) + private Column(string name, InternalDataKind kind, Range[] source, KeyCount keyCount = null) { Contracts.CheckValue(name, nameof(name)); Contracts.CheckValue(source, nameof(source)); @@ -106,17 +106,17 @@ private Column(string name, InternalDataKind? kind, Range[] source, KeyCount key /// /// of the items in the column. If defaults to a float. - /// Although is internal, 's information can be publically accessed by . + /// Although is internal, 's information can be publically accessed by . /// [Argument(ArgumentType.AtMostOnce, HelpText = "Type of the items in the column")] [BestFriend] - internal InternalDataKind? Type; + internal InternalDataKind Type = default; /// - /// of the items in the column. + /// of the items in the column. /// /// It's a public interface to access the information in an internal DataKind. - public DataKind ItemType => Type.HasValue ? Type.Value.ToDataKind() : DataKind.Single; + public DataKind DataKind => Type.ToDataKind(); /// /// Source index range(s) of the column. @@ -157,7 +157,7 @@ private bool TryParse(string str) InternalDataKind kind; if (!TypeParsingUtils.TryParseDataKind(rgstr[istr++], out kind, out KeyCount)) return false; - Type = kind == default ? default(InternalDataKind?) : kind; + Type = kind == default ? InternalDataKind.R4 : kind; } return TryParseSource(rgstr[istr++]); @@ -195,10 +195,10 @@ internal bool TryUnparse(StringBuilder sb) int ich = sb.Length; sb.Append(Name); sb.Append(':'); - if (Type != null || KeyCount != null) + if (Type != default || KeyCount != null) { - if (Type != null) - sb.Append(Type.Value.GetString()); + if (Type != default) + sb.Append(Type.GetString()); if (KeyCount != null) { sb.Append('['); @@ -725,7 +725,7 @@ public Bindings(TextLoader parent, Column[] cols, IMultiStreamSource headerFile, } else { - kind = col.Type ?? InternalDataKind.Num; + kind = col.Type == default? InternalDataKind.R4 : col.Type; ch.CheckUserArg(Enum.IsDefined(typeof(InternalDataKind), kind), nameof(Column.Type), "Bad item type"); itemType = ColumnTypeExtensions.PrimitiveTypeFromKind(kind); } diff --git a/test/BaselineOutput/Common/EntryPoints/core_manifest.json b/test/BaselineOutput/Common/EntryPoints/core_manifest.json index b36ebd329f..3c93f1d3c6 100644 --- a/test/BaselineOutput/Common/EntryPoints/core_manifest.json +++ b/test/BaselineOutput/Common/EntryPoints/core_manifest.json @@ -191,8 +191,8 @@ "Desc": "Type of the items in the column", "Required": false, "SortOrder": 150.0, - "IsNullable": true, - "Default": null + "IsNullable": false, + "Default": "0" }, { "Name": "Source", From e9fd4ae6d7bcfa60e98d84738696e0adafecf48b Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Fri, 22 Feb 2019 17:16:34 -0800 Subject: [PATCH 09/12] Make R4 as default --- src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs | 4 ++-- .../Common/EntryPoints/ensemble-model0-stats.txt | 4 ++-- .../Common/EntryPoints/ensemble-model2-stats.txt | 4 ++-- test/BaselineOutput/Common/EntryPoints/lr-stats.txt | 4 ++-- test/BaselineOutput/Common/EntryPoints/mc-lr-stats.txt | 4 ++-- test/BaselineOutput/Common/Text/ngrams.tsv | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index de089bc683..1d7e36d4fc 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -105,12 +105,12 @@ private Column(string name, InternalDataKind kind, Range[] source, KeyCount keyC public string Name; /// - /// of the items in the column. If defaults to a float. + /// of the items in the column. It defaults to float. /// Although is internal, 's information can be publically accessed by . /// [Argument(ArgumentType.AtMostOnce, HelpText = "Type of the items in the column")] [BestFriend] - internal InternalDataKind Type = default; + internal InternalDataKind Type = InternalDataKind.R4; /// /// of the items in the column. diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt index 057ef0ff87..adf771b7f1 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt @@ -2,8 +2,8 @@ #@ header+ #@ sep=tab #@ col={name={Count of training examples} type=I8 src=0} -#@ col={name={Residual Deviance} type=R4 src=1} -#@ col={name={Null Deviance} type=R4 src=2} +#@ col={name={Residual Deviance} src=1} +#@ col={name={Null Deviance} src=2} #@ col=AIC:R4:3 #@ col=BiasEstimate:R4:4 #@ col=BiasStandardError:R4:5 diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt index dbb2224574..bc4bcd28d2 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt @@ -2,8 +2,8 @@ #@ header+ #@ sep=tab #@ col={name={Count of training examples} type=I8 src=0} -#@ col={name={Residual Deviance} type=R4 src=1} -#@ col={name={Null Deviance} type=R4 src=2} +#@ col={name={Residual Deviance} src=1} +#@ col={name={Null Deviance} src=2} #@ col=AIC:R4:3 #@ col=BiasEstimate:R4:4 #@ col=BiasStandardError:R4:5 diff --git a/test/BaselineOutput/Common/EntryPoints/lr-stats.txt b/test/BaselineOutput/Common/EntryPoints/lr-stats.txt index c467f102be..3d702f31a1 100644 --- a/test/BaselineOutput/Common/EntryPoints/lr-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/lr-stats.txt @@ -2,8 +2,8 @@ #@ header+ #@ sep=tab #@ col={name={Count of training examples} type=I8 src=0} -#@ col={name={Residual Deviance} type=R4 src=1} -#@ col={name={Null Deviance} type=R4 src=2} +#@ col={name={Residual Deviance} src=1} +#@ col={name={Null Deviance} src=2} #@ col=AIC:R4:3 #@ col=BiasEstimate:R4:4 #@ col=BiasStandardError:R4:5 diff --git a/test/BaselineOutput/Common/EntryPoints/mc-lr-stats.txt b/test/BaselineOutput/Common/EntryPoints/mc-lr-stats.txt index 3f451e8f26..e8a5f9dd5e 100644 --- a/test/BaselineOutput/Common/EntryPoints/mc-lr-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/mc-lr-stats.txt @@ -2,8 +2,8 @@ #@ header+ #@ sep=tab #@ col={name={Count of training examples} type=I8 src=0} -#@ col={name={Residual Deviance} type=R4 src=1} -#@ col={name={Null Deviance} type=R4 src=2} +#@ col={name={Residual Deviance} src=1} +#@ col={name={Null Deviance} src=2} #@ col=AIC:R4:3 #@ } Count of training examples Residual Deviance Null Deviance AIC diff --git a/test/BaselineOutput/Common/Text/ngrams.tsv b/test/BaselineOutput/Common/Text/ngrams.tsv index c64bd7feaa..32e5cf0bdf 100644 --- a/test/BaselineOutput/Common/Text/ngrams.tsv +++ b/test/BaselineOutput/Common/Text/ngrams.tsv @@ -3,8 +3,8 @@ #@ sep=tab #@ col=text:TX:0-** #@ col={name=terms type=U4 src={ min=-1 var=+} key=3941} -#@ col={name=ngrams type=R4 src={ min=-1 max=13111 vector=+}} -#@ col={name=ngramshash type=R4 src={ min=-1 max=65534 vector=+}} +#@ col={name=ngrams src={ min=-1 max=13111 vector=+}} +#@ col={name=ngramshash src={ min=-1 max=65534 vector=+}} #@ } ==RUDE== ==RUDE==|Dude, Dude, Dude,|you you you|are are are|rude rude rude|upload upload upload|that that that|carl carl carl|picture picture picture|back, back, back,|or or or|else. else. == ==|OK! OK! OK!|== ==|IM IM IM|GOING GOING GOING|TO TO TO|VANDALIZE VANDALIZE VANDALIZE|WILD WILD WILD|ONES ONES ONES|WIKI WIKI WIKI|THEN!!! THEN!!! Stop Stop|trolling, trolling, trolling,|zapatancas, zapatancas, zapatancas,|calling calling calling|me me me|a a a|liar liar liar|merely merely merely|demonstartes demonstartes demonstartes|that that|you you|arer arer arer|Zapatancas. Zapatancas. Zapatancas.|You You You|may may may|choose choose choose|to to to|chase chase chase|every every every|legitimate legitimate legitimate|editor editor editor|from from from|this this this|site site site|and and and|ignore ignore ignore|me me|but but but|I I I|am am am|an an an|editor editor|with with with|a a|record record record|that that|isnt isnt isnt|99% 99% 99%|trolling trolling trolling|and and|therefore therefore therefore|my my my|wishes wishes wishes|are are|not not not|to to|be be be|completely completely completely|ignored ignored ignored|by by by|a a|sockpuppet sockpuppet sockpuppet|like like like|yourself. yourself. yourself.|The The The|consensus consensus consensus|is is is|overwhelmingly overwhelmingly overwhelmingly|against against against|you you|and and|your your your|trollin trollin trollin|g g g|lover lover lover|Zapatancas, Zapatancas, ==You're ==You're|cool== cool== cool==|You You|seem seem seem|like like|a a|really really really|cool cool cool|guy... guy... guy...|*bursts *bursts *bursts|out out out|laughing laughing laughing|at at at|sarcasm*. sarcasm*. ":::::" ":::::|Why" Why Why|are are|you you|threatening threatening threatening|me? me? me?|I'm I'm I'm|not not|being being being|disruptive, disruptive, disruptive,|its its its|you you|who who who|is is|being being|disruptive. disruptive. ==|hey hey hey|waz waz waz|up? up? up?|== hey|ummm... ummm... ummm...|the the the|fif fif fif|four four four|fifty fifty fifty|one one one|song... song... song...|was was was|the the|info info info|inacurate? inacurate? inacurate?|did did did|i i i|spell spell spell|something something something|wrong? wrong? wrong?|hmm... hmm... hmm...|cause cause cause|i i|don't don't don't|think think think|you you|have have have|a a|right right right|to to|delete delete delete|ANYTHING ANYTHING ANYTHING|that that|is is|accurate accurate accurate|and and|that that|peple peple peple|may may|want want want|to to|read read read|about about about|fool. fool. fool.|i don't|like like|being being|pushed pushed pushed|around around around|especially especially especially|by by|some some some|little little little|boy. boy. boy.|got got got|it? it? "::::::::::I'm" "::::::::::I'm|not" not|sure sure sure|either. either. either.|I I|think think|it it it|has has has|something something|to to|do do do|with with|merely merely|ahistorical ahistorical ahistorical|vs vs vs|being being|derived derived derived|from from|pagan pagan pagan|myths. myths. myths.|Price Price Price|does does does|believe believe believe|the the|latter, latter, latter,|I'm sure|about about|other other other|CMT CMT CMT|proponents. proponents. "*::Your" "*::Your|POV" POV POV|and and|propaganda propaganda propaganda|pushing pushing pushing|is is|dully dully dully|noted. noted. noted.|However However However|listing listing listing|interesting interesting interesting|facts facts facts|in in in|a a|netral netral netral|and and|unacusitory unacusitory unacusitory|tone tone tone|is is|not not|POV. POV. POV.|You seem|to be|confusing confusing confusing|Censorship Censorship Censorship|with with|POV POV|monitoring. monitoring. monitoring.|I I|see see see|nothing nothing nothing|POV POV|expressed expressed expressed|in in|the the|listing listing|of of of|intersting intersting intersting|facts. facts. facts.|If If If|you you|want to|contribute contribute contribute|more more more|facts facts|or or|edit edit edit|wording wording wording|of of|the the|cited cited cited|fact fact fact|to to|make make make|them them them|sound sound sound|more more|netral netral|then then then|go go go|ahead. ahead. ahead.|No No No|need need need|to to|CENSOR CENSOR CENSOR|interesting interesting|factual factual factual|information. information. "==|File:Hildebrandt-Greg" "File:Hildebrandt-Greg" "File:Hildebrandt-Greg|and" and|Tim.jpg Tim.jpg Tim.jpg|listed listed listed|for for for|deletion deletion deletion|== ==|An An An|image image image|or or|media media media|file file file|that you|uploaded uploaded uploaded|or or|altered, altered, "altered,|File:Hildebrandt-Greg" and|Tim.jpg, Tim.jpg, Tim.jpg,|has has|been been been|listed listed|at "at|Wikipedia:Files" "Wikipedia:Files" "Wikipedia:Files|for" for|deletion. deletion. deletion.|Please Please Please|see see|the the|discussion discussion discussion|to to|see see|why why why|this this|is is|(you (you (you|may may|have have|to to|search search search|for for|the the|title title title|of the|image image|to to|find find find|its its|entry), entry), entry),|if if if|you are|interested interested interested|in in|it it|not being|deleted. deleted. "::::::::This" "::::::::This|is" is|a a|gross gross gross|exaggeration. exaggeration. exaggeration.|Nobody Nobody Nobody|is is|setting setting setting|a a|kangaroo kangaroo kangaroo|court. court. court.|There There There|was was|a a|simple simple simple|addition addition addition|concerning concerning concerning|the the|airline. airline. airline.|It It It|is is|the the|only only only|one one|disputed disputed disputed|here. here. "::No," "::No,|I" I|won't won't won't|unrevert unrevert unrevert|your "your|edits!""" "edits!""" "edits!""|""sounds" """sounds" """sounds|more" more|like like|you're you're you're|writing writing writing|their their their|MARKETING MARKETING "MARKETING|material!!""" "material!!""" "material!!""|Don't" Don't Don't|get get get|bossy bossy bossy|with with|me. me. me.|Or Or Or|snippy snippy snippy|either, either, either,|Miss Miss Miss|religious religious religious|Bigot! Bigot! Bigot!|Kindly Kindly Kindly|leave leave leave|your your|hatred hatred hatred|for for|Christianity Christianity Christianity|at at|DailyKos DailyKos DailyKos|before before before|you you|log log log|out out|there there there|and and|log log|in in|over over over|here here here|as as as|a...er...ahem...NPOV a...er...ahem...NPOV a...er...ahem...NPOV|editor "::::I" "::::I|heard" heard heard|Mark Mark Mark|Kermode Kermode Kermode|say say say|today today today|that that|Turbo Turbo Turbo|was was|rubbish, rubbish, rubbish,|and and|he's he's he's|never never never|*cough* *cough* *cough*|wrong! wrong! wrong!|He He He|doesn't doesn't doesn't|like like|F1 F1 F1|but but|he he he|loved loved loved|Senna Senna Senna|and and|liked liked liked|Rush Rush Rush|as as|well. well. am|a a|sock sock sock|puppet? puppet? puppet?|THAT THAT THAT|is is|my my|ban ban ban|reason? reason? reason?|This This This|is my|only only|account, account, account,|and and|thanks thanks thanks|for for|ignoring ignoring ignoring|the the|bulk bulk bulk|of of|my my|text. text. text.|Wikipedia Wikipedia Wikipedia|IS IS IS|corrupt corrupt corrupt|AND AND AND|populated populated populated|by by|idiots. idiots. idiots.|I am|free free free|to to|say say|this, this, this,|so so so|please please please|refrain refrain refrain|from from|saying saying saying|anything anything anything|like like|that that|again. again. again.|I I|didn't didn't didn't|get get|banned banned banned|for for|trolling, trolling,|or or|personal personal personal|attacks, attacks, attacks,|I I|got got|banned banned|because because because|I I|changed changed changed|an an|article article article|to to|NPOV NPOV NPOV|when when when|the the|far far far|majority majority majority|of the|editors editors editors|here here|would would would|rather rather rather|the the|see the|BNP BNP BNP|article article|as as|a a|diatribe diatribe diatribe|denouncing denouncing denouncing|the the|party. party. You|twit, twit, twit,|read read|the the|article article|before you|revert revert revert|edits. edits. edits.|Power-mad Power-mad Power-mad|jerks jerks jerks|like like|you are|ruining ruining ruining|this this|place place A A|tag tag tag|has been|placed placed placed|on on on|Jerome Jerome Jerome|leung leung leung|kam, kam, kam,|requesting requesting requesting|that that|it it|be be|speedily speedily speedily|deleted deleted deleted|from from|Wikipedia. Wikipedia. Wikipedia.|This This|has been|done done done|because because|the article|appears appears appears|to be|about about|a a|person, person, person,|group group group|of of|people, people, people,|band, band, band,|club, club, club,|company, company, company,|or or|web web web|content, content, content,|but but|it it|does does|not not|indicate indicate indicate|how how how|or or|why why|the the|subject subject subject|is "is|notable:" "notable:" "notable:|that" that|is, is, is,|why why|an article|about about|that that|subject subject|should should should|be be|included included included|in in|an an|encyclopedia. encyclopedia. encyclopedia.|Under Under Under|the the|criteria criteria criteria|for for|speedy speedy speedy|deletion, deletion, deletion,|articles articles articles|that that|do do|not not|assert assert assert|the the|subject's subject's subject's|importance importance importance|or or|significance significance significance|may may|be be|deleted deleted|at at|any any any|time. time. time.|Please the|guidelines guidelines guidelines|for for|what what what|is is|generally generally generally|accepted accepted accepted|as as|notable. notable. notable.|If you|think think|that you|can can can|assert the|notability notability notability|of the|subject, subject, subject,|you you|may may|contest contest contest|the the|deletion. deletion.|To To To|do do|this, this,|add add add|on on|the the|top top top|of the|page page page|(just (just (just|below below below|the the|existing existing existing|speedy speedy|deletion deletion|or "or|""db""" """db""" """db""|tag)" tag) tag)|and and|leave leave|a a|note note note|on the|article's article's article's|talk talk talk|page page|explaining explaining explaining|your your|position. position. position.|Please Please|do not|remove remove remove|the the|speedy deletion|tag tag|yourself, yourself, yourself,|but but|don't don't|hesitate hesitate hesitate|to to|add add|information information information|to to|the article|that that|would would|confirm confirm confirm|the subject's|notability notability|under under under|Wikipedia Wikipedia|guidelines. guidelines. guidelines.|For For For|guidelines guidelines|on on|specific specific specific|types types types|of of|articles, articles, articles,|you to|check check check|out out|our our our|criteria for|biographies, biographies, biographies,|for for|web web|sites, sites, sites,|for for|bands, bands, bands,|or or|for for|companies. companies. companies.|Feel Feel Feel|free to|leave on|my my|talk page|if have|any any|questions questions questions|about about|this. this. ==READ ==READ|THIS== THIS== THIS==|This is|Wikipedia. Wikipedia.|It a|place place|where where where|people people people|come come come|for for|infomation. infomation. infomation.|So So So|tell tell tell|me me|how how|it it|is is|that that|a a|guy guy guy|wants wants wants|to check|John John John|Cena's Cena's Cena's|recent recent recent|activity activity activity|in the|WWE WWE WWE|can't can't can't|because because|SOME SOME SOME|people people|want to|keep keep keep|the page|unedited. unedited. unedited.|It not|worth worth worth|my my|time time time|to to|try try try|to to|bring bring bring|new new new|infomation infomation infomation|to to|a a|page page|every every|month month month|or or|two two two|if you|NERDS NERDS NERDS|just just just|change change change|it it|back. back. back.|THERE THERE THERE|IS IS|NO NO NO|POINT POINT POINT|WHATSOEVER! WHATSOEVER! WHATSOEVER!|If If|I I|want to|put put put|what what|happened happened happened|at at|Backlash Backlash Backlash|I I|WILL WILL WILL|BLODDY BLODDY BLODDY|WELL WELL WELL|PUT PUT PUT|WHAT WHAT WHAT|HAPPENED HAPPENED HAPPENED|AT AT AT|BACKLASH! BACKLASH! BACKLASH!|Don't Don't|any any|of of|you you|nerds nerds nerds|try try|and and|stop stop stop|me! me! ==|Administrator Administrator Administrator|Complaint Complaint Complaint|Filed Filed Filed|Against Against Against|You You|== ==|I I|requested requested requested|that you|do not|edit edit|the article|until until until|the the|editor editor|assistance assistance assistance|has been|sought. sought. sought.|But But But|you you|still still still|added added added|and and|the the|tag tag|you you|added added|is is|fault fault fault|because because|this a|professionally professionally professionally|written written written|article, article, article,|besides besides besides|the the|last last last|section section section|there there|is is|nothing nothing|about about|the article|having having having|a a|fan fan fan|flavor flavor flavor|to to|it. it. it.|Before Before Before|you you|add add|the the|add add|again again again|please please|do do|show show show|which which which|section section|besides "the|""What" """What" """What|Ram's" Ram's Ram's|Fan's Fan's Fan's|have say|about "about|him""" "him""" "him""|seems" seems seems|written written|from from|a fan|point point point|of of|view. view. view.|This This|article article|besides section|adheres adheres adheres|to the|Wikpedia Wikpedia Wikpedia|standard standard standard|of of|writing. writing. writing.|IF IF IF|not not|please please|first first first|prove prove prove|it it|in in|my my|notes. notes. notes.|As As As|for the|resource resource resource|the the|technical technical technical|person person person|on the|team team team|is is|in the|process process process|of of|adding adding adding|the the|refernce refernce refernce|link link link|to the|source source source|after after after|which which|we we we|will will will|remove remove|that that|tag tag|as well.|Once Once Once|again not|add add|false false false|tags, tags, tags,|lets lets lets|wait wait wait|for editor|and the|administrator, administrator, administrator,|I I|did did|tell tell|the the|administrator administrator administrator|to to|look look look|at at|the the|history history history|and and|have have|provided provided provided|your your|notes notes notes|to to|him. him. him.|So So|at at|this this|time, time, time,|just just|have have|patience patience patience|and and|lets lets|wait. wait. wait.|I am|also also also|forwarding forwarding forwarding|this this|to administrator|from from|whom whom whom|I I|have have|requested requested|help. help. help.|Like Like Like|I I|said said said|before, before, before,|as as|adminstrator adminstrator adminstrator|came came came|to page|and and|made made made|the the|necessary necessary necessary|changes, changes, changes,|she she she|did did|not not|find find|the article|sub-standard, sub-standard, sub-standard,|so from|adding adding|tags. tags. a|shame shame shame|what what|people people|are are|here, here, here,|I am|disgusting disgusting disgusting|of of|you. you. ":Hello" ":Hello|Cielomobile." Cielomobile. Cielomobile.|I say|that that|I I|also also|belive belive belive|that that|the the|edits edits edits|made made|recently recently recently|to the|United United United|States-Mexico States-Mexico States-Mexico|barrier barrier barrier|page page|were were were|not not|vandalism. vandalism. vandalism.|I I|understand understand understand|that the|topic topic topic|of the|border border border|can can|be be|polemic, polemic, polemic,|but I|don't "that|User:68.2.242.165" "User:68.2.242.165" "User:68.2.242.165|was" was|vandalizing vandalizing vandalizing|the the|page. page. page.|Maybe Maybe Maybe|you you|could could could|use use use|the the|talk "page|Talk:United" "Talk:United" "Talk:United|States–Mexico" States–Mexico States–Mexico|barrier barrier|to to|lay lay lay|out out|your your|objections objections objections|to to|those those those|edits edits|without without without|deleting deleting deleting|them them|entirely. entirely. entirely.|I think|they they they|were were|good-faith good-faith good-faith|efforts efforts efforts|to to|improve improve improve|the the|article, article,|and is|also also|one one|of the|guiding guiding guiding|principles principles principles|of of|Wikipedia, Wikipedia, Wikipedia,|to to|Assume Assume Assume|Good Good Good|Faith. Faith. Faith.|It It|might might might|help help help|though, though, though,|if if|the the|author author author|of of|those edits|were were|to to|register register register|with with|Wikipedia Wikipedia|so so|the edits|won't won't|appear appear appear|merely merely|with with|an an|IP IP IP|address. address. ==|my my|removal removal removal|of of|your your|content content content|on on|DNA DNA DNA|melting melting melting|== I|removed removed removed|the the|content content|you you|placed placed|when when|creating creating creating|the article|because because|it it|was was|wrong wrong wrong|and and|unreferenced. unreferenced. unreferenced.|Mutations Mutations Mutations|do not|have "have|""weird" """weird" """weird|structures""" "structures""" "structures""|a" a|point point|mutation mutation mutation|might might|start start start|with a|single single single|nucleotide nucleotide nucleotide|mismatch, mismatch, mismatch,|but but|those those|are are|rapidly rapidly rapidly|detected detected detected|and and|repaired repaired repaired|to to|form form form|a a|stable stable stable|bonded bonded bonded|double-helix double-helix double-helix|structure, structure, structure,|and and|subsequent subsequent subsequent|rounds rounds rounds|of of|DNA DNA|replication replication replication|match match match|each each each|base base base|with with|its its|complement. complement. complement.|Perhaps Perhaps Perhaps|your your|wording wording|was was|wrong, wrong, wrong,|perhaps perhaps perhaps|you you|were were|thinking thinking thinking|of of|an an|obscure obscure obscure|related related related|technology technology technology|that have|heard heard|of, of, of,|but but|you you|didn't didn't|give give give|a a|reference reference reference|and and|I'm not|going going going|to to|help help|you you|with with|this, this,|because because|you're you're|being being|rude. rude. rude.|I I|find find|it it|disturbing disturbing disturbing|that you|apparently apparently apparently|made made|this this|scientific scientific scientific|page page|on on|wikipedia wikipedia wikipedia|claiming claiming claiming|a a|statement statement statement|of of|fact fact|that that|was was|in in|merely merely|based based based|on on|your your|own own own|speculations. speculations. wiki wiki|shold shold shold|dye!they dye!they dye!they|should be|ashame!j ashame!j I|suggest suggest suggest|you you|kill kill kill|yourself. Yes, Yes,|I I|was was|blocked blocked blocked|for for|losing losing losing|patience patience|with with|you, you, you,|and and|what what|I did|then then|would would|constitute constitute constitute|personal personal|attack. attack. attack.|Honest Honest Honest|outspoken outspoken outspoken|criticism criticism criticism|that is|based on|fact fact|is is|permitted permitted permitted|though, though,|and the|shameless shameless shameless|hate hate hate|speech speech speech|expressed expressed|here here|deserves deserves deserves|more more|than than than|just just|vocal vocal vocal|criticism. criticism. criticism.|As for|you, you,|I'll I'll I'll|discuss discuss discuss|you you|elsewhere. elsewhere. elsewhere.|This This|isn't isn't isn't|the the|place place|for for|that. that. Get Get|yourself yourself yourself|some some|help. ==|regarding regarding regarding|threats threats threats|== ==|is not|revert revert|of of|person's person's person's|edits, edits, edits,|only only|unwarranted unwarranted unwarranted|edit edit|by by|bot. bot. bot.|appeal appeal appeal|has been|made made|to to|bot bot bot|but but|presumption presumption presumption|of of|guilt guilt guilt|on on|part part part|of of|administrative administrative administrative|base base|is is|sign sign sign|of of|censorship censorship censorship|so so|made made|edits edits|again again|to see|if if|reversion reversion reversion|would would|occur occur occur|second second second|time. time.|has has|not. not. not.|please please|keep keep|baseless baseless baseless|threats threats|to to|self, self, self,|vulgar vulgar vulgar|pedant. pedant. Alright, Alright,|your your|lack lack lack|of fact|checking checking checking|and and|denial denial denial|of of|truth truth truth|is is|pathetic, pathetic, pathetic,|especially by|your your|staff. staff. staff.|Stop Stop|making making making|comments, comments, comments,|just just|to to|harass harass harass|me. me.|You You|are are|assuming assuming assuming|I'm I'm|everyone everyone everyone|who who|doesn't doesn't|agree agree agree|with with|your your|wiki wiki|article. article. article.|Pathetic. Pathetic. Pathetic.|I I|will will|continue continue continue|to to|report report report|them them|until until|your your|competent competent competent|employees employees employees|do do|the the|right right|thing. thing. Telling Telling|that you|wouldn't wouldn't wouldn't|answer answer answer|my my|question. question. question.|You are|a a|hypocrit hypocrit hypocrit|as as|anyone anyone anyone|can can|see ==|YOUR YOUR YOUR|INFORMATIONS INFORMATIONS INFORMATIONS|ARE ARE ARE|MISLEADING MISLEADING MISLEADING|AND AND|FULL FULL FULL|OF OF OF|ERRORS. ERRORS. ERRORS.|== ERRORS.|IF IF|THIS THIS THIS|IS IS|THE THE THE|WAY WAY WAY|YOU YOU YOU|SERVE SERVE SERVE|PEOPLE, PEOPLE, PEOPLE,|I I|PITY PITY PITY|THEM THEM THEM|FOR FOR FOR|BEING BEING BEING|BRAINWASHED BRAINWASHED BRAINWASHED|WITH WITH WITH|LIES LIES LIES|OF OF|YOU. YOU. AND|I I|EVEN EVEN EVEN|PUT PUT|A A|LINK LINK LINK|TO TO|A A|HIGHLIGHTS HIGHLIGHTS HIGHLIGHTS|VIDEO VIDEO VIDEO|ON ON ON|YOUTUBE YOUTUBE Wind Wind|in the|Sahara Sahara Sahara|rawks, rawks, rawks,|too. too. too.|Much Much Much|more more|accessible accessible accessible|than than|7 7 7|pillars. pillars. "::Excellent," "::Excellent,|thanks" for|looking looking looking|into into into|it. it.|Some Some Some|socks socks socks|are are|quite quite quite|dumb... dumb... Hypocrit! Hypocrit!|you you|just just|cited cited|a a|newspaper newspaper newspaper|that that|claims claims claims|to be|reliable. reliable. reliable.|i i|will will|incorporate incorporate incorporate|and and|make make|a newspaper|company company company|then then|ill ill ill|site site|it. it.|its its|called called called|TEADRINKERNEWS.com TEADRINKERNEWS.com TEADRINKERNEWS.com|this site|has has|no no no|merit merit merit|and and|you have|no no|integrity! integrity! ==|Conflict Conflict Conflict|of of|interest interest interest|== ==|You a|person person|who is|doing doing doing|some some|sort sort sort|of of|harm harm harm|to to|this this|lady lady lady|Saman Saman Saman|Hasnain.. Hasnain.. Hasnain..|It is|apparent apparent apparent|that are|making making|sure sure|that that|her her her|name name name|is is|defamed.... defamed.... defamed....|Okay Okay Okay|no no|problem... problem... problem...|Will Will Will|get get|a a|better better better|source... source... source...|you are|playing playing playing|dirty... dirty... dirty...|DOG DOG DOG|Sonisona Sonisona REALLY REALLY|REALLY REALLY|ANGRY ANGRY ANGRY|NOW NOW NOW|GRRRRRRRRRRRR GRRRRRRRRRRRR "::I" "::I|also" also|found found found|use use|of the|word word "word|""humanists""" """humanists""" """humanists""|confusing." confusing. confusing.|The The|types of|people people|listed listed|preceding preceding "preceding|""humanists""" """humanists""|are" are|defined defined defined|by by|what what|they they|*do* *do* *do*|(i.e. (i.e. (i.e.|study, study, study,|teach, teach, teach,|do do|medical medical medical|research) research) research)|which which|makes makes makes|sense sense sense|in the|context context context|of of|talking talking talking|about the|commonplace commonplace commonplace|book book book|as as|one of|their their|tools. tools. "tools.|""Humanists""" """Humanists""" """Humanists""|defines" defines defines|people people|of of|a a|certain certain certain|ethical ethical ethical|ideologywhat ideologywhat ideologywhat|does does|that that|have with|the the|function function function|of a|commonplace commonplace|book? book? book?|Is Is Is|the the|use book|particularly particularly particularly|defined by|one's one's one's|world world world|perspective? perspective? perspective?|To To|me me|this this|would would|be be|akin akin akin|to to|writing "writing|""many" """many" """many|blogs" blogs blogs|are are|maintained maintained maintained|by by|writers, writers, writers,|professors, professors, professors,|lawyers, lawyers, lawyers,|editorialists, editorialists, editorialists,|and "and|Republicans/Democrats""" "Republicans/Democrats""" "Republicans/Democrats""|in" about|blogs. blogs. blogs.|True True True|though though though|it it|may may|be, be, be,|it it|confuses confuses confuses|the the|reader reader reader|into into|thinking thinking|that subject|being being|written written|about about|is is|somehow somehow somehow|ideologically ideologically ideologically|specific specific|when when|it is|not. ":the" ":the|category" category category|was was|unnecesary, unnecesary, unnecesary,|as as|explained explained explained|in my|edit edit|summary. summary. summary.|Your Your Your|threats threats|are are|disgrace disgrace disgrace|to to|wikipedia. wikipedia. I|hate hate|you. you.|== you.|I hate|you! you! ==Drovers' ==Drovers'|Award== Award== Award==|Better Better Better|you you|hear hear hear|it it|from from|me, me, me,|and and|early, early, early,|I "I|suppose:" "suppose:" "suppose:|The" The|Wikipedia Wikipedia|logo logo logo|is "is|""All" """All" """All|Rights" Rights Rights|Reserved, Reserved, Reserved,|Wikimedia Wikimedia Wikimedia|Foundation, Foundation, "Foundation,|Inc.""," "Inc.""," "Inc."",|and" and|use of|it is|governed governed governed|by by|the the|Wikimedia Wikimedia|visual visual visual|identity identity identity|guidelines, guidelines, guidelines,|which which|states states states|that "that|""no" """no" """no|derivative" derivative derivative|of Wikimedia|logo logo|can be|published published published|without without|prior prior prior|approval approval approval|from from|the "the|Foundation.""" "Foundation.""" Please|stop. stop. stop.|If you|continue to|vandalize vandalize vandalize|Wikipedia, Wikipedia,|you you|will will|be be|blocked blocked|from from|editing. editing. editing.|| | ==|removing removing removing|a a|deletion deletion|review?!? review?!? review?!?|== "==|WP:SNOW" "WP:SNOW" "WP:SNOW|doesn't" doesn't|apply apply apply|to to|my my|deletion deletion|review review review|since since since|the the|issue issue issue|is is|controversial. controversial. Oooooh Oooooh|thank thank thank|you you|Mr. Mr. Mr.|DietLimeCola. DietLimeCola. DietLimeCola.|Once Once|again, again, again,|nice nice nice|job job job|trying trying trying|to to|pretend pretend pretend|you have|some some|authority authority authority|over over|anybody anybody anybody|here. here.|You a|wannabe wannabe wannabe|admin, admin, admin,|which which|is is|even even even|sadder sadder sadder|than than|a a|real real real|admin admin Grow Grow|up up up|you you|biased biased biased|child. child. ":Saved" ":Saved|without" without|renaming; renaming; renaming;|marked marked marked|for for|rapid rapid rapid|del. del. ==Terrible== ==Terrible==|Anyone Anyone Anyone|else else else|agree agree|this this|list list list|is is|garbage? garbage? ==|DON'T DON'T DON'T|INTERFERE! INTERFERE! INTERFERE!|== ==|Look, Look, Look,|I am|telling telling "telling|you:" "you:" "you:|YOU" YOU|DON'T DON'T|INTERFERE INTERFERE INTERFERE|between between between|me me|and and|Ohnoitsjamie. Ohnoitsjamie. Ohnoitsjamie.|He He|is a|filthy filthy filthy|hog, hog, hog,|an an|oldest oldest oldest|enemy, enemy, enemy,|and and|i i|can can|go go|to to|any any|extent extent extent|to to|insult insult insult|him him him|to the|fullest fullest fullest|extent. extent. extent.|So So|be be|a a|good good good|boy, boy, boy,|and and|eat eat eat|potato potato potato|crisps crisps crisps|(Yummy... (Yummy... (Yummy...|yummy yummy yummy|... ... ...|munch munch munch|crunch. crunch. crunch.|- - ":Going" ":Going|by" by|immediate immediate immediate|place place|of of|origin origin origin|is is|much much much|more more|in in|keeping keeping keeping|with the|definition definition definition|of "of|""Hispanic" """Hispanic" """Hispanic|or" "or|Latino""." "Latino""." "Latino"".|You're" You're You're|acting acting acting|in in|good good|faith, faith, faith,|obviously, obviously, obviously,|but but|claiming claiming|every every|Hispanic/Latino Hispanic/Latino Hispanic/Latino|person person|based on|ancestry ancestry ancestry|is is|too too too|OR, OR, OR,|too too|subjective, subjective, subjective,|as as|can be|seen seen seen|from from|all all all|that that|explaining explaining|you've you've you've|had had had|to to|do. do. do.|There There|is a|way way way|to to|include include include|these these these|people people|we're we're "we're|discussing:" "discussing:" "discussing:|with" the|support support support|of of|reliable reliable reliable|sources sources sources|that that|refer refer refer|to to|them them|as as|Hispanic Hispanic Hispanic|or or|Latino, Latino, Latino,|something something|that that|ideally ideally ideally|should be|done done|for for|everyone everyone|on the|list. list. ==|Pathetic Pathetic Pathetic|== ==|This This|user user user|needs needs needs|a a|life life See See|the the|section section|below below|about the|Macedonian Macedonian Macedonian|last last|names, names, names,|and and|common common common|endings endings endings|of names,|as as|well well well|some some|common last|names names names|in the|Slavic Slavic Slavic|Languages. Languages. Hauskalainen|Tom]] Hauskalainen|Tom]]|RFC RFC RFC|Response Response Response|The "The|""criticism""" """criticism""" """criticism""|section" section|reads reads reads|like a|POV POV|essay essay essay|without without|adequate adequate adequate|references. references. references.|I have|added added|the the|appropriate appropriate appropriate|tag. tag. "tag.|[[User:" "[[User:" And, And,|frankly, frankly, frankly,|you are|just just|as as|pathetic pathetic pathetic|and and|immature, immature, immature,|clearly clearly clearly|these these|acts acts acts|of of|annoyance annoyance annoyance|are are|your your|favourite favourite favourite|past past past|time. She's She's|insane insane insane|and and|a a|zealot. zealot. ":" ":|I" I|know know know|you you|listed listed|your your|English English English|as as|on "the|""level" """level" """level|2""," "2""," "2"",|but" don't|worry, worry, worry,|you you|seem be|doing doing|nicely nicely nicely|otherwise, otherwise, otherwise,|judging judging judging|by the|same same same|page page|- -|so so|don't don't|be be|taken taken taken|aback. aback. aback.|I I|just just|wanted wanted wanted|to to|know know|if were|aware aware aware|of of|what what|you you|wrote, wrote, wrote,|and and|think think|it's it's it's|an an|interesting interesting|case. case. "case.|:" I|would would|write write write|that that|sentence sentence sentence|simply simply simply|as "as|""Theoretically" """Theoretically" """Theoretically|I" an|altruist, altruist, altruist,|but but|only only|by by|word, word, word,|not not|by by|my "my|actions.""." "actions.""." "actions."".|:" ":|PS." PS. PS.|You You|can can|reply reply reply|to to|me me|on on|this this|same same|page, page, page,|as as|I have|it it|on my|watchlist. watchlist. ==|A A|bit bit bit|of of|education education education|for for|you... you... you...|== ==|Here Here Here|is the|link to|Bay Bay Bay|Lake, Lake, Lake,|Florida. Florida. Florida.|Now, Now, Now,|what what|was was|that were|saying saying|about about|it it|NOT NOT NOT|being being|a a|city? city? city?|Educate Educate Educate|yourself yourself|a a|bit bit|before you|make make|such such such|ludicrous ludicrous ludicrous|ignorant ignorant ignorant|comments comments a|CHEATER, CHEATER, CHEATER,|and article|should should|say say|that. "::" "::|a.k.a." a.k.a. a.k.a.|(among (among (among|others) others) others)|can't can't|even even|get get|the the|air air air|dates dates dates|right, right, right,|and the|rest rest rest|is POV|that is|well-covered well-covered well-covered|in the|interesting interesting|book book|I I|cited, cited, cited,|Hollywood Hollywood Hollywood|Kryptonite. Kryptonite. "Kryptonite.|""These""" """These""" """These""|users" users users|also also|cannot cannot cannot|write write|proper proper proper|English, English, English,|which is|what what|gives gives gives|away away away|that "that|""they""" """they""" """they""|are" are|the same|user, user, user,|despite despite "despite|""their""" """their""" """their""|denials." denials. denials.|==Reply ==Reply ==Reply|to to|vandal vandal vandal|Wakkeenah== Wakkeenah== Wakkeenah==|To To|all all|the the|vandals vandals vandals|and and|so so|called called|just just|administrators, administrators, administrators,|the dates|are are|minor minor minor|problems, problems, problems,|the the|facts facts|and and|details details details|surrounding surrounding surrounding|Reeves Reeves Reeves|suicided suicided suicided|are written|well well|enough, enough, enough,|as as|everybody everybody everybody|else else|is is|reporting, reporting, reporting,|the the|fact that|Reeves Reeves|was was|to to|fight fight fight|Moore Moore Moore|next next next|day, day, day,|is also|being being|reverted, reverted, reverted,|this is|pure pure pure|vandalism. vandalism.|As As|far far|as as|spelling spelling spelling|goes goes goes|by by|Vesa Vesa Vesa|or or|Projects Projects Projects|or or|whoever, whoever, whoever,|well, well, well,|if you|keep keep|on on|repeating repeating repeating|yourself yourself|and no|time, time,|some some|spelling spelling|errors errors errors|might might|occur, occur, occur,|but but|it's it's|not not|the the|spelling spelling|that that|counts counts counts|but but|content content|which being|vandalised vandalised vandalised|by by|so just|users users|and and|administrators administrators administrators|of of|this this|so just|wikipedia. wikipedia.|And And And|it is|obvious obvious obvious|wahkeenah wahkeenah wahkeenah|has has|some some|personal personal|interest interest|in in|this, "this,|proof:" "proof:" "proof:|All" All All|over over|internet internet internet|we we|have have|Reeves' Reeves' Reeves'|death death death|explained in|detail detail detail|and and|possible possible possible|people people|involved, involved, involved,|but but|over here|he he|is is|taking taking taking|everything everything everything|down, down, down,|the the|idiotic idiotic idiotic|administratotors administratotors administratotors|are are|reversing reversing reversing|it, it, it,|thus thus thus|making making|themselves themselves themselves|look look|stupid stupid stupid|and and|ignorant ignorant|by by|not not|realizing realizing realizing|the the|historical historical historical|facts. ==|Ridiculous Ridiculous Ridiculous|== ==|It's It's It's|absolutely absolutely absolutely|RIDICULOUS RIDICULOUS RIDICULOUS|how how|long long long|and and|detailed detailed detailed|this this|article article|is. is. is.|This is|why why|Wikipedia Wikipedia|is is|laughed laughed laughed|at at|and and|why why|teachers teachers teachers|won't won't|allow allow allow|Wikipedia Wikipedia|to be|used used used|in in|schoolwork schoolwork schoolwork|1)the 1)the 1)the||diots |diots |diots|writing writing|this article|are are|trying to|demonize demonize demonize|certain certain|groups groups groups|and and|2) 2) 2)|they're they're they're|trying to|revise revise revise|the facts|of the|incident incident incident|to make|it it|seem seem|something it|wasn't. wasn't. "::I|agree." agree. agree.|Trolling Trolling Trolling|snitches snitches snitches|should be|protected. protected. protected.|Where Where Where|are are|these these|days days days|when when|crybabies crybabies crybabies|just just|haven't haven't haven't|been been|payed payed payed|attention attention attention|to to|? ? ?|Eh, Eh, Eh,|I'm I'm|waxing waxing waxing|nostalgic.... nostalgic.... ==Fixed== ==Fixed==|Hi, Hi, Hi,|I I|fixed fixed fixed|up up|the the|Religion Religion Religion|in in|Vietnam Vietnam Vietnam|lead lead lead|with with|atheism atheism atheism|as as|state state state|religion religion religion|first first|as as|per per per|your your|request, request, request,|please please|take take take|a a|look. look. look.|The The|disparity disparity disparity|in the|pie pie pie|chart chart chart|seems seems|mainly mainly mainly|caused caused caused|by by|that that|US US US|institute institute institute|counting counting counting|45% 45% 45%|ancestor ancestor ancestor|worship worship worship|and and|traditional traditional traditional|beliefs beliefs beliefs|as as|religion, religion, religion,|wheras wheras wheras|officially officially officially|that that|45% 45%|are are|non-believers. non-believers. non-believers.|It's It's|a a|grey grey grey|area... area... area...|Second Second "Second|question:" "question:" "question:|What" What What|do do|you think|is is|better better|title title|chữ chữ chữ|nho nho nho|or or|chữ chữ|Hán? Hán? Hán?|To To|my my|mind mind mind|chữ chữ|Hán Hán Hán|can can|still still|include include|Japanese Japanese Japanese|and and|Chinese, Chinese, Chinese,|but but|chữ nho|is is|clearly clearly|Vietnamese-only, Vietnamese-only, Vietnamese-only,|and and|is what|Lonely Lonely Lonely|Planet Planet Planet|uses. uses. uses.|Do Do Do|you any|view? view? view?|Cheers! Cheers! "::You" "::You|should" be|ashamed ashamed ashamed|of of|yourself yourself|for for|wasting wasting wasting|adults' adults' adults'|time, time,|you you|ridiculous ridiculous ridiculous|runt. runt. Good|god, god, god,|you you|wiped wiped wiped|out out|my my|post post post|just just|now. now. now.|You You|can't even|speak speak speak|in in|coherent coherent coherent|sentences. sentences. sentences.|Bascially, Bascially, Bascially,|you've you've|been been|busted. busted. "::::I've" "::::I've|explained" explained|beneath beneath beneath|your your|unblock unblock unblock|request request request|that I|do not|feel feel feel|comfortable comfortable comfortable|with your|proclamation. proclamation. proclamation.|You You|indicated indicated indicated|that you|did not|realize realize realize|Banglapedia Banglapedia Banglapedia|was a|copyrighted copyrighted copyrighted|source. source. source.|This This|source source|bears bears bears|copyright copyright copyright|notice notice notice|on on|every every|page. page.|How How How|can can|we we|be be|certain, certain, certain,|given given given|that, that, that,|that will|not not|copy copy copy|from from|other other|copyrighted copyrighted|sources sources|without without|noticing noticing noticing|that that|they they|cannot cannot|be be|used? used? used?|I I|myself myself myself|do comfortable|unblocking unblocking unblocking|you you|until until|you you|promise promise promise|not to|copy from|any any|source source|that you|cannot cannot|prove prove|to be|without without|copyright copyright|restriction. restriction. ":|Good" Good|grief grief grief|have have|you you|nothing nothing|useful useful useful|to your|time? time? time?|Oh Oh Oh|well, well,|I'll I'll|add add|you you|to list.|Fool Fool SOMETHING SOMETHING|AWFUL AWFUL AWFUL|IS IS|DEAD DEAD DEAD|DEAD ==|To To|the the|contributors contributors contributors|of article|== ==|Anonymiss Anonymiss Anonymiss|Madchen Madchen Madchen|has has|given given|you you|a a|cookie! cookie! cookie!|Cookies Cookies Cookies|promote promote promote|WikiLove WikiLove WikiLove|and and|hopefully hopefully hopefully|this this|one one|has has|made made|your your|day day day|better. better. better.|You can|Spread Spread Spread|the "the|""WikiLove""" """WikiLove""" """WikiLove""|by" by|giving giving giving|someone someone someone|else else|a a|cookie, cookie, cookie,|whether whether whether|it be|someone someone|you have|had had|disagreements disagreements disagreements|with with|in the|past past|or or|a good|friend. friend. friend.|To To|spread spread spread|the the|goodness goodness goodness|of of|cookies, cookies, cookies,|you can|add add|to to|someone's someone's someone's|talk page|with a|friendly friendly friendly|message, message, message,|or or|eat eat|this this|cookie cookie cookie|on the|giver's giver's giver's|talk with|! ! !|Thank Thank Thank|you you|for for|your your|hard hard hard|work, work, work,|and and|sorry sorry sorry|about about|rough rough rough|times times times|in the|past. past. past.|I'm I'm|going to|go go|edit edit|other other|articles articles|now. "now.|:" ==|get life|loser. loser. loser.|== ":::::Actually," ":::::Actually,|you" the|cockroach cockroach cockroach|that that|followed followed followed|me me|to the|notice notice|board, board, board,|and and|repeatedly repeatedly repeatedly|comes comes comes|back back back|to to|revert revert|what I|had had|written. written. written.|FYI. FYI. FYI.|206.45.24.242 206.45.24.242 206.45.24.242|(talk) (talk) I|believe believe|your your|actions actions actions|to be|pure pure|vandalism vandalism vandalism|either either either|based on|pig pig pig|ignorant, ignorant, ignorant,|racism racism racism|or or|because because|you are|being being|paid paid paid|to do|so. so. so.|But But|if if|no no|one one|else else|agrees agrees agrees|enjoy. enjoy. enjoy.|It's It's|more more|likely likely likely|no else|cares cares cares|either either|way way|you will|reduce reduce reduce|this a|stub stub stub|or or|start start|supporting supporting supporting|your own|prejudices prejudices prejudices|here. here.|It's It's|only only|wiki wiki|grow grow grow|up up|son. son. son.|This not|a a|conversation. conversation. conversation.|The The|promise promise|was a|ban ban|without without|farther farther farther|notice notice|so please|don't don't|give give|me me|any any|more more|notice notice|you you|pathetic pathetic|stooge stooge are|one the|worst worst worst|page page|vandals vandals|I have|ever ever ever|seen. seen. seen.|Your Your|repeated repeated repeated|vandalism vandalism|of a|user user|page page|shows shows shows|what what|a a|pathetically pathetically pathetically|insecure insecure insecure|individual individual individual|you you|are. are. ":::I" ":::I|think" think|the the|apple apple apple|pie pie|image image|is is|pretty pretty pretty|dated. dated. dated.|The The|expression expression "expression|""as" """as" """as|American" American American|as as|apple "apple|pie""" "pie""" "pie""|is" is|dated dated dated|and and|baseball's baseball's baseball's|no no|longer longer longer|the the|most most most|popular popular popular|sport sport sport|in the|US US|(football (football (football|is). is). is).|Plus, Plus, Plus,|it's it's|sort of|weird weird weird|having having|them them|on the|flag. flag. flag.|- ME ME|IF IF|YOU YOU|PROTECT PROTECT PROTECT|THIS THIS|PAGE PAGE PAGE|I'M I'M I'M|GONNA GONNA GONNA|KILL KILL KILL|YOUR YOUR|USER USER USER|PAGE PAGE|TOMORROW TOMORROW TOMORROW|MORNING MORNING ":::Ok," ":::Ok,|whatever," whatever, whatever,|but but|if if|this this|separate separate separate|Frankish Frankish Frankish|province province province|existed existed existed|as as|such, such, such,|then then|I I|still still|believe believe|that it|should included|as as|separate separate|entry entry entry|into into|disambiguation disambiguation disambiguation|page, page,|but I|can can|live live live|with the|current current current|version version version|of page|as threatening|me, me,|buddy? buddy? buddy?|I didn't|do do|anything anything|to to|you! you!|And And|like like|I I|care care care|about about|editing editing editing|Wikipedia. Wikipedia.|Loser. Loser. ==|April April April|2009 2009 2009|== ==|Please not|attack attack attack|other other|editors. editors. editors.|If you|continue, continue, continue,|you from|editing "Wikipedia.|:If" ":If" ":If|this" a|shared shared shared|IP IP|address, address, address,|and didn't|make make|any any|unconstructive unconstructive unconstructive|edits, edits,|consider consider consider|creating creating|an an|account account account|for for|yourself yourself|so so|you can|avoid avoid avoid|further further further|irrelevant irrelevant irrelevant|warnings. warnings. ==|HOW HOW HOW|DARE DARE DARE|YOU, YOU, YOU,|HOW DARE|YOU YOU|KUBIGULA, KUBIGULA, KUBIGULA,|HOW DARE|YOU!!!!!!!!!!!! YOU!!!!!!!!!!!! YOU!!!!!!!!!!!!|== YOU|DELETE DELETE DELETE|BRILLIANT BRILLIANT BRILLIANT|ARTICLE ARTICLE ARTICLE|ON ON|NILLIAM NILLIAM "NILLIAM|""THE" """THE" """THE|PHENOMENA""" "PHENOMENA""" "PHENOMENA""|TOWNSIRIS" TOWNSIRIS TOWNSIRIS|I I|CAN CAN CAN|SENSE SENSE SENSE|A A|PRESENCE PRESENCE PRESENCE|ABOUT ABOUT ABOUT|YOU YOU|BOY, BOY, BOY,|AN AN AN|EVIL EVIL EVIL|PRESENCE, PRESENCE, PRESENCE,|MAY MAY MAY|THE THE|FORCE FORCE FORCE|FROM FROM FROM|THE THE|SPIRIT SPIRIT SPIRIT|OF OF|A A|SEAHORSE SEAHORSE SEAHORSE|UNLEASH UNLEASH UNLEASH|THE THE|EXPECTO EXPECTO EXPECTO|PATRONUM PATRONUM PATRONUM|UPON UPON UPON|YOU, YOU,|YOU YOU|MUST MUST MUST|EXPRESS EXPRESS EXPRESS|KINDNESS KINDNESS KINDNESS|TO TO|NILLIAM NILLIAM|TOWNSIRIS, TOWNSIRIS, TOWNSIRIS,|FOR FOR|HE HE HE|IS IS|OUR OUR OUR|SAVIOUR, SAVIOUR, SAVIOUR,|THE THE|ANSWER ANSWER ANSWER|TO TO|OUR OUR|ULLILOQUITY. ULLILOQUITY. ULLILOQUITY.|IF YOU|AS AS AS|SO SO SO|MUCH MUCH MUCH|BLINK BLINK BLINK|WHEN WHEN WHEN|READING READING READING|THE THE|NEXT NEXT NEXT|ARTICLE, ARTICLE, ARTICLE,|THEN THEN THEN|YOU YOU|WILL WILL|JUST JUST JUST|MISS MISS MISS|OUT OUT OUT|THERE THERE|TIGER. TIGER. , ,|16 16 16|August August August|2008 2008 2008|(UTC) (UTC) (UTC)|*I'm *I'm *I'm|terribly terribly terribly|disappointed disappointed disappointed|by by|this. this.|There There|are are|enough enough enough|disagreeable disagreeable disagreeable|people people|on on|wikipedia. wikipedia.|I I|sincerely sincerely sincerely|hope hope hope|you you|change change|your your|mind mind|again again|and and|retire, retire, retire,|again. again.|You You|suck. suck. "suck.|14:23" "14:23" ==|Blind Blind Blind|as as|bats bats bats|== ==|Not Not Not|one you|has has|seen seen|what have|done done|to this|page. page.|Obviously Obviously Obviously|you you|rely rely rely|on on|some some|form form|of of|program program program|to revert|vandalism vandalism|and and|not not|your own|eyes. eyes. just|Jealous Jealous Jealous|== ==|that you|aren't aren't aren't|a a|part the|GAYTOURAGE... GAYTOURAGE... GAYTOURAGE...|you you|probably probably probably|don't don't|even even|now now now|how how|to to|WERQ WERQ WERQ|it! it! it!|Megna Megna Megna|James James I|hope hope|this this|helps. helps. "::I|did" did|provide provide provide|a a|notable notable notable|source source|for the|references references references|I was|providinga providinga providinga|book book|written written|by a|respected respected respected|journalist journalist journalist|from a|patient's patient's patient's|perspective. perspective. perspective.|I I|created created created|a a|separate separate|article article|for for|it, it,|with with|tons tons tons|of of|references, references, references,|and and|merely merely|put put|a reference|to to|it it|under under|See See|Also. Also. Also.|You You|deleted deleted|even even|that that|because because|it's it's|allegedly allegedly allegedly|an "an|""obscure" """obscure" """obscure|anti-psychiatry" anti-psychiatry "anti-psychiatry|book.""" "book.""" "book.""|The" The|fact are|biased biased|because have|vested vested vested|interests interests interests|to to|protect. protect. protect.|It is|people people|like who|make make|sure sure|the the|truth truth|never never|becomes becomes becomes|known known known|because it|would would|endanger endanger endanger|your your|pocketbook. pocketbook. ==Hello== ==Hello==|I to|let let let|you you|know know|how how|you a|nicer nicer nicer|person person|through through through|therapy therapy therapy|and and|talking about|your your|past past|experiences experiences experiences|that that|led led led|you be|an an|angry angry angry|antisocial antisocial antisocial|person person|today. today. Yes,|and and|this this|page page|is is|wayyyyy wayyyyy wayyyyy|too too|long long|as well.|It It|really really|needs needs|to be|condensed condensed condensed|heavily. heavily. heavily.|There are|much more|important important important|shows shows|that that|don't don't|have a|tenth tenth tenth|of what|this article|has. has. has.|Shame. Shame. ==Image ==Image|copyright copyright|problem problem problem|with "with|Image:KissBOTI.jpg==" "Image:KissBOTI.jpg==" "Image:KissBOTI.jpg==|Thank" for|uploading uploading "uploading|Image:KissBOTI.jpg." "Image:KissBOTI.jpg." "Image:KissBOTI.jpg.|However," However, However,|it it|currently currently currently|is is|missing missing missing|information information|on on|its its|copyright copyright|status. status. status.|Wikipedia Wikipedia|takes takes takes|copyright copyright|very very very|seriously. seriously. seriously.|It It|may deleted|soon, soon, soon,|unless unless unless|we we|can can|determine determine determine|the the|license license license|and source|of the|image. image. image.|If know|this this|information, information, information,|then then|you add|a a|copyright copyright|tag tag|to image|description description description|page. page.|If any|questions, questions, questions,|please please|feel feel|free to|ask ask ask|them them|at the|media media|copyright copyright|questions questions|page. page.|Thanks Thanks Thanks|again again|for your|cooperation. cooperation. Thanx Thanx|efe, efe, efe,|i i|noticed noticed noticed|you you|remove remove|800 800 800|bytes bytes bytes|of of|info info|on my|watchlist watchlist watchlist|so so|i i|went went went|into into|red red red|alert alert alert|but good|call. call. ==|Woah! Woah! Woah!|== ==|As As|someone someone|who'd who'd who'd|been been|the the|victim victim victim|of of|his his his|power power power|abuse, abuse, abuse,|this this|*really* *really* *really*|came came|as a|surprise surprise surprise|to me|when when|someone someone|e-mailed e-mailed e-mailed|this this|info info|to this|morning! morning! morning!|Sorry Sorry Sorry|he he|couldn't couldn't couldn't|be be|more more|adult adult adult|with with|his his|admin admin|powers, powers, powers,|but but|as as|Stan Stan Stan|Lee Lee Lee|said said|over over|four four|decades decades decades|ago, ago, ago,|with with|great great great|power power|comes comes|great great|responsibility. responsibility. responsibility.|Of Of Of|course, course, course,|the the|big big big|question question question|now now|is is|who who|Matthew Matthew Matthew|Fenton Fenton Fenton|will will|run run run|and and|hide hide hide|behind behind behind|when when|he he|gets gets gets|his his|head head head|handed handed handed|to to|him him|over over|his his|wanton wanton wanton|edits edits|of the|Jericho Jericho Jericho|and and|Lost Lost Lost|pages. pages. ==|Newsletter Newsletter Newsletter|== ==|Thanks Thanks|Indon. Indon. Indon.|I I|tried tried tried|to to|hide hide|it it|until the|delivery delivery delivery|day, day,|hehehhe. hehehhe. hehehhe.|Have Have Have|you you|seen seen|it it|before? before? before?|If If|not, not, not,|then done|a a|somewhat somewhat somewhat|good good|job job|of of|hiding hiding hiding|it it|P. P. P.|Cheers Cheers ==|List List List|of of|Malcolm Malcolm Malcolm|in the|Middle Middle Middle|characters characters characters|== ==|Your Your|addition addition|to to|List characters|was was|excellent. excellent. excellent.|Welcome! Welcome! OH OH|MY MY MY|just just|CALL CALL CALL|THEM THEM|ROCK ROCK ROCK|YOU YOU|IDIOTS!!!! IDIOTS!!!! ":::::::::" ":::::::::|I" am|not not|user user|168.209.97.34. 168.209.97.34. 168.209.97.34.|On On On|what what|basis basis basis|are you|acusing acusing acusing|me me|of of|being being|that that|user? user? user?|Please Please|answer answer|the the|very very|simple "simple|question:" "question:|Is" the|phrase phrase "phrase|""anti-Islamic" """anti-Islamic" """anti-Islamic|cut" cut cut|and and|past past|[sic] [sic] "[sic]|troll""" "troll""" "troll""|a" a|personal personal|attack attack|or or|is is|it personal|attack? attack? attack?|Do you|deem deem deem|this be|acceptable acceptable acceptable|language language language|on on|Wikipedia? Wikipedia? Wikipedia?|Pename Pename ":You" ":You|did" did|a a|great great|job job|in the|Bailando Bailando Bailando|por por por|un un un|sueño sueño sueño|(Argentina) (Argentina) (Argentina)|article. article.|Congratulations! Congratulations! ":|Saw" Saw Saw|your your|message message message|on my|homepage. homepage. homepage.|Is Is|there there|some some|reason reason reason|you you|don't like|my my|solution? solution? solution?|— — —|3 3 3|July July July|2005 2005 "2005|05:18" "05:18" "05:18|(UTC)" HHHHHHHHHHHHHHAAAAAAHAHA HHHHHHHHHHHHHHAAAAAAHAHA|you're you're|funny.. funny.. funny..|Na Na Na|seriously seriously seriously|dude. dude. dude.|I'm I'm|reallyyyyyyy reallyyyyyyy reallyyyyyyy|drunknnnk drunknnnk drunknnnk|but but|ya're ya're ya're|funny! funny! dont dont|u u u|speak speak|to me|like that|id id id|advise advise advise|u u|to to|watch watch watch|ur ur ur|mouth!! mouth!! ":You|call" call call|MacDonald's MacDonald's MacDonald's|a "your|""culture""?" """culture""?" """culture""?|Nonsense!" Nonsense! Nonsense!|Spend Spend Spend|some some|10 10 10|years years years|in in|France, France, France,|and and|then will|have a|hint hint hint|of what|Culture Culture Culture|is! is! "::""Somebody," "::""Somebody,|go" go|write "write|one.""" "one.""" "one.""|Do" Do|it it|yourself yourself|lazy. lazy. not|make make|personal personal|attacks. attacks. attacks.|Wikipedia Wikipedia|has has|a a|strict strict strict|policy policy policy|against against|personal attacks.|Attack Attack Attack|pages pages pages|and and|images images images|are not|tolerated tolerated tolerated|by by|Wikipedia Wikipedia|and and|are are|speedily speedily|deleted. deleted.|Users Users Users|who who|continue to|create create create|or or|repost repost repost|such such|pages and|images, images, images,|especially especially|those those|in in|violation violation violation|of of|our our|biographies biographies biographies|of of|living living living|persons persons persons|policy, policy, policy,|will Wikipedia.|Thank Thank|you. Thanks|for your|response response response|in in|this this|matter. matter. matter.|Our Our Our|plan plan plan|worke worke worke|like a|charm. charm. charm.|We We We|finally finally finally|got got|the article|negativity negativity negativity|under under|control control control|and then|got got|it it|protected! protected! "::This" "::This|is" is|ridiculous. ridiculous. "ridiculous.|::Aside" "::Aside" "::Aside|from" the|reference reference|not not|actually actually actually|calling calling|it it|a a|war war war|crime, crime, crime,|saying saying|that "that|""some""" """some""" """some""|characterize" characterize characterize|it it|as one|doesn't doesn't|make it|one. one. "one.|::War" "::War" "::War|crimes" crimes crimes|are are|serious serious serious|violations violations violations|of the|laws laws laws|of of|war. war. war.|The The|key key key|words words words|here here|are "are|""laws""" """laws""" """laws""|and" "and|""war.""" """war.""" """war.""|Unless" Unless Unless|one one|lives lives lives|in a|corrupt corrupt|town, town, town,|laws laws|are are|made made|by by|legislatures, legislatures, legislatures,|or or|in this|case case case|ratified ratified ratified|by by|them, them, them,|after after|being written|and and|argued argued argued|over over|by by|diplomats diplomats diplomats|in in|consultation consultation consultation|with with|their their|military's military's military's|generals. generals. generals.|The The|laws of|war war|were were|written written|with the|understanding understanding understanding|that that|killing killing killing|large large large|numbers numbers numbers|of people|may a|legitimate legitimate|and and|necessary necessary|part of|that that|process. process. process.|The not|written by|corrupt corrupt|and ignorant|peaceniks peaceniks peaceniks|sitting sitting sitting|around around|dreaming dreaming dreaming|up up|what they|think think|would be|moral. moral. "moral.|::I'm" "::I'm" "::I'm|deleting" deleting|this this|section. section. section.|It's It's|not not|salvageable. salvageable. "salvageable.|::" ==|Who Who Who|he he|really really|is is|== This|poor poor poor|guy guy|had had|his his|IP IP|stolen stolen stolen|by by|me. me.|Pwned! Pwned! Pwned!|Too Too Too|bad bad bad|his his|ISP ISP ISP|will will|permban permban permban|him. ==|POV POV|issue issue|== article|does not|tell tell|about laws|that that|require require require|boards boards boards|of of|directors, directors, directors,|typical typical typical|officers officers officers|on on|a a|board, board,|typical typical|educations, educations, educations,|experiences, experiences, experiences,|contacts, contacts, contacts,|etc. etc. etc.|of of|board board board|members. members. members.|There also|nothing history|of the|concept concept concept|of of|boards of|directors. directors. directors.|Almost Almost Almost|the the|entire entire entire|article article|is is|devoted devoted devoted|to to|pointing pointing pointing|out out|the the|alleged alleged alleged|shortcomings shortcomings shortcomings|of of|boards, boards, boards,|and and|none none none|of the|statements statements statements|have have|sources sources|to to|verify verify verify|them. them. them.|I'm I'm|tagging tagging tagging|this as|POV POV|until until|these these|issues issues issues|are are|resolved. resolved. I'm|Not Not|vandalizing. vandalizing. vandalizing.|You You|refuse refuse refuse|my my|evidence evidence evidence|on talk|area. area. area.|You be|blind blind blind|in in|your your|support a|Racist Racist Racist|who who|calls calls calls|for for|violence. violence. the|deranged deranged deranged|harrasser harrasser harrasser|here. You|and and|yours yours yours|are. are.|Project Project Project|your your|personality personality personality|onto onto onto|someone someone|else. Please|refrain from|making making|unconstructive unconstructive|edits edits|to to|Wikipedia, Wikipedia,|as as|you did|to to|Meat Meat Meat|grinder. grinder. grinder.|Your Your|edits edits|appear appear|to to|constitute constitute|vandalism have|been been|reverted. reverted. reverted.|If you|would would|like like|to to|experiment, experiment, experiment,|please please|use the|sandbox. sandbox. sandbox.|Thank you.|cab cab cab|(talk) "(talk)|:Don't" ":Don't" ":Don't|you" "you|mean:" "mean:" "mean:|'If" 'If 'If|you use|a a|condom. condom. condom.|Thank Thank|you.' you.' ":Nothing" ":Nothing|wrong" wrong|with with|that that|portrait, portrait, portrait,|but but|she she|was was|queen queen queen|for for|22 22 22|years, years, years,|mostly mostly mostly|as as|an an|adult. adult. adult.|It's It's|great great|for section|on on|her her|childhood. childhood. childhood.|Haven't Haven't Haven't|hade hade hade|time at|your English|yet yet yet|and and|help with|that, that,|if if|needed. needed. needed.|I don't|see why|you you|only only|took took took|this this|as as|criticism, criticism, criticism,|question question|my "my|""goal""" """goal""" """goal""|and" and|got got|so so|grumpy. grumpy. grumpy.|Of Of|course course course|all all|your your|positive positive positive|input input input|to is|appreciated appreciated appreciated|by by|everyone, everyone, everyone,|including including including|me. me.|I have|tried do|my my|bit bit|earlier. earlier. "::Thanks" "::Thanks|for" the|tip! tip! tip!|I've I've I've|been been|looking looking|at the|mediation mediation mediation|thing thing thing|a bit|already already already|- -|and and|suspect suspect suspect|you be|correct correct correct|that a|wholesale wholesale wholesale|revert revert|may be|the the|answer... answer... Only Only|a a|complete complete complete|loser loser loser|writes writes writes|a a|Wiki Wiki Wiki|profile profile profile|about about|themself! themself! themself!|5 5 5|July "2005|21:21" "21:21" "21:21|(UTC)" MY|CHANGES CHANGES CHANGES|DO DO DO|NOT NOT|AFFECT AFFECT AFFECT|ANY ANY ANY|OF OF|THE THE|CONCOCTED CONCOCTED CONCOCTED|OFFENSES OFFENSES OFFENSES|YOU YOU|HAVE HAVE HAVE|BROUGHT BROUGHT BROUGHT|UP! UP! "UP!|WP:NPOV" "WP:NPOV" "WP:NPOV|issues" issues|/ / /|synthesis synthesis "synthesis|WP:Verifiable" "WP:Verifiable" "WP:Verifiable|WP:OR" "WP:OR" "WP:OR|I" bring|your your|OWN OWN OWN|STANCE, STANCE, STANCE,|as as|being being|pro pro pro|orthodox orthodox orthodox|which which|in in|itself itself itself|is is|BIASED! BIASED! BIASED!|i i|am am|again again|going put|the the|changes changes changes|back back|on, on, on,|BECAUSE BECAUSE BECAUSE|I your|STANCE STANCE STANCE|IS IS|TO TO|PROTECT PROTECT|THE THE|CURRENT CURRENT CURRENT|SINGH SINGH SINGH|SABHA SABHA SABHA|ideological ideological ideological|stance stance stance|on on|sikhism, sikhism, sikhism,|WHICH WHICH WHICH|MEANS MEANS MEANS|that that|wikipedia wikipedia|ONLY ONLY ONLY|ACCEPTS ACCEPTS ACCEPTS|ORTHODOX ORTHODOX ORTHODOX|POV and|NOT NOT|unorthodox! unorthodox! unorthodox!|Which Which Which|means means means|going going|by OWN|judgment, judgment, judgment,|that the|CHRISTIAN CHRISTIAN CHRISTIAN|UNORTHODOX UNORTHODOX UNORTHODOX|CHURCH, CHURCH, CHURCH,|which which|exist, exist, exist,|on on|real real|life life|and and|on on|wiki, wiki, wiki,|HAS HAS HAS|NO NO|merit! merit! merit!|THAT THAT|IS IS|A A|BIASED BIASED BIASED|APPROACH! APPROACH! ==|HiDrNick HiDrNick HiDrNick|== ==|Present Present Present|for for|you you|fatty. fatty. fatty.|Relax. Relax. Relax.|don't don't|get get|too too|excited, excited, excited,|it's a|5000 5000 5000|Rhino Rhino Rhino|meal. meal. meal.|[] [] []|[] ==Unblock== ==Unblock==|Blocking Blocking Blocking|me me|will not|solve solve solve|anything. anything. anything.|I I|meant meant meant|what I|called called|that that|person person|and and|I I|shall shall shall|not not|take take|it back.|Today Today Today|he he|allows allows allows|himself himself himself|to to|deleate deleate deleate|all all|of our|images, images,|tommorow tommorow tommorow|all articles,|then then|he he|calls calls|us us us|second second|class class class|people. people. people.|Shame Shame Shame|on on|you for|giving giving|such such|users users|admin admin|rights. rights. rights.|See See|my my|messages messages messages|on "on|Wikipedia:Requests" "Wikipedia:Requests" "Wikipedia:Requests|for" for|comment/Lupo comment/Lupo ==|you you|know? know? know?|== I|already already|finish finish finish|the the|main main main|temple temple temple|structure. structure. structure.|whatever whatever whatever|you you|say, say, say,|arrogant arrogant arrogant|guy. guy. Waaaaahh Waaaaahh|erase erase erase|comments comments|on page|too, too, too,|do you|really really|think think|anybody anybody|is is|reading reading reading|this? this? this?|Are Are Are|you you|that that|insecure? insecure? "==|Wikipedia:Counter" "Wikipedia:Counter" "Wikipedia:Counter|Un-civility" Un-civility Un-civility|Unit Unit Unit|== Unit|is a|new new|wiki-project wiki-project wiki-project|I have|thought thought thought|up. up. up.|I was|wondering wondering wondering|if you|thought thought|it good|idea idea idea|and and|if you|wanted to|join join join|up. I|need need|some some|users users|backing backing backing|me me|before before|I I|construct construct construct|a a|wikiproject, wikiproject, wikiproject,|and to|share share share|my my|views views views|on on|subjects subjects subjects|such such|as as|concensus, concensus, concensus,|civilty, civilty, civilty,|etc. etc.|Reply Reply Reply|on my|talkpage talkpage talkpage|if if|you're you're|interested. interested. interested.|Thanks, Thanks, Thanks,|-MegamanZero|Talk -MegamanZero|Talk am|refering refering refering|to of|Chinese Chinese Chinese|languages languages languages|and and|dialects. dialects. A|rough rough|google google "google|tally:" "tally:" "tally:|*AIDS" *AIDS *AIDS|denialist denialist denialist|13,100 13,100 13,100|hits hits hits|*Big *Big *Big|Tobacco Tobacco Tobacco|denialist/ denialist/ denialist/|Big Big Big|Tobacco Tobacco|denialism denialism denialism|0 0 0|hits hits|*Holocaust *Holocaust *Holocaust|denialist denialist|486 486 486|hits *Holocaust|denier denier denier|306,000 306,000 306,000|hits hits|So So|there there|are are|486 hits|on on|Holocaust Holocaust Holocaust|denialists denialists denialists|who who|are are|getting getting getting|some personal|gain gain gain|from from|their their|denailism, denailism, denailism,|but but|306,000 306,000|google google|hits Holocaust|deniers deniers deniers|who not|getting getting|personal their|denialism? denialism? denialism?|Is Is|that that|what you|maintain? maintain? maintain?|And "And|""Big" """Big" """Big|Tobacco" "Tobacco|denialism""" "denialism""" "denialism""|actually" actually|gets gets|0 0|google hits|because is|so so|well well|known known|those those|denialists denialists|are are|doing doing|it it|for for|personal personal|gain? gain? gain?|And And|so so|on on|and so|forth. forth. forth.|This is|ludicrous. ludicrous. ludicrous.|Give Give Give|it it|up. ==|Taken Taken Taken|from from|Bell Bell Bell|X1 X1 X1|External External External|Links Links Links|section section|== ==|Bell X1|Flock Flock Flock|Album Album Album|Review Review Review|at at|WERS.org WERS.org WERS.org|• • ==|Goodbye Goodbye Goodbye|Cruel Cruel Cruel|World World World|== have|decided decided decided|to to|kill kill|myself. myself. myself.|My My My|Dad Dad Dad|died died died|two two|weeks weeks weeks|ago, ago,|and I|wish wish wish|to join|him. him.|I say|goodbye. goodbye. ==Kobe ==Kobe|Tai== Tai== Tai==|A A|proposed proposed proposed|deletion deletion|template template template|has been|added added|to article|Kobe Kobe Kobe|Tai, Tai, Tai,|suggesting suggesting suggesting|that deleted|according according according|to the|proposed deletion|process. process.|All All|contributions contributions contributions|are are|appreciated, appreciated, appreciated,|but but|this article|may may|not not|satisfy satisfy satisfy|Wikipedia's Wikipedia's Wikipedia's|criteria for|inclusion, inclusion, inclusion,|and the|deletion deletion|notice notice|should should|explain explain explain|why why|(see (see (see|also "also|""What" """What|Wikipedia" "is|not""" "not""" "not""|and" and|Wikipedia's Wikipedia's|deletion deletion|policy). policy). policy).|You may|prevent prevent prevent|the deletion|by by|removing removing|the the|notice, notice, notice,|but but|please please|explain you|disagree disagree disagree|with deletion|in your|edit edit|summary summary summary|or or|on its|talk talk|page. page.|Also, Also, Also,|please please|consider consider|improving improving improving|the to|address address address|the the|issues issues|raised. raised. raised.|Even Even Even|though though|removing notice|will will|prevent prevent|deletion deletion|through through|the deletion|process, process, process,|the may|still still|be deleted|if if|it it|matches matches matches|any deletion|criteria criteria|or or|it it|can be|sent sent sent|to to|Articles Articles Articles|for for|Deletion, Deletion, Deletion,|where where|it if|consensus consensus|to delete|is is|reached. reached. reached.|If you|agree deletion|of only|person who|has made|substantial substantial substantial|edits the|page, page,|please please|add of|Kobe Kobe|Tai. Tai. Tai.|'''''' '''''' ''''''|* * Yeah Yeah|thanks thanks|to to|however however however|did did|that because|now now|the the|stupid stupid|fish fish fish|guy guy|can can|get get|off off off|on on|stupid stupid|information information|Wrestlinglover420 Wrestlinglover420 Pss Pss|Rex, Rex, Rex,|be be|sure sure|to to|DOCUMENT DOCUMENT DOCUMENT|all the|things things things|you've you've|discovered discovered discovered|on the|John John|Kerry Kerry Kerry|page page|etc. etc.|It's It's|awesome awesome awesome|that I|INDEPENDENTLY INDEPENDENTLY INDEPENDENTLY|observed observed observed|(and (and (and|can can|corrorborate) corrorborate) corrorborate)|virtually virtually virtually|the the|exactsame exactsame exactsame|pattern pattern pattern|by by|these these|liberals. liberals. liberals.|Demonizing Demonizing Demonizing|conservatives; conservatives; conservatives;|lionizing lionizing lionizing|liberals. liberals.|It's It's|repeated repeated|ad ad ad|infinitum, infinitum, infinitum,|ad ad|nauseum. nauseum. nauseum.|The The|more more|proof proof proof|we we|have, have, have,|the the|easier easier easier|it it|will be|to to|persuade persuade persuade|all all|but but|their their|fellow fellow fellow|brain-dead brain-dead brain-dead|truth truth|haters haters haters|to to|give a|red red|cent cent cent|to to|Wikipedia. Wikipedia.|And, And,|until until|WHOLESALE WHOLESALE WHOLESALE|changes changes|are made|from top|down, down,|that's that's that's|exactly exactly exactly|what's what's what's|about about|to to|happen. happen. happen.|It's It's|almost almost almost|like like|this the|liberal's liberal's liberal's|religion. religion. religion.|Too bad|they're they're|gonna gonna gonna|have find|a a|church church church|other other|than than|Wikipedia to|practice practice practice|their their|faith, faith,|huh? huh? huh?|I've I've|heard heard|rumors rumors rumors|that that|my my|actions actions|are are|already already|sending sending sending|users users|Hippocrite, Hippocrite, Hippocrite,|Fred Fred Fred|Bauder, Bauder, Bauder,|WoohooKitty, WoohooKitty, WoohooKitty,|Kizzle, Kizzle, Kizzle,|FVW, FVW, FVW,|Derex Derex Derex|and and|especially especially|the the|pimply pimply pimply|faced faced faced|15 15 15|year year year|old old old|RedWolf RedWolf RedWolf|to to|become become become|so so|verklempt verklempt verklempt|they they|don't don't|know know|whether whether|to to|schedule schedule schedule|an an|appointement appointement appointement|with their|psychiatrist...or psychiatrist...or psychiatrist...or|their their|gynecologist. gynecologist. gynecologist.|Big Big|Daddy- Daddy- Daddy-|PHASE PHASE PHASE|II II II|Dry Dry Dry|up the|funding funding funding|(on (on (on|the the|road) road) Your|ignorant comments|Before Before|acting acting|as a|functional functional functional|illiterate, illiterate, illiterate,|you you|should should|have have|read the|pertinent pertinent pertinent|prior prior|discussion discussion|already already|took took|place place|in the|removed removed|content which|has no|place a|biography. biography. biography.|By By By|the the|way, way, way,|how how|is is|your your|boyfriend boyfriend boyfriend|Bertil Bertil Bertil|Videt Videt Videt|doing? doing? doing?|I I|read read|sensational sensational sensational|stuff stuff stuff|on on|his his|talk page|which which|he he|keeps keeps keeps|hiding. hiding. hiding.|Did Did Did|you you|get get|to to|meet meet meet|with his|other other|boyfriends boyfriends boyfriends|yet? yet? . .|I'm I'm|afraid afraid afraid|to that|if if|anyone anyone|agreed agreed agreed|with your|interpretation interpretation interpretation|on on|what what|denotes denotes denotes|a a|comment comment comment|or or|remark remark remark|by by|one one|to an|insult, insult, insult,|well well|I'd I'd I'd|have that|you're you're|all all|stark stark stark|raving, raving, raving,|bloody bloody bloody|mad! mad! === ===|Age Age Age|of of|Modern Modern Modern|Humans Humans Humans|=== ===|The The|article article|says says says|the the|age age age|of of|modern modern modern|humans humans humans|is is|200 200 200|thousands thousands thousands|years years|which is|unsourced unsourced unsourced|material material material|obviously obviously obviously|becausee becausee becausee|no one|knows. knows. knows.|However However|the source|provided provided|says says|130,000 130,000 130,000|years. years. years.|So So|how how|old old|are are|humans? humans? humans?|200 200|thousand thousand thousand|years years|old, old, old,|130 130 130|years old,|or or|the the|millions millions millions|of of|other other|numbers numbers|that that|science science science|has has|claimed? claimed? It|wasn't wasn't wasn't|a attack.|If If|your your|grasp grasp grasp|of of|english english english|is so|poor poor|you you|shouldn't shouldn't shouldn't|be be|attempting attempting attempting|to to|censor censor censor|people. ":::*Generic" ":::*Generic|fair" fair fair|use use|rationales rationales rationales|are, are, are,|by by|definition, definition, definition,|impossible. impossible. ":That" ":That|isnt" isnt|going to|work, you|dont dont|seem seem|stupid stupid|enough enough|to to|think it|will. will. will.|'''''' ''''''|- ":::" ":::|Get" Get|off off|your your|high high high|horse, horse, horse,|or or|block block block|me. You're|very very|unreasonable unreasonable unreasonable|and and|bored, bored, bored,|sick sick sick|person! person! person!|If no|reason reason|to delete|an article|without without|knowing knowing knowing|or or|seeing seeing seeing|the the|full full full|content. content. content.|Hold Hold Hold|your your|horses horses horses|and then|decide. decide. decide.|If have|an an|e-mail e-mail e-mail|address address|I'd I'd|like to|debate debate debate|this this|with with|you. you.|-Wikipedia -Wikipedia -Wikipedia|Supervisor! Supervisor! "::The" "::The|problem" problem|is not|only only|with the|sections sections sections|concerning "concerning|""Controversy" """Controversy" """Controversy|about" about|media "media|coverage""," "coverage""," "coverage"",|the" the|major major major|problem that|many many many|major major|points points points|about the|Greek Greek Greek|debt debt debt|crisis crisis crisis|are are|missing missing|in the|lead lead|and article,|even even|though it|consists consists consists|of of|>100 >100 >100|pages. pages.|This is|addressed addressed addressed|in "in|::*" "::*" "::*|section" section|#4 #4 #4|- "-|"">100" """>100" """>100|pages," pages, pages,|but but|still still|main main|points "points|missing?""" "missing?""" "missing?""|::*" section|#5 #5 #5|- "-|""" """" """|Why" Why|did did|Greece Greece Greece|need need|fiscal fiscal fiscal|austerity austerity austerity|in the|midst midst midst|of of|its its|crisis? crisis? "crisis?|""" """|::*" section|#6 #6 #6|- """|POV" POV|/ /|LEAD LEAD LEAD|debate "debate|""" """|::Two" "::Two" "::Two|weeks" ago,|I I|proposed proposed|in this|section #4|to to|have have|the points|at at|least least least|in in|summary summary|style style style|in lead|(as (as (as|important important|ones ones ones|are not|even even|in the|article) article) "article)|::Just" "::Just" "::Just|let's" let's let's|only only|take take|the the|first first|point point|listed listed|in in|#4, #4, #4,|being being|joining joining joining|the the|Euro Euro Euro|without without|sufficient sufficient sufficient|financial financial financial|convergence convergence convergence|and and|competitiveness competitiveness competitiveness|in the|summary summary|list list|of of|causes causes causes|for debt|crisis. crisis. crisis.|It major|single single|and and|early early early|root root root|cause cause|for crisis.|Without Without Without|this this|root cause|Greece Greece|could could|technically technically technically|not had|this this|debt crisis|because it|could could|always always always|have have|printed printed printed|itself itself|out out|of of|every every|debt debt|volume volume volume|as as|they they|did did|before before|with the|drachma. drachma. drachma.|But But|this this|cause cause|is the|100 100 100|WP WP WP|pages and|in the|WP WP|lead. lead. lead.|The The|current current|lead lead|only only|lists lists lists|normal normal normal|problems problems problems|like "like|""structural" """structural" """structural|weaknesses""" "weaknesses""" "weaknesses""|and" "and|""recessions""" """recessions""" """recessions""|(even" (even (even|though is|clear clear clear|that that|Greece Greece|faced faced|those those|normal problems|for for|decades decades|and and|always always|solved solved solved|them them|with with|high high|drachma drachma drachma|inflation inflation inflation|if if|needed) needed) needed)|- so|without without|naming naming naming|the the|root cause|there is|no no|cause "crisis.|::What" "::What" "::What|happened" happened|after after|I proposed|to points|in article|(at (at (at|least lead|as a|summary) summary) summary)|and and|also also|invited invited invited|everybody everybody|to to|add/change/delete add/change/delete add/change/delete|from from|my my|proposed proposed|the main|point point|list? list? list?|There There|were were|strong strong strong|opponents opponents opponents|working working working|in a|coordinated coordinated coordinated|action, action, action,|threatening threatening|to fight|any any|significant significant significant|change, change, change,|saying saying|one one|can can|not not|summarize summarize summarize|a a|Greek debt|crisis, crisis, crisis,|saying "saying|""Greek" """Greek" """Greek|interests" interests|[need [need [need|to to|have] have] have]|a "a|prominence"")" "prominence"")" "prominence"")|when" when|describing describing describing|the the|debt crisis|in in|WP, WP, WP,|saying saying|they they|will not|let let|other other|editors editors|summarize summarize|it, it,|and so|on. on. on.|So So|we have|almost almost|100 100|new new|pages pages|in talk|section, section, section,|and and|main the|lemma lemma lemma|not not|in article|(like (like (like|it was|during during during|the last|5 5|years) years) "years)|::" ||decline=Nobody decline=Nobody decline=Nobody|on on|Wikipedia Wikipedia|wants wants|your your|moronic moronic moronic|edits! edits! edits!|Take Take Take|a a|hike! hike! Welcome!|Hello, Hello, Hello,|, ,|and and|welcome welcome welcome|to to|Wikipedia! Wikipedia! Wikipedia!|Thank your|contributions. contributions. contributions.|I you|like like|the place|and and|decide decide decide|to to|stay. stay. stay.|Here Here|are a|few few few|good good|links links links|for "for|newcomers:" "newcomers:" "newcomers:|*The" *The *The|five five five|pillars pillars pillars|of of|Wikipedia Wikipedia|*How *How *How|to to|edit edit|a page|*Help *Help *Help|pages pages|*Tutorial *Tutorial *Tutorial|*How to|write write|a great|article article|*Manual *Manual *Manual|of of|Style Style Style|I you|enjoy enjoy enjoy|editing editing|here here|and and|being a|Wikipedian! Wikipedian! Wikipedian!|Please Please|sign sign|your your|name name|on on|talk talk|pages pages|using using using|four four|tildes tildes tildes|(~~~~); (~~~~); (~~~~);|this this|will will|automatically automatically automatically|produce produce produce|your name|and the|date. date. date.|If you|need need|help, help, help,|check "out|Wikipedia:Questions," "Wikipedia:Questions," "Wikipedia:Questions,|ask" ask|me talk|page, page,|or or|place place|{{helpme}} {{helpme}} {{helpme}}|on your|talk and|someone someone|will will|show show|up up|shortly shortly shortly|to to|answer answer|your your|questions. questions. questions.|Again, Again, Again,|welcome!  welcome!  welcome! |By way,|I I|noticed have|created created|the article|Dr. Dr. Dr.|Manfred Manfred Manfred|Gerstenfeld. Gerstenfeld. Gerstenfeld.|Some Some|of the|sentences sentences sentences|there there|seem seem|copied copied copied|directly directly directly|from from|Dr Dr Dr|Gerstenfeld’s Gerstenfeld’s Gerstenfeld’s|homepage; homepage; homepage;|this not|desirable, desirable, desirable,|because it|creates creates creates|the the|impression impression impression|that article|was was|copied copied|from the|homepage, homepage, homepage,|which which|might might|be be|be copyright|violation. violation. violation.|Perhaps Perhaps|you should|try to|rewrite rewrite rewrite|the article|a bit|to to|avoid avoid|that. that.|Also, Also,|some some|kind kind kind|of of|indication indication indication|about about|why why|Dr Dr|Gerstenfeld Gerstenfeld Gerstenfeld|is is|notable notable|would be|nice nice|to have|(cf. (cf. "(cf.|WP:BIO" "WP:BIO" "WP:BIO|and" "and|WP:PROFTEST" "WP:PROFTEST" "WP:PROFTEST|for" for|ideas ideas ideas|on on|how do|that). that). that).|— ==|i i|hate hate|your your|guts guts guts|== i|hope you|feel feel|good good|about "::|oh" oh oh|i i|bet bet bet|you are|little boy.|now now|go go|up up|stairs, stairs, stairs,|your your|mummy mummy mummy|made your|lunch lunch "PS:" "PS:|you're" all|middle-aged middle-aged middle-aged|losers losers losers|at at|home home home|in your|parents parents parents|basements basements basements|living living|off off|50 50 50|bucks bucks bucks|a a|week week Samuell, Samuell,|if not|want the|one one|dead, dead, dead,|better better|proceed proceed proceed|as as|requested. requested. requested.|Either Either Either|that that|or or|we'll we'll we'll|keep keep|beating! beating! i|dare dare dare|you you|== ==|Block Block Block|me. will|do do|it it|again, again,|i to|reply my|discussions discussions discussions|rather rather|owning owning owning|articles articles|and and|issuing issuing issuing|warnings. WELL|SAID SAID SAID|Loremaster Loremaster Loremaster|you not|own own|the article,|you you|tyrannical tyrannical tyrannical|anti-knowledge anti-knowledge anti-knowledge|hater. hater. didn't|say myself|don't don't|agree with|what what|the reference|says, says, says,|or or|I myself|know know|better better|than than|what says,|so so|I am|going to|correct correct|it it|or or|remove remove|it it|based my|own own|original original original|research. research. research.|Do Do|not not|distort distort distort|my my|words. words. words.|I said|Myanmar Myanmar Myanmar|has has|nothing nothing|to the|topic. topic. topic.|You You|have have|problems problems|with with|understanding. understanding. "::So" "::So|you" than|the the|admin! admin! admin!|Are you|excusing excusing excusing|all the|above? above? above?|Are you|ignoring ignoring|all his|breaks breaks breaks|on mediation|- -|do you|not not|remember remember remember|your your|reaction reaction reaction|when when|I changed|BOMBER BOMBER BOMBER|to to|Volunteer, Volunteer, Volunteer,|you seem|very very|quite quite|of of|this, this,|do not|think is|total total total|hypocritical? hypocritical? ==|October October October|2013 2013 2013|== You|want want|ME ME|for for|understanding? understanding? understanding?|I'll I'll|give give|you you|understanding, understanding, understanding,|you you|annoying annoying annoying|editor! editor! ,|6 6 6|January January January|2014 2014 2014|(UTC) "(UTC)|::::Ok," "::::Ok," "::::Ok,|so" so|Anon Anon Anon|IP IP|from from|Tempe, Tempe, Tempe,|Arizona Arizona Arizona|aka aka aka|174.19.166.126 174.19.166.126 174.19.166.126|aka aka|174.19.169.92, 174.19.169.92, 174.19.169.92,|who who|apparently apparently|only only|edits edits|the the|Ted Ted Ted|Cruz Cruz Cruz|article article|and and|no no|other, other, other,|now now|that have|conclusively conclusively conclusively|answered answered answered|your your|question, question, question,|please please|provide provide|me me|reasons reasons reasons|that be|edited edited edited|just just|like like|Jennifer Jennifer Jennifer|Granholm Granholm Granholm|article. article.|It It|was was|your your|suggestion suggestion suggestion|I I|assume assume assume|you some|thoughts thoughts thoughts|on this|topic, topic, topic,|right? right? "right?|22:38" "22:38" You're|a real|glutton glutton glutton|for for|punishment. punishment. punishment.|;-) ;-) I'm|the the|latest latest latest|yet, yet, yet,|but but|congratulations congratulations congratulations|on your|re-adminship. re-adminship. re-adminship.|That's That's That's|the the|third third third|time time|I've I've|voted voted voted|for you,|don't don't|make make|me me|do it|again! again! again!|-P -P -P|30 30 30|June June June|2005 "2005|17:17" "17:17" "17:17|(UTC)" ":Erm," ":Erm,|thank" thank|you. ":|LOTHAT" LOTHAT LOTHAT|VON VON VON|TROTHA TROTHA TROTHA|WAS WAS WAS|POISONED, POISONED, POISONED,|THAT'S THAT'S THAT'S|WHAT WHAT|CONTAMINATION CONTAMINATION CONTAMINATION|IS! IS! IS!|YOU YOU|GET GET GET|TYPHOID TYPHOID TYPHOID|FEVER FEVER FEVER|ONLY ONLY|THROUGH THROUGH THROUGH|POISONED POISONED POISONED|FOOD FOOD FOOD|OR OR OR|DRINK! DRINK! ==|Robbie Robbie Robbie|Hummel Hummel Hummel|== ==|Way Way Way|to to|speedy speedy|delete delete|my my|Robbie Hummel|article! article! article!|It's It's|now now|a real|article you|can't can't|do anything|about about|it. it.|I I|can't can't|believe believe|you would|do do|this to|me. You|must must must|hate hate|black black black|people. ":Merge" ":Merge|and" and|redirect redirect redirect|as per|, ,|also also|for for|Base Base Base|32 32 32|into into|Base32 Base32 Base32|(I (I (I|just just|edited edited|Base32, Base32, Base32,|and and|needed needed needed|Base64 Base64 Base64|in in|UTF-1). UTF-1). a|dumb dumb dumb|American, American, American,|right? right?|No No|degree? degree? degree?|Knows Knows Knows|nothing nothing|of of|engineering? engineering? engineering?|Thinks Thinks Thinks|mathematics mathematics mathematics|is "is|""universal""?" """universal""?" """universal""?|Played" Played Played|monopoly monopoly monopoly|in in|high high|school school school|instead instead instead|of of|learning? learning? learning?|How How|am am|I I|doing doing|so so|far? far? ":::::::::::You" ":::::::::::You|read" read|it; it; it;|your your|note note|addressed addressed|something something|else. else.|(Incidentally, (Incidentally, (Incidentally,|your your|reasoning reasoning reasoning|above above above|is is|unsound; unsound; unsound;|whether whether|or or|not not|my my|Rushdie Rushdie Rushdie|comparison comparison comparison|holds holds holds|up, up, up,|it not|fail fail fail|to to|hold hold hold|up up|because because|his his|literary literary literary|career career career|is a|failure). failure). failure).|But But|I you|understand, understand, understand,|I not|trying to|get get|any any|decision decision decision|reversed reversed reversed|(and (and|never never|was). was). was).|Rather, Rather, Rather,|I am|yelling yelling yelling|at at|you for|enforcing enforcing enforcing|a a|stupid stupid|policy. policy. policy.|- Sandifer, Sandifer,|I'm going|BUY BUY BUY|my my|way way|back back|into into|wikipedia. wikipedia.|For For|all your|puffery, puffery, puffery,|I'll I'll|bet bet|you've you've|never never|forked forked forked|over over|a a|penny penny penny|to the|cause. cause. cause.|And And|even even|you you|have, have,|I'll I'll|make make|your your|contribution contribution contribution|seem like|pennies. pennies. ==|Hello, Hello,|Nawlins Nawlins Nawlins|== ==|Why Why|do to|deflower deflower deflower|prepubescent prepubescent prepubescent|girls? girls? girls?|Don’t Don’t Don’t|you know|that’s that’s that’s|a a|felony? felony? Vinny Vinny|Burgoo Burgoo Burgoo|= = =|suspected suspected suspected|sock sock|puppet puppet puppet|Are you|ever ever|going to|withdraw withdraw withdraw|this this|accusation? accusation? accusation?|It's It's|currently currently|the the|second second|hit hit hit|with a|Google Google Google|search search|with with|'Vinny 'Vinny 'Vinny|Burgoo' Burgoo' Burgoo'|(my (my (my|one one|and and|only only|online online online|identity identity|for for|nearly nearly nearly|ten ten ten|years) years)|and and|it's it's|wholly wholly wholly|bogus. bogus. bogus.|Someone Someone Someone|posted posted posted|something something|in in|support of|something something|very very|stupid stupid|I had|done done|at at|Wiktionary Wiktionary Wiktionary|(I (I|called called|a a|serial serial serial|Wiki Wiki|tyrant tyrant tyrant|a a|'c**t' 'c**t' 'c**t'|after after|he he|had had|unambiguously unambiguously unambiguously|broken broken broken|Wiki's Wiki's Wiki's|rules, rules, rules,|then I|compounded compounded compounded|this this|by by|threatening threatening|him him|in in|what I|thought thought|at the|time a|transparently transparently transparently|jocular jocular jocular|manner, manner, manner,|but but|wasn't) wasn't) wasn't)|and this|'supporter' 'supporter' 'supporter'|was was|assumed assumed assumed|to be|me me|using using|another another another|identity identity|and and|another another|IP IP|trying get|around around|a a|temporary temporary temporary|block. block. block.|I still|use use|Wikipedia Wikipedia|a a|lot lot lot|but but|have no|interest interest|whatsoever whatsoever whatsoever|in in|editing editing|it it|ever ever|again, again,|so so|by by|all all|means means|say for|disruptive disruptive disruptive|editing "editing|(guilty:" "(guilty:" "(guilty:|I" got|fed fed fed|up up|with the|lot lot|of of|you) you) you)|or or|whatever whatever|else else|I was|accused accused accused|of of|before before|this this|puppeteer puppeteer puppeteer|nonsense nonsense nonsense|was was|settled settled settled|on on|(the (the (the|crime crime crime|kept kept kept|changing) changing) changing)|but but|I'm not|happy happy happy|with you|currently currently|show. show. show.|Take Take|it it|down down down|or else.|A A|genuine genuine genuine|threat threat threat|this this|time? time?|We'll We'll We'll|see. see. Other Other|than than|that could|see see|how how|the the|side side side|bar bar bar|looks looks looks|intergrated intergrated intergrated|into into|the top|welcome welcome|section right|and it|just just|one one|section. section.|Providing Providing Providing|you it|the same|length length length|and and|shrink shrink shrink|the the|other other|pics pics pics|down down|a a|little little|it should|fit fit fit|in the|top? top? I|reckon reckon reckon|you should|die die is|British British British|form form|and and|does not|correspond correspond correspond|to to|French French French|nobiliary nobiliary nobiliary|rules, rules,|which, which, which,|in in|any any|case, case, case,|are are|defunct, defunct, defunct,|given given|that that|French French|noble noble noble|titles titles titles|were were|rendered rendered rendered|obsolete obsolete obsolete|more a|century century century|ago. ago. ago.|I think|that, that,|technically, technically, technically,|she she|is is|merely merely|Raine Raine Raine|Spencer, Spencer, Spencer,|having having|retrieved retrieved retrieved|her her|previous previous previous|surname surname surname|upon upon upon|her her|divorce divorce divorce|from from|Chambrun. Chambrun. Chambrun.|(And (And (And|during the|French French|marriage, marriage, marriage,|she was|not not|Countess Countess Countess|of of|Chambrun, Chambrun, Chambrun,|she was|Countess Countess|Jean-Francois Jean-Francois Jean-Francois|de de de|Chambrun, Chambrun,|and, and, and,|as per|French French|usage, usage, usage,|would be|referred referred referred|to to|as as|Mme Mme Mme|de Chambrun,|with title|used used|only by|servants servants servants|and and|so-called so-called so-called|inferiors.) inferiors.) Hey Hey|jerk jerk jerk|we we|may may|do do|a "a|deal:" "deal:" "deal:|please" please|let let|in in|peace peace peace|the the|articles articles|of of|Carl Carl Carl|Grissom Grissom Grissom|and and|Bob Bob Bob|the the|goon. goon. goon.|Also Also Also|unlock unlock unlock|the the|Chase Chase Chase|Meridian Meridian Meridian|articles and|accept accept accept|that that|Jack Jack Jack|Napier Napier Napier|are are|in in|Batman Batman Batman|Forever. Forever. Forever.|In In In|change change|I I|let let|of of|vandalize vandalize|the the|user user|articles. articles. wikipedia.org wikipedia.org|for for|my my|fans fans fans|i i|leave leave|for for|one one|second second|and and|Wikipedia has|blocked blocked|my my|published published|content content|for for|racist racist racist|organizations organizations organizations|who who|spam spam spam|and/or and/or and/or|advertize advertize advertize|in the|search search|engines engines engines|under under|wikipedia.org wikipedia.org|name. name. name.|would would|you like|me to|should should|you you|the the|links links|or the|world world|the the|links? links? links?|I am|sick sick|of the|racism racism|on on|wikipedia.org. wikipedia.org. wikipedia.org.|stop stop|blocking blocking blocking|my my|publishing publishing publishing|that in|fact fact|not not|spam spam|and not|advertizing advertizing advertizing|anything. anything.|It my|life, life, life,|a real|american, american, american,|in in|america. america. again|the the|TYRANNY TYRANNY TYRANNY|of of|Liberal Liberal Liberal|opinions opinions opinions|rules rules rules|over over|all, all, all,|just the|Nazis Nazis Nazis|or or|Facists. Facists. ok ok|so so|its its|the the|currupt currupt "currupt|admin:" "admin:" "admin:|desucka,crooked" desucka,crooked desucka,crooked|bullet,and bullet,and bullet,and|krappydude. krappydude. krappydude.|made made|a a|mental mental mental|note PAGE|GO GO GO|DIE DIE DIE|YOU YOU|STUPID STUPID STUPID|ARSEWHOLE ARSEWHOLE ARSEWHOLE|AUTOMATED AUTOMATED AUTOMATED|FILTER FILTER ":::The" ":::The|article" as|it it|stands stands stands|is is|of of|almost almost|no no|use use|to the|readership readership readership|it's it's|aimed aimed aimed|at, at, at,|that's that's|the the|problem. problem. problem.|I can't|imagine imagine imagine|why why|any any|medical medical|professional professional professional|would would|choose to|use use|Wikipedia, Wikipedia,|but but|even even|if if|they they|do, do, do,|they they|have have|easy easy easy|access access access|to to|better better|source source|material. material. material.|The The|general general general|reader reader|doesn't doesn't|have have|that that|easy easy|access, access, access,|so so|it would|make make|sense sense|to to|aim aim aim|to article|at at|them. "::Dai" "::Dai|antagonized" antagonized antagonized|me me|with with|he he|comment comment|of my|'first' 'first' 'first'|page page|move. move. move.|Then Then Then|Snowded Snowded Snowded|suggested suggested suggested|I a|either either|a a|drunk drunk drunk|or or|just just|plain plain plain|stupid. stupid. stupid.|They They They|should be|attacking attacking attacking|me on|those those|public public public|talkpages talkpages talkpages|& & &|through through|their their|'edi 'edi 'edi|summaries'. summaries'. summaries'.|I I|used used|to a|happy happy|bloke, bloke, bloke,|but but|Dai Dai Dai|& &|Snowy Snowy Snowy|continue to|poke poke poke|& &|provoke provoke provoke|me, me,|via via via|stalking, stalking, stalking,|harrassment harrassment harrassment|& &|contant contant contant|ABF. ABF. ABF.|They They|treat treat treat|me like|dirt, dirt, dirt,|on on|thos thos thos|public public|pages. ==|How How|rumours rumours rumours|get get|started started started|== is|how how|rumours get|started. started. started.|Ramsquire Ramsquire Ramsquire|is is|caught caught caught|again again|starting starting starting|a a|rumour. rumour. "rumour.|*RPJ:" "*RPJ:" "*RPJ:|There" no|chain chain chain|of of|custody custody custody|on the|rifle. rifle. "rifle.|*Ramsquire:" "*Ramsquire:" "*Ramsquire:|""Yes" """Yes" """Yes|there" "there|is.""" "is.""" "is.""|*RPJ:" "*RPJ:|Where?" Where? "Where?|*Ramsquire:" "*Ramsquire:|""Its" """Its" """Its|not" "the|article.""" "article.""" "article.""|and" "and|""I'm" """I'm" """I'm|not" do|any any|research research research|for "for|you.""" "you.""" "you.""|*RPJ:" "*RPJ:|Ramsquire," Ramsquire, Ramsquire,|please, please, please,|just just|admit admit admit|you you|made the|whole whole whole|story story story|up up|about a|there there|being "being|""chain" """chain" """chain|of" "of|custody""" "custody""" "custody""|on" ":::This" ":::This|discussion" discussion|was was|dead dead dead|from from|more than|half half half|of of|month month|when I|archived archived archived|it. I|really really|want see|Heta, Heta, Heta,|Stigma Stigma Stigma|and and|Sho Sho Sho|in in|article, article,|but I|cannot cannot|add add|them them|again again|effectively, effectively, effectively,|because because|of of|threat threat|of of|edit edit|war war|triggering triggering triggering|mentioned mentioned mentioned|above above|by by|me, me,|which is|manifested manifested manifested|by by|reverts reverts reverts|made by|other editors|after after|readding readding readding|these these|letters letters letters|by "::::::::Oh" "::::::::Oh|seriously," seriously, seriously,|you're you're|definitely definitely definitely|a a|challenging challenging challenging|one. one.|As As|I I|said, said, said,|it's it's|a a|legal legal legal|matter. One One|thing thing|I hate|is people|who who|talk talk|about other|people people|behind behind|their their|backs backs backs|because because|they they|are are|too too|gutless gutless gutless|to to|confront confront confront|them them|in in|person. person. person.|You You|go go|bad bad|mouthing mouthing mouthing|people and|Slim Slim Slim|Virgin Virgin Virgin|and and|others others others|off off|behind behind|our our|backs. backs. backs.|Really Really Really|honorable honorable honorable|behaviour. behaviour. behaviour.|You a|weak weak weak|person. *Please *Please|refrain adding|nonsense nonsense|to to|WWE WWE|RAW. RAW. RAW.|It is|considered considered considered|vandalism. vandalism.|If experiment,|use ==|... ...|== ==|WHY WHY WHY|DO DO|YOU YOU|ACT ACT ACT|SO SO|HOSTILE HOSTILE HOSTILE|WHEN WHEN|YOU GET|INSULTED?!?! INSULTED?!?! INSULTED?!?!|LEARN LEARN LEARN|TO TO|FRIGGIN FRIGGIN FRIGGIN|FIND FIND FIND|SOURCES SOURCES SOURCES|BEFORE BEFORE BEFORE|YOU DELETE|THOSE THOSE THOSE|PRICING PRICING PRICING|GAME GAME GAME|ARTICLES, ARTICLES, ARTICLES,|GD GD ":::If" ":::If|you" you|two two|weren't weren't weren't|ganging ganging ganging|up up|on on|me me|I'd I'd|get report|you you|first first|and and|get get|you you|banned. banned. is|really really|world world|you you|enter enter enter|my my|yard, yard, yard,|I will|use use|my my|hunter hunter hunter|rifle rifle rifle|blow blow blow|out out|you you|head. head. head.|but but|we we|are in|wiki, wiki,|so will|flag flag flag|you you|as as|vandals. vandals. Your|break break break|== ==|Hey Hey|Mr Mr Mr|V. V. V.|I a|safe safe safe|and and|restful restful restful|break. break. break.|But But|don't be|gone gone gone|for for|too too|long! long! long!|) ) )|Best Best Best|wishes, wishes, My|edits edits|are are|fine. fine. fine.|You You|people are|on the|losing losing|side. side. side.|You no|shame. shame. ==|Dont Dont Dont|go go|on on|making making|a a|FOOL FOOL FOOL|of yourself|, ,|Paula! Paula! Paula!|The The|whole whole|school school|is is|laughing laughing|already! already! already!|== ==|Too bad|that cannot|quit quit quit|popping popping popping|that that|stuff! stuff! stuff!|Drugs Drugs Drugs|are are|gonna gonna|get you|in in|trouble trouble trouble|one one|day! day! day!|(much (much (much|more more|then then|the the|stuff stuff|you with|half half|the the|guys guys guys|in in|our our|class class|, ,|at the|movies! movies! movies!|Jonathan Jonathan Jonathan|told told told|his his|mom, mom, mom,|when when|she she|asked asked asked|what the|spots spots spots|on his|pants pants pants|were!) were!) were!)|Stop Stop|lying, lying, lying,|stop stop|accusing accusing accusing|people of|sockpuppetry sockpuppetry sockpuppetry|who who|seem seem|continents continents continents|apart, apart, apart,|stop stop|hiding hiding|exactly exactly|those those|tracks tracks tracks|about about|you you|accuse accuse accuse|others others|of. of. of.|You You|get get|yourself yourself|into into|a a|shambles, shambles, shambles,|credibility credibility credibility|wise. wise. wise.|Anyhow, Anyhow, Anyhow,|what what|business business business|of of|yours yours|is it|what people|without without|remotest remotest remotest|relation relation relation|to to|you do|on on|wikipedia? wikipedia? wikipedia?|You seem|drunk, drunk, drunk,|on on|drugs drugs drugs|and and|having having|your your|period period period|??? ??? The|place is|now now|it's it's|the the|correct correct|place. place. place.|It's It's|chronologically chronologically chronologically|and and|historically historically historically|correct correct|as is|now. now.|Otherwise Otherwise Otherwise|you to|move move move|also also|your your|data data data|as Before|I I|accuse accuse|you you|of of|cringeworthy cringeworthy cringeworthy|acts acts|with with|donkeys, donkeys, donkeys,|what what|does does|sprotected sprotected sprotected|mean? mean? the|reply reply|– – –|my my|biggest biggest biggest|issue issue|at the|moment moment moment|is is|whether "include|""sales" """sales" """sales|figures""" "figures""" "figures""|for" for|earlier earlier earlier|years... years... years...|as as|far I|know, know, know,|there there|were were|no no|published published|end end end|of of|year year|sales sales sales|figures figures figures|before before|1994, 1994, 1994,|and the|sales sales|published published|at time|for for|1994 1994 1994|to to|1996 1996 1996|have have|since since|been been|discredited discredited discredited|and and|revised, revised, revised,|so so|are are|basically basically basically|worthless. worthless. worthless.|The The|figures figures|currently currently|quoted quoted quoted|in articles|up up|to 1996|are are|usually usually "usually|""estimates""" """estimates""" """estimates""|that" been|taken taken|from from|various various various|charts charts charts|message message|boards, boards,|calculated calculated calculated|by by|enthusiasts enthusiasts enthusiasts|from from|officially officially|published published|yearly yearly yearly|sales figures|per per|artist artist artist|(i.e. (i.e.|sales sales|could could|be be|made made|up up|of of|one one|or or|more more|singles singles singles|or or|albums, albums, albums,|and and|estimating estimating estimating|what what|percentage percentage percentage|of of|sales sales|were were|assigned assigned assigned|to to|each each|record). record). record).|As As|these these|are are|completely completely|unofficial unofficial unofficial|and and|unverifiable, unverifiable, unverifiable,|I am|thinking thinking|to to|remove remove|them them|altogether altogether altogether|or or|at least|add note|that that|all all|figures figures|are are|unofficial and|estimated. estimated. estimated.|In In|any any|case case|I think|most most|people in|how how|many many|records records records|the the|37th 37th 37th|best best best|selling selling selling|album album album|of of|1987 1987 1987|sold sold sold|that that|year year|– –|it it|makes makes|more more|sense to|concentrate concentrate concentrate|efforts efforts|into into|keeping keeping|List of|best-selling best-selling best-selling|singles singles|in United|Kingdom Kingdom Kingdom|up to|date. do|have have|Welsh Welsh Welsh|friends friends friends|there there|ask them|how how|my my|Welsh Welsh|is? is? is?|I cannot|tell tell|you you|if if|I'm I'm|a a|native native native|speaker speaker speaker|or not|- -|I I|could could|be, be,|I'm a|cosmopolitan. cosmopolitan. cosmopolitan.|Personally, Personally, Personally,|my my|favorite favorite favorite|version version|was was|. ":Spot," ":Spot,|grow" grow|up! up! up!|The being|improved improved improved|with the|new new|structure. structure.|Please Please|stop stop|your your|nonsense. nonsense. SINCE SINCE|WHEN WHEN|IS IS|>>>>SOURCED<<<< >>>>SOURCED<<<< >>>>SOURCED<<<<|EDITING EDITING EDITING|VANDALISM??? VANDALISM??? VANDALISM???|READ READ READ|THE THE|CITED CITED CITED|SOURCES! SOURCES! SOURCES!|WHERE WHERE WHERE|pray pray pray|tell me|DOES DOES DOES|IT IT IT|SAY SAY SAY|THAT THAT|IRAN IRAN IRAN|EVER EVER EVER|(I (I|SAY SAY|EVER) EVER) EVER)|HAD HAD HAD|A A|DEMOCRATICAL DEMOCRATICAL DEMOCRATICAL|ELECTION ELECTION ELECTION|OF OF|ANY ANY|SORT SORT SORT|OR OR|SHAPE SHAPE SHAPE|in in|HISTORY?? HISTORY?? HISTORY??|QUIT QUIT QUIT|CONVERTING CONVERTING CONVERTING|WIKIPEDIA WIKIPEDIA WIKIPEDIA|INTO INTO INTO|A A|TRASH TRASH TRASH|BIN BIN BIN|with with|YOUR YOUR|SILLY SILLY SILLY|AND AND|INFANTILE INFANTILE INFANTILE|PRANKS! PRANKS! PRANKS!|KISSING KISSING KISSING|EACH EACH EACH|OTHER'S OTHER'S OTHER'S|REAR REAR REAR|ENDS ENDS ENDS|DOESN*T DOESN*T DOESN*T|MAKE MAKE MAKE|POV POV|less less less|POV ==|Eww, Eww, Eww,|I can|s s s|m m m|e e e|l l l|l l|something something|horrible horrible horrible|round round round|here! here! here!|== ==|Ewwww Ewwww Ewwww|is that|you? you? you?|i l|you you|from from|here, here,|man! man! man!|peee-yewww!go peee-yewww!go peee-yewww!go|take a|bath bath bath|or or|something, something, something,|fleabag! fleabag! ==|Hi Hi Hi|== How|dare dare|you? you?|try words.|Are you|Libra, Libra, Libra,|Gemini Gemini Gemini|or or|some some|haters haters|else? else? else?|The The|picture picture|on "the|""front" """front" """front|page""" "page""" "page""|was" was|so so|show-off. show-off. UKDoctor UKDoctor|responds responds responds|Shut Shut Shut|Up, Up, Up,|David David David|Ruben Ruben Ruben|- -|can't can't|you you|see see|JdWolff JdWolff JdWolff|referring referring referring|to to|others others|as as|TIGERS TIGERS TIGERS|IN IN IN|CAGES CAGES CAGES|!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|David Ruben|is not|any any|better better|and and|should should|go go|take a|flying flying flying|leap leap leap|into the|deep deep deep|end the|Pacific Pacific Pacific|Ocean Ocean Ocean|if if|he he|wants wants|to. to. to.|. .|. .|WE WE WE|WHITE WHITE WHITE|DOCTORS DOCTORS DOCTORS|ARE ARE|TOTALLY TOTALLY TOTALLY|ASHAMED ASHAMED ASHAMED|OF THE|GENERAL GENERAL GENERAL|MEDICAL MEDICAL MEDICAL|COUNCIL COUNCIL COUNCIL|-and -and -and|we we|certainly certainly certainly|have say|our our|piece piece piece|in any|way way|fit. fit. comments|== ==|In In|response response|to to|your your|Please remove|content content|from you.|— —|@ @ @|Your Your|record record|indicates indicates indicates|that were|banned banned|as a|vandal vandal|several several several|times times|and and|asked asked|for for|a a|defense defense defense|several several|times. times. times.|Also, Also,|your your|record that|Bertil Bertil|videt videt videt|asked asked|you revert|some some|legitimate legitimate|changes changes|without without|reason reason|and did|it it|because because|he he|asked asked|you, you,|vandalazing vandalazing vandalazing|good good|content content|that that|did not|suit suit suit|him him|or or|you. you.|You You|should should|talk. talk. talk.|Also Also|please please|read read|your own|talk page|regarding regarding|many many|other other|warnings warnings warnings|given given|to you|by other|users. users. users.|Also Also|be a|man man man|(at least|try) try) try)|and and|deal deal deal|with page|rather rather|than than|begging begging begging|others others|to hold|your your|hand. hand. hand.|Before "::::Based" "::::Based|on" on|ChrisO's ChrisO's ChrisO's|behavior behavior behavior|that's that's|a a|load load load|of of|bull, bull, bull,|he's he's|just just|pretexting pretexting pretexting|to to|attack attack|me. me.|Further, Further, Further,|he he|NEVER NEVER NEVER|gave gave gave|me "a|""warning""" """warning""" """warning""|about" about|being being|blocked, blocked, blocked,|the "only|""warning""" """warning""|I" had|was was|this this|and I|RESPONDED RESPONDED RESPONDED|to the|abusive abusive abusive|jerk jerk|by by|placing placing placing|a a|question question|of his|interpretation interpretation|of the|rule rule rule|which he|flatly flatly flatly|refused refused refused|to to|respond respond respond|to. REDIRECT "REDIRECT|Talk:57th" "Talk:57th" "Talk:57th|Directors" Directors Directors|Guild Guild Guild|of of|America America America|Awards Awards "::::Ouch!" "::::Ouch!|That" That That|sounded sounded sounded|like a|threat threat|and and|since since|I didn't|actually actually|attack attack|you you|but but|instead instead|criticised criticised criticised|your your|behaviour, behaviour, behaviour,|I see|you are|again again|out of|line. line. line.|/ """he" """he|grew" grew grew|up up|in in|Russia, Russia, Russia,|he he|was was|training training training|with with|Russians, Russians, Russians,|he he|talks talks talks|Russian, Russian, Russian,|even even|Russian Russian Russian|President President President|came see|his his|fights, fights, fights,|thats thats thats|why why|he he|repeatedly repeatedly|has has|identified identified identified|himself himself|as as|Russian Russian|in "in|interviews""" "interviews""" "interviews""|And" And|that that|doesn't make|him him|Russian? Russian? Russian?|You You|really really|are are|very very|stupid, stupid, stupid,|as as|the the|banderlogs banderlogs banderlogs|are, are,|of of|course. course. course.|your your|whole whole|ideology ideology ideology|is on|stupidity stupidity stupidity|and and|ignorance, ignorance, ignorance,|after after|all. all. ":Time" ":Time|to" to|call call|in "the|""Three" """Three" """Three|Revert" Revert "Revert|Rule""," "Rule""," "Rule"",|as" see|both both both|have have|editted editted editted|it it|again? again? again?|I have|left left left|a a|message message|for for|both both|PeeJay2k3 PeeJay2k3 PeeJay2k3|and and|Oragina2 Oragina2 Oragina2|to to|not not|change change|the the|table table table|again, again,|until until|a a|consensus is|come come|to to|here here|on not,|we we|might might|need move|down down|the the|Resolving Resolving Resolving|Disputes Disputes Disputes|road. road. and|to to|suggest suggest|that is|flabbergastingly flabbergastingly flabbergastingly|arrogant ":Look," ":Look,|you" are|clearly clearly|trolling trolling|now now|and am|becoming becoming becoming|more little|fed you|wasting wasting|the time|of those|of of|us us|who are|here here|to good|encyclopaedia. encyclopaedia. encyclopaedia.|I am|of of|course course|prepared prepared prepared|to to|accept accept|your your|argument argument argument|that that|Alan Alan Alan|Whicker's Whicker's Whicker's|position position position|is is|'absolutely, 'absolutely, 'absolutely,|unequivocally, unequivocally, unequivocally,|and and|unquestionably unquestionably "unquestionably|definitive':" "definitive':" "definitive':|but" only|if are|prepared my|next-door-neighbour next-door-neighbour next-door-neighbour|Mr Mr|Osborne's Osborne's Osborne's|position position|that that|Manchester Manchester Manchester|is second|city city city|is also|'absolutely, unquestionably|definitive', definitive', definitive',|since since|there's there's there's|just as|much much|reason to|take take|his his|word word|on the|matter matter matter|as as|Mr Mr|Whicker's. Whicker's. Whicker's.|ⁿɡ͡b ⁿɡ͡b ⁿɡ͡b|\ \ ==|Respect Respect Respect|is is|earned earned earned|by by|respect respect respect|== ==|That That|user user|IS IS|a a|troll troll troll|and a|stalker. stalker. stalker.|They They|are not|respected respected|and are|close close close|to to|being being|banned. banned.|Did you|bother bother bother|to the|inflammatory inflammatory inflammatory|garbage garbage garbage|that they|write write|on wikipedia?|Or Or|are just|part troll|posse? posse? ==No ==No|Personal Personal Personal|Attacks== Attacks== Attacks==|Stop Stop|trying to|cover cover cover|up truth|about about|Wikipedia. Wikipedia.|I I|asked asked|the user|a question|about about|whether the|allegations allegations allegations|in in|that that|article article|were were|true. true. true.|I didn't|write that|article. article.|P.S. P.S. P.S.|I I|actually actually|didnt didnt didnt|need to|even even|ask ask|if were|true- true- true-|its its|obvious obvious|that they|were. were. ":|you" a|notorious notorious notorious|troll and|vandal vandal|too too|Hrafn. Hrafn. just|want to|point point|something something|out out|(and (and|I'm I'm|in in|no no|way way|a a|supporter supporter supporter|of the|strange strange strange|old old|git), git), git),|but is|referred as|Dear Dear Dear|Leader, Leader, Leader,|and and|his his|father father father|was was|referred as|Great Great Great|Leader. Leader. harmony harmony|between between|people this|village, village, village,|or or|maybe maybe maybe|vice vice vice|versa versa versa|... ...|.. .. ..|/ /|Blerim Blerim Blerim|Shabani. Shabani. Shabani.|/ ===hahahahahahaha=== ===hahahahahahaha===|Your Your|fake fake fake|information information|u u|have have|filled filled filled|wikipedia wikipedia|wont wont wont|be be|tolerated tolerated|, ,|stop stop|spread spread|propaganda propaganda|in in|wikipedia wikipedia|, ,|all all|information information|is is|fake fake|as the|fake fake|state state|of of|fyrom. fyrom. fyrom.|The The|truth truth|shall shall|prevail prevail ":I" ":I|can" can|sympathize sympathize sympathize|with your|frustration. frustration. frustration.|I know|many many|comic comic comic|book book|professionals professionals professionals|and know|a of|things things|I would|love love love|to include|in in|articles articles|but I|can't. can't. can't.|I a|linked linked linked|source that|other people|can can|double-check. double-check. double-check.|Your Your|conversation conversation conversation|with with|Heck Heck Heck|is is|useful useful|in can|let let|it it|guide guide guide|you you|look look|for for|sources can|link link|as as|references, references,|but but|in in|Wikipedia, Wikipedia,|a personal|conversation conversation|is not|an an|appropriate appropriate|source for|citation. citation. ==Reversion== ==Reversion==|Given Given Given|that that|some some|jerk jerk|vandalized vandalized vandalized|the the|characters characters|section section|by by|changing changing changing|the the|names names|to to|various various|Nintendo Nintendo Nintendo|characters, characters, characters,|I have|reverted reverted reverted|to a|much much|older older older|version. version. well|first, first, "first,|""accidental" """accidental" """accidental|suicide""" "suicide""" "suicide""|made" made|me me|laugh. laugh. laugh.|There are|accidents accidents accidents|and you|die die|and then|there are|suicides suicides suicides|and you|die. die. die.|Second Second|the the|next next|sentences sentences|hurt hurt hurt|my my|head. head.|You You|ASSUME ASSUME ASSUME|checkers? checkers? checkers?|I I|don't. don't. don't.|Some Some|writer writer writer|is "is|""theorizing""?" """theorizing""?" """theorizing""?|Well" Well Well|this this|guy guy|believed believed believed|that that|George George George|Hodel Hodel Hodel|was the|killer killer killer|of the|Black Black Black|Dahlia. Dahlia. Dahlia.|He He|has been|humiliated humiliated humiliated|for for|being being|wrong wrong|up up|and and|down the|internets. internets. internets.|So So|why why|not not|put put|down down|MY MY|theory? theory? theory?|Theone Theone Theone|in in|which which|Martians Martians Martians|killed killed killed|her? her? her?|Oh, Oh, Oh,|right, right,|because not|relevant relevant ==Cell ==Cell|(film)== (film)== (film)==|Why Why|is it|such such|a a|horrible horrible|thing thing|for for|me create|a page|for the|film? film? film?|I've I've|seen seen|pages pages|for for|other other|movies movies movies|that that|are are|currently currently|in in|production. production. production.|H-E H-E H-E|doulbe doulbe doulbe|hocky hocky hocky|sticks, sticks, sticks,|I've for|movies that|aren't aren't|even in|production production production|yet. yet. yet.|Can Can Can|I I|get get|some some|answers, answers, answers,|and and|don't don't|just just|tell read|some some|other "other|WP:BOLOGNA." "WP:BOLOGNA." So, So,|in in|other other|words, words, words,|you are|professionally professionally|on the|dole. dole. dole.|You must|live live|in parents|basement basement basement|and and|leech leech leech|off off|of of|them, them,|like a|11-year 11-year 11-year|old. old. old.|Maybe Maybe|if you|had had|a of|motivation, motivation, motivation,|you could|look real|job, job, job,|and not|play play play|your your|fantasy fantasy fantasy|as Wiki|boy. boy.|I'm I'm|sure sure|you you|couls couls couls|start start|a a|career career|as a|video video video|game game game|player. player. What|a a|joker joker joker|you are.|European European European|parliament parliament parliament|has no|power power|to do|anything. is|non non non|binding binding binding|because not|serious serious|and and|silly silly silly|reports reports reports|like not|meant meant|to be|serious. serious. serious.|what is|more important|is that|we we|ruled ruled ruled|your your|ancestors ancestors ancestors|for for|centuries centuries centuries|and and|trying put|negative negative negative|images images|of of|turks turks turks|in the|turkey turkey turkey|page to|change change|that. that.|This get|your your|'revenge'. 'revenge'. 'revenge'.|Go Go Go|and and|edit the|golden golden golden|dawn dawn dawn|wikipedia wikipedia|because because|your your|ideas ideas|will will|only only|be be|welcome welcome|there. there. ==|Ban Ban Ban|of "of|""Bryansee""" """Bryansee""" """Bryansee""|from" from|Wikipediocracy. Wikipediocracy. Wikipediocracy.|== ==|Hey, Hey, Hey,|you are|Zoloft. Zoloft. Zoloft.|The The|one one|who who|banned banned|me me|from from|Wikipediocracy Wikipediocracy Wikipediocracy|with threat|that I|die. "die.|""Well""" """Well""" """Well""|means" means|dead. dead. "dead.|""Recover""" """Recover""" """Recover""|means" "means|""die""." """die""." """die"".|You" are|wanting wanting wanting|me to|die die|by a|medication medication medication|increase increase increase|or or|meet meet|my my|maker. maker. maker.|Check Check Check|this "this|out:" "out:" MODERATORS MODERATORS|ARE ARE|SOME SOME|OF THE|MOST MOST MOST|INGORANT INGORANT INGORANT|AND AND|SELF SELF SELF|SERVING SERVING SERVING|JERKS JERKS JERKS|YOU WILL|FIND FIND|ON ON|THE THE|NET NET ":So" ":So|I" will|start a|criticism criticism|of the|quote quote quote|from from|Ollier Ollier Ollier|and and|Pain, Pain, Pain,|with with|whom have|more more|general general|issues issues|than "the|""postorogenic" """postorogenic" """postorogenic|part""." "part""." "part"".|Phrase" Phrase Phrase|by by|phrase phrase|that I|disagree "disagree|with:" "with:" "with:|:#" ":#" ":#|Only" Only|much much|later later later|was was|it it|realized realized realized|that the|two two|processes processes processes|[deformation [deformation [deformation|and the|creation creation creation|of of|topography] topography] topography]|were were|mostly mostly|not not|closely closely closely|related, related, related,|either either|in in|origin origin|or in|time. time.|Very Very Very|wrong. wrong. wrong.|Deformation Deformation Deformation|causes causes|topography, topography, topography,|and the|generation generation generation|of of|topography topography topography|is is|synchronous synchronous synchronous|with with|deformation. deformation. deformation.|I will|email email email|you a|copy copy|of of|Dahlen Dahlen Dahlen|and and|Suppe Suppe Suppe|(1988), (1988), (1988),|which which|shows that|this the|case case|- -|send send send|me message|so have|your your|address address|and and|can can|attach attach attach|a a|PDF. PDF. PDF.|They They|tackle tackle tackle|the the|large-scale large-scale large-scale|deformation deformation deformation|of of|sedimentary sedimentary sedimentary|rocks rocks rocks|via via|folding folding folding|and and|thrusting thrusting thrusting|during during|orogenesis. orogenesis. "orogenesis.|:#" ":#|...fold-belt" ...fold-belt ...fold-belt|mountainous mountainous "mountainous|areas...:" "areas...:" "areas...:|""fold-belt""" """fold-belt""" """fold-belt""|isn't" isn't|used used|professionally professionally|(AFAIK) (AFAIK) (AFAIK)|to to|refer a|collisional collisional collisional|mountain-building mountain-building mountain-building|event. event. event.|A A|minor minor|thing thing|though. though. "though.|:#" Only|in very|youngest, youngest, youngest,|late late late|Cenozoic Cenozoic Cenozoic|mountains mountains mountains|is is|there there|any any|evident evident evident|causal causal causal|relation relation|between between|rock rock rock|structure structure structure|and and|surface surface surface|landscape. landscape. landscape.|and the|following following "following|sentence:" "sentence:" "sentence:|If" I|were were|British, British, British,|I would|call call|this "this|""utter" """utter" """utter|twaddle""." "twaddle""." "twaddle"".|As" I|mentioned mentioned|above, above, above,|there way|for for|many many|of the|exposed exposed exposed|structures structures structures|to the|surface surface|without without|large large|amounts amounts amounts|of of|rock rock|uplift uplift uplift|and and|erosion. erosion. erosion.|And And|as a|matter matter|of of|fact, fact, fact,|the the|trajectory trajectory trajectory|of of|different different different|units units units|of rock|through through|an an|orogen orogen orogen|is in|part part|determined determined determined|by by|patterns patterns patterns|of of|surface surface|erosion. erosion.|To To|keep keep|it it|simple simple|and and|send send|you you|one one|paper, paper, paper,|you'll you'll you'll|find find|this this|in in|and and|at the|end the|paper paper paper|by by|Dahlen Suppe|(1988). (1988). "(1988).|:" "::::::What" "::::::What|are" you|deaf deaf deaf|can't hear|? WAS|HERE. HERE. HERE.|HE HE|POWNS POWNS POWNS|NOOBS NOOBS NOOBS|ALL ALL ALL|DAY! DAY! ":::And" ":::And|as" as|fully fully fully|expected, expected, expected,|yet yet|another another|abusive abusive|admin admin|gets gets|away away|with with|abusing abusing abusing|their ":Grow" ":Grow|up," up,|you you|immature immature immature|little little|brat. brat. brat.|This This|edit edit|warring warring warring|seems seems|to only|thing thing|you do|around around|here. not|vandalize vandalize|pages, pages,|as did|with with|this this|edit edit|to to|American American|Eagle Eagle Eagle|Outfitters. Outfitters. Outfitters.|If do|so, so, so,|you *|The "The|""bold" """bold" """bold|move""" "move""" "move""|was" was|at "at|05:48," "05:48," "05:48,|3" 3|December December December|2013‎ 2013‎ 2013‎|by by|. .|Someone Someone|listed listed|this this|move move|back back|as as|uncontroversial, uncontroversial, uncontroversial,|and have|changed changed|it it|into into|discussed, discussed, discussed,|at "at|Talk:Run" "Talk:Run" "Talk:Run|Devil" Devil Devil|Run Run Run|(Girls' (Girls' (Girls'|Generation Generation Generation|song)#Move? song)#Move? song)#Move?|(2). (2). ==THEN ==THEN|WHY WHY|IS IS|Attacking Attacking Attacking|my my|edits edits|by removing|my page|comments== comments== comments==|THAT IS|SHOWING SHOWING SHOWING|CONTEMPT CONTEMPT CONTEMPT|FOR FOR|OTHER OTHER OTHER|EDITORS EDITORS EDITORS|AND AND|IS IS|VERY VERY VERY|UNCIVIL UNCIVIL UNCIVIL|AS AS|WELL WELL|AS AS|YOU YOU|UNEVEN UNEVEN UNEVEN|AND AND|UNFAIR UNFAIR UNFAIR|LABELING LABELING LABELING|ME... ME... If|there there|was a|cure cure cure|for for|AIDs, AIDs, AIDs,|it would|probably probably|be be|bought bought bought|up up|by by|rich rich rich|jerks jerks|and and|sold sold|for for|double. double. double.|I if|u have|AIDs, AIDs,|then then|that is|sad sad sad|for you,|but but|many many|people people|have have|said said|that the|ones ones|to to|blame blame blame|are are|..... ..... .....|well, well,|I I|wont wont|go go|into into|that that|here. here.|many have|there there|own own|opinion opinion opinion|of of|who who|it it|is. is.|But But|that is|just just|my my|opinion. opinion. opinion.|It It|must must|suck suck suck|to person|with with|Aids. Aids. Aids.|I would|not not|know. know. These These|people are|INSANE. INSANE. INSANE.|== But|then I|rarely rarely rarely|get get|my my|evil evil evil|way way|with with|anything anything|these these|days, days, days,|must must|be be|getting getting|old old|or or|lazy. lazy.|Or Or|perhaps perhaps|both. both. ":I|have" have|painstakingly painstakingly painstakingly|taken taken|the to|scan scan scan|in the|CD CD CD|on my|desk desk desk|showing showing showing|that "that|""Extreme" """Extreme" """Extreme|Jaime""'s" "Jaime""'s" "Jaime""'s|name" "is|""Jaime" """Jaime" """Jaime|Guse""." "Guse""." "Guse"".|Additionally," Additionally, Additionally,|I I|continue point|out out|that that|Hiram Hiram Hiram|skits skits skits|are are|available available available|both both|at at|DaveRyanShow.com DaveRyanShow.com DaveRyanShow.com|and the|Best Best|of of|The The|Dave Dave Dave|Ryan Ryan Ryan|in the|Morning Morning Morning|Show Show Show|CDs. CDs. CDs.|The The|contents contents contents|are are|viewable viewable viewable|on on|Amazon. Amazon. Amazon.|Additionally, have|taken taken|some some|time to|review review|your your|edits edits|and and|history history|on on|Wikipedia. It|appears appears|you to|present present present|yourself yourself|as as|authoritative, authoritative, authoritative,|when when|you are|not. not.|You tried|multiple multiple multiple|times times|to become|an an|Administrator, Administrator, Administrator,|but to|act act act|in in|such a|reckless, reckless, reckless,|inconsistent inconsistent inconsistent|and and|immature immature|manner, manner,|I I|doubt doubt doubt|that will|ever ever|happen. an|encyclopedia encyclopedia encyclopedia|article, article,|especially especially|this "this|bit:" "bit:" "bit:|Armed" Armed Armed|once once once|again again|with a|song song song|that that|possesses possesses possesses|all the|classic classic classic|attributes attributes attributes|of a|successful successful successful|Eurovision Eurovision Eurovision|entry entry|- -|a a|catchy, catchy, catchy,|feel-good feel-good feel-good|melody, melody, melody,|and a|key-change key-change key-change|that that|builds builds builds|up a|big big|finish finish|- -|Chiara Chiara Chiara|is is|highly highly highly|likely likely|to to|enter enter|the the|contest contest|as the|favourites. favourites. favourites.|This newspaper|article. It|should be|removed. removed. removed.|Chiara's Chiara's Chiara's|fame fame fame|is also|not not|worthy worthy worthy|of of|mention mention mention|in encyclopedia.|We We|might might|as well|start start|writing writing|about the|grocer grocer grocer|or or|shopowner shopowner shopowner|round round|the the|corner. corner. die|from from|cancer. cancer. Hard Hard|to be|constructive constructive constructive|when other|party party party|behaves behaves behaves|like a|godking godking godking|thug. thug. ==|Librier Librier Librier|== ==|Anon Anon|raised raised raised|this this|issue issue|in in|their their|edit summary.|I I|agree agree|that this|term term term|seems seems|imprecisely imprecisely imprecisely|added not|accurate. accurate. accurate.|It not|generally generally|or or|strictly strictly strictly|associated associated associated|with the|Kelb Kelb Kelb|tal-Fenek. tal-Fenek. ==|ARRHGH! ARRHGH! ARRHGH!|== ==|Frederica Frederica Frederica|is most|annoying annoying|talking talking|head head|ever Someone|is is|threatning threatning threatning|an an|annon annon annon|and is|uncivilised uncivilised uncivilised|wiki wiki|conduct. conduct. bet|80% 80% 80%|of what|she did|was was|rubbish... rubbish... ==Hello==|Dude Dude Dude|your your|mother mother mother|is is|totally totally totally|hot. hot. doubt|this will|get get|through through|your your|thick thick thick|head head|(it's (it's (it's|not insult,|it's an|opinion opinion|based your|response) response) response)|but but|the the|problem issue|itself. itself. itself.|It's It's|that that|people to|enjoy enjoy|(whether (whether (whether|or your|side side|gets gets|it it|right) right) right)|to to|discuss, discuss, discuss,|turn, turn, turn,|twist twist twist|and and|frankly frankly frankly|abuse abuse abuse|topics topics topics|like this|which which|are are|detrimental detrimental detrimental|to the|basic basic basic|goals goals goals|of of|Wikis Wikis Wikis|in in|general general|and Wikipedia|in in|particular. particular. particular.|As As|John John|Stewart Stewart Stewart|said said|to to|two two|hacks; hacks; hacks;|You're You're|hurting hurting hurting|us. us. 2 2|words words|learn learn learn|them them|SHUT SHUT SHUT|UP UP UP|DONT DONT DONT|FOLLOW FOLLOW FOLLOW|ME ME|EVERYWHERE EVERYWHERE ":::hey" ":::hey|buddy," buddy, buddy,|hey hey|buddy, buddy,|guess guess guess|what? what? "what?|""I""" """I""" """I""|dont" dont|care care|realy realy realy|what "what|""your""" """your""" """your""|excuse" excuse excuse|is, is,|and and|couldn't couldn't|care care|less less|what what|Roaringflamer Roaringflamer Roaringflamer|says, says,|but are|obviously obviously|obsessed obsessed obsessed|with with|redirects. redirects. redirects.|If is|anybody anybody|that that|should be|banned, banned, banned,|its for|vandalism and|disruption disruption disruption|so so|there OOOOHHHH OOOOHHHH|With With With|a big|long long|Intellectually Intellectually Intellectually|Terrifying Terrifying Terrifying|and and|Superior Superior Superior|name name|like "like|""(referenced" """(referenced" """(referenced|to" to|Journal Journal Journal|of of|Labelled Labelled Labelled|Compounds Compounds Compounds|and "and|Radiopharmaceuticals)""." "Radiopharmaceuticals)""." "Radiopharmaceuticals)"".|How" How|Could Could Could|the quote|be be|wrong wrong|Hey!! Hey!! Hey!!|How dare|I I|even even|question question|it, it,|or or|possibly possibly possibly|be be|right, right,|in in|saying saying|the "the|""supposed""" """supposed""" """supposed""|quote" quote|is is|wrong. wrong.|What stupid|ignoramus ignoramus ignoramus|I I|must to|challenge challenge challenge|that. YOUR|THREATENING THREATENING THREATENING|BEHAVIOUR BEHAVIOUR BEHAVIOUR|== ==|== YOUR|CONSTANT CONSTANT CONSTANT|BLOCKING BLOCKING BLOCKING|AND AND|SABOTAGE SABOTAGE SABOTAGE|OF OF|MY MY|EDITS EDITS EDITS|IS IS|TANTAMOUNT TANTAMOUNT TANTAMOUNT|TO TO|STALIKING. STALIKING. STALIKING.|ARE ARE|YOU YOU|STALKING STALKING STALKING|ME? ME? ME?|ARE YOU|THREATENING THREATENING|ME ME|STEVE? STEVE? STEVE?|IS IS|THIS THIS|WHAT WHAT|YOURE YOURE YOURE|ABOUT, ABOUT, ABOUT,|THREATENING THREATENING|AND AND|HARRASSING HARRASSING HARRASSING|ME? ME?|WHY YOU|KEEP KEEP KEEP|STALKING STALKING|ME ME|THROUGH THROUGH|WIKIPEDIA? WIKIPEDIA? WIKIPEDIA?|ARE YOU|A A|TWISTED TWISTED TWISTED|WACKO, WACKO, WACKO,|DO YOU|WISH WISH WISH|ME ME|HARM? HARM? HARM?|WHY? WHY? WHY?|WHY WHY|ARE YOU|HARRASSING HARRASSING|ME!!!!!!!!!!! ME!!!!!!!!!!! ME!!!!!!!!!!!|LEAVE LEAVE LEAVE|ME ME|ALONE ALONE ALONE|YOU YOU|RACIST RACIST RACIST|WACKO!!!!!!!!! WACKO!!!!!!!!! WACKO!!!!!!!!!|== ":O:" ":O:|I" thought|that call|you you|such a|thing. thing.|I a|cookie cookie|so could|get get|bigger bigger bigger|and and|stronger. stronger. stronger.|Obviously Obviously|it it|wasn't wasn't|because you're|a a|fat fat fat|pig. pig. pig.|I'm I'm|sorry sorry|for the|misunderstanding. misunderstanding. It's|those those|biography biography biography|and and|political political political|articles articles|you should|watch watch|out out|for. for. FURTHERMORE.... FURTHERMORE....|I I|HAVE HAVE|JUST JUST|VISITED VISITED VISITED|RAGIB'S RAGIB'S RAGIB'S|PAGE PAGE|AND AND|STUDIED STUDIED STUDIED|THE THE|DISCUSSION DISCUSSION DISCUSSION|AREA. AREA. AREA.|RAGIB RAGIB RAGIB|IS IS|OBVIOUSLY OBVIOUSLY OBVIOUSLY|FROM FROM|BANGLADESH BANGLADESH BANGLADESH|AND AND|SEEMS SEEMS SEEMS|TO TO|BE BE BE|A A|SIMILARLY SIMILARLY SIMILARLY|PAROCHIAL PAROCHIAL PAROCHIAL|CHAUVINIST CHAUVINIST CHAUVINIST|EDITOR EDITOR EDITOR|OF OF|MANY MANY MANY|OTHER OTHER|ARTICLES, ARTICLES,|EVEN EVEN|ASKING ASKING ASKING|FOR FOR|UN-NECESSARY UN-NECESSARY UN-NECESSARY|DELETIONS DELETIONS DELETIONS|OF OF|ARTICLES ARTICLES ARTICLES|THAT THAT|HE HE|DOES DOES|NOT NOT|LIKE..... LIKE..... LIKE.....|AND AND|GETTING GETTING GETTING|SNUBBED SNUBBED SNUBBED|FOR FOR|THE THE|EFFORT!! EFFORT!! I|beg beg beg|your your|pardon? pardon? pardon?|I am|from the|region, region, region,|and and|berbers berbers berbers|are a|minority. minority. minority.|How you|presume presume presume|to know|people's people's people's|origins? origins? origins?|you your|make-belief make-belief make-belief|world, world, world,|but but|do not|post post|it as|fact fact|and don't|delete my|posts posts posts|either either|to to|further further|veil veil veil|the the|truth. truth. truth.|I am|contacting contacting contacting|Wikipedia Wikipedia|immediately immediately immediately|concerning concerning|this this|largely largely largely|fictitious, fictitious, fictitious,|vicious vicious vicious|article and|discussion. discussion. ,|as, as, as,|this my|IP IP|adress adress Would Would|you you|believe believe|it.. it.. it..|This This|frenchie frenchie frenchie|threatens threatens threatens|to to|ban ban|me me|because I|talk talk|badly badly badly|upon upon|Foie Foie Foie|Gras. Gras. Gras.|I already|said said|once once|that is|protected protected protected|by by|lobbyists. lobbyists. lobbyists.|That That|includes includes includes|frog frog frog|eaters. eaters. YOU,|TOO....... TOO....... TOO.......|== YOU|FOR FOR|ATTACKING ATTACKING ATTACKING|ME! ME! is|for for|removing post|on on|100% 100% 100%|== ==|I'm to|DDOS DDOS DDOS|your your|toaster toaster toaster|for for|this. you've|made your|point point|freakin freakin freakin|heck heck heck|what what|do want|me do|huh? I've|explained explained|why why|i i|changed changed|mold mold mold|to to|mould, mould, mould,|i've i've i've|made user|name name|now now|leave leave|me me|alone alone alone|already.... already.... already....|what your|problem. ==|Need Need Need|your your|help help|in Hi|Kansas Kansas Kansas|bear, bear, bear,|I need|your article|called "called|""Sultanate" """Sultanate" """Sultanate|of" "of|Rum""," "Rum""," "Rum"",|vandalized" vandalized|by by|Turkish Turkish Turkish|nationalist nationalist nationalist|and and|even even|including including|dubious dubious dubious|sources sources|from from|books books books|like like|lonelyplanet lonelyplanet lonelyplanet|travel travel travel|guides. guides. guides.|The The|guy guy|has a|profound profound profound|anti anti anti|neutrality neutrality neutrality|agenda, agenda, agenda,|even even|removing the|Persianate Persianate Persianate|description description|of the|state state|and and|changing changing|a a|section section|about about|Sultanate's Sultanate's Sultanate's|architecture, architecture, architecture,|by by|renaming renaming renaming|it "as|""culture""," """culture""," """culture"",|in" in|order order order|to move|around around|the the|sources sources|for Persianate|terms. terms. terms.|I it|needs be|addressed addressed|by by|more than|one one|person person|to to|kick kick kick|out the|nationalistic nationalistic nationalistic|bias bias bias|from the|article. pure|tripe tripe tripe|stolen stolen|from their|bio bio bio|on on|their their|official official official|website, website, website,|which is|outdated outdated outdated|by the|way. way. way.|That's That's|bad bad|wiki wiki|practice. practice. I|saw saw saw|it it|before before|watching watching watching|the the|episode. episode. episode.|Oh Oh|well. Stupid! Stupid!|You're You're|the who|stops stops stops|for for|massive massive massive|and and|undiscussed undiscussed undiscussed|removal removal|on article.|Also, Also,|you you|say say|you're you're|interest in|Chinese Chinese|history history|well well|then go|for for|it it|and don't|ever ever|pay pay pay|attention to|Vietnamese Vietnamese Vietnamese|history. history. Jackson Jackson|didn't didn't|perform perform perform|at the|WMA WMA WMA|because he|can't can't|sing sing sing|at at|all all|anymore. anymore. anymore.|That That|is the|real real|reason reason|he he|hasn't hasn't hasn't|toured toured toured|for a|decade, decade, decade,|along along along|with his|bankruptcy. bankruptcy. bankruptcy.|Even Even|his his|vocals vocals vocals|on "on|""We've" """We've" """We've|Had" Had "Had|Enough""" "Enough""" "Enough""|four" four|years years|ago ago ago|were were|poor poor|and and|he he|never never|had a|strong strong|voice voice voice|to to|begin begin begin|with, with, with,|certainly certainly|not not|comparable comparable comparable|with real|King, King, King,|Elvis Elvis Elvis|Presley. Presley. Presley.|Jackson Jackson|has has|had had|financial financial|problems problems|since since|at least|1998 1998 1998|due due due|to to|his his|declining declining declining|sales sales|and and|popularity, popularity, popularity,|as well|as as|his his|inactivity inactivity inactivity|and having|to to|support support|all all|his his|siblings siblings siblings|and and|parents. parents. parents.|In In|2002 2002 2002|it was|revealed revealed revealed|he in|debt debt|to various|international international international|banks banks banks|to the|tune tune tune|of of|tens tens tens|of of|millions of|dollars, dollars, dollars,|and and|after after|losing losing|those those|lawsuits lawsuits lawsuits|in in|May May May|2003 2003 2003|he was|confirmed confirmed confirmed|as the|verge verge verge|of of|bankuptcy bankuptcy bankuptcy|with with|debts debts debts|of of|$400 $400 $400|million. million. million.|Invincible Invincible Invincible|was a|flop flop flop|because it|sold sold|less less|than a|third third|of his|last last|album, album, "album,|""Dangerous""," """Dangerous""," """Dangerous"",|and" and|it was|thoroughly thoroughly thoroughly|mediocre mediocre mediocre|music. music. music.|Almost Almost|all of|Jackson's Jackson's Jackson's|remaining remaining remaining|fans fans|regard regard regard|it his|worst worst|album. album. album.|In In|1989 1989 1989|Jackson Jackson|made made|it it|known known|he addressed|as the|King King King|of of|Pop Pop Pop|- a|meaningless, meaningless, meaningless,|self-proclaimed self-proclaimed self-proclaimed|title. title. title.|He He|even even|planned planned planned|to to|buy buy buy|Graceland Graceland Graceland|so so|he he|could could|demolish demolish demolish|it, it,|which which|certainly certainly|says says|far far|more more|about about|Jackson's Jackson's|megalomania megalomania megalomania|than than|it does|about about|Presley. Presley.|Half Half Half|the the|songs songs songs|on the|Dangerous Dangerous Dangerous|album album|weren't weren't|good, good, good,|especially the|unbelievably unbelievably unbelievably|awful awful awful|Heal Heal Heal|the the|World, World, World,|and it|only only|sold sold|30 30|million million million|copies copies copies|on the|strength strength strength|of his|previous previous|three three three|albums. albums. albums.|Yeah, Yeah, Yeah,|WJ WJ WJ|was was|unique unique unique|all all|right, right,|but the|less less|said said|about the|better. must|know know|some some|very very|sad sad|20-year-olds 20-year-olds 20-year-olds|if they|still still|admire admire admire|the the|disgraced disgraced disgraced|former former former|King of|Pop. Pop. Pop.|Anyway, Anyway, Anyway,|most people|know know|him him|as as|Wacko Wacko Wacko|Jacko. Jacko. Jacko.|Justin Justin Justin|is real|King Pop|and and|like like|Eminem Eminem Eminem|he he|just just|doesn't doesn't|want to|risk risk risk|offending offending offending|WJ's WJ's WJ's|fans. fans. fans.|Justin Justin|will to|perform, perform, perform,|while while while|Jackson's Jackson's|active active active|career career|finished finished finished|a a|decade decade decade|ago. ago.|( ( (|) ==Appears ==Appears|to to|Be Be Be|Uncontructive?== Uncontructive?== Uncontructive?==|Since Since Since|when when|do do|your your|mere mere mere|feelings feelings feelings|= =|evidence? evidence? evidence?|Get Get|a a|clue clue clue|hypocrite. hypocrite. hypocrite.|You one|being being|unconstructive. unconstructive. WHy WHy|are you|ugly ugly ugly|and and|fat? fat? "::Is" "::Is|that" that|so? so? so?|Than Than Than|why why|so so|many people|questiong questiong questiong|your your|incredibly incredibly incredibly|arrogant, arrogant, arrogant,|and and|entirely entirely entirely|inappropriate inappropriate inappropriate|edit edit|actions? actions? actions?|Maybe Maybe|you're you're|such such|an an|arrogant arrogant|person, person,|you think|YOU YOU|are only|member member member|of the|community community community|that that|matters? matters? Yep, Yep,|he he|be the|mouthpiece, mouthpiece, mouthpiece,|but but|his his|law law law|still still|stands. stands. stands.|Oh, Oh,|that was|friggin' friggin' friggin'|bad. bad. **And **And|we a|winner winner winner|for the|douchiest douchiest douchiest|comment comment|award. award. 65536 0:"" ==RUDE== Dude, you are rude upload that carl picture back, or else. 0 1 2 3 4 5 6 7 8 9 10 11 78649 0:1 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:1 11:1 12:1 13:1 14:1 15:1 16:1 17:1 18:1 19:1 20:1 21:1 22:1 14281:1 15549:1 18532:1 22191:1 23536:1 23628:1 31929:1 32833:1 34566:1 35389:1 37844:1 38980:1 39602:1 44258:1 57516:1 57853:1 58814:1 58940:1 59232:1 63039:1 63431:1 77175:1 78141:1 From 9d1e49c76b5868f920d609da3e297f0b9c905e8d Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Fri, 22 Feb 2019 17:41:50 -0800 Subject: [PATCH 10/12] Ok. I updated entry point... --- test/BaselineOutput/Common/EntryPoints/core_manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/BaselineOutput/Common/EntryPoints/core_manifest.json b/test/BaselineOutput/Common/EntryPoints/core_manifest.json index 3c93f1d3c6..be20dafb9c 100644 --- a/test/BaselineOutput/Common/EntryPoints/core_manifest.json +++ b/test/BaselineOutput/Common/EntryPoints/core_manifest.json @@ -192,7 +192,7 @@ "Required": false, "SortOrder": 150.0, "IsNullable": false, - "Default": "0" + "Default": "R4" }, { "Name": "Source", From 0057fa62768e10050e38e5b59e6a8cba2461a66d Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Mon, 25 Feb 2019 10:12:47 -0800 Subject: [PATCH 11/12] Sync with new things from master --- .../Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs | 4 ++-- test/Microsoft.ML.Tests/ImagesTests.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs b/test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs index 07b26d3d9c..0a83091fd8 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs +++ b/test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs @@ -18,8 +18,8 @@ public static TextLoader GetTextLoader(MLContext mlContext, bool hasHeader, char { return mlContext.Data.CreateTextLoader( new[] { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, 1, 1 + _featureLength) + new TextLoader.Column("Label", DataKind.Single, 0), + new TextLoader.Column("Features", DataKind.Single, 1, 1 + _featureLength) }, separatorChar: separatorChar, hasHeader: hasHeader, diff --git a/test/Microsoft.ML.Tests/ImagesTests.cs b/test/Microsoft.ML.Tests/ImagesTests.cs index 976e7790d5..37208c499d 100644 --- a/test/Microsoft.ML.Tests/ImagesTests.cs +++ b/test/Microsoft.ML.Tests/ImagesTests.cs @@ -677,9 +677,9 @@ public void TestBackAndForthConversionWithoutAlphaNoInterleaveNoOffset() { Columns = new[] { - new TextLoader.Column("ImagePath", DataKind.TX, 0), - new TextLoader.Column("Name", DataKind.TX, 1), - } + new TextLoader.Column("ImagePath", DataKind.String, 0), + new TextLoader.Column("Name", DataKind.String, 1), + } }, new MultiFileSource(dataFile)); var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); From 02e4374b3c8abc2a19f4868be5aebf9b3d04776f Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Mon, 25 Feb 2019 11:19:53 -0800 Subject: [PATCH 12/12] Address comments --- src/Microsoft.ML.Core/Data/DataKind.cs | 2 +- src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs | 2 +- src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs | 10 +++++++--- .../DataLoadSave/Text/TextLoaderParser.cs | 6 +++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Microsoft.ML.Core/Data/DataKind.cs b/src/Microsoft.ML.Core/Data/DataKind.cs index edaf6f7329..7830ee744a 100644 --- a/src/Microsoft.ML.Core/Data/DataKind.cs +++ b/src/Microsoft.ML.Core/Data/DataKind.cs @@ -93,7 +93,7 @@ internal enum InternalDataKind : byte /// Extension methods related to the DataKind enum. /// [BestFriend] - internal static class DataKindExtensions + internal static class InternalDataKindExtensions { public const InternalDataKind KindMin = InternalDataKind.I1; public const InternalDataKind KindLim = InternalDataKind.U16 + 1; diff --git a/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs b/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs index 4d6cadfc36..5c22104cce 100644 --- a/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs @@ -129,7 +129,7 @@ public void Run() if (Utils.Size(nonIdentity) > 0) { ch.Warning("The following kinds did not have an identity conversion: {0}", - string.Join(", ", nonIdentity.OrderBy(k => k).Select(DataKindExtensions.GetString))); + string.Join(", ", nonIdentity.OrderBy(k => k).Select(InternalDataKindExtensions.GetString))); } } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index 1d7e36d4fc..23183aab9b 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -116,7 +116,11 @@ private Column(string name, InternalDataKind kind, Range[] source, KeyCount keyC /// of the items in the column. /// /// It's a public interface to access the information in an internal DataKind. - public DataKind DataKind => Type.ToDataKind(); + public DataKind DataKind + { + get { return Type.ToDataKind(); } + set { Type = value.ToInternalDataKind(); } + } /// /// Source index range(s) of the column. @@ -1491,13 +1495,13 @@ internal static TextLoader CreateTextReader(IHostEnvironment host, switch (memberInfo) { case FieldInfo field: - if (!DataKindExtensions.TryGetDataKind(field.FieldType.IsArray ? field.FieldType.GetElementType() : field.FieldType, out dk)) + if (!InternalDataKindExtensions.TryGetDataKind(field.FieldType.IsArray ? field.FieldType.GetElementType() : field.FieldType, out dk)) throw Contracts.Except($"Field {memberInfo.Name} is of unsupported type."); break; case PropertyInfo property: - if (!DataKindExtensions.TryGetDataKind(property.PropertyType.IsArray ? property.PropertyType.GetElementType() : property.PropertyType, out dk)) + if (!InternalDataKindExtensions.TryGetDataKind(property.PropertyType.IsArray ? property.PropertyType.GetElementType() : property.PropertyType, out dk)) throw Contracts.Except($"Property {memberInfo.Name} is of unsupported type."); break; diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs index 71e0b2b184..205a89bd6e 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs @@ -51,9 +51,9 @@ private ValueCreatorCache() _methVec = new Func>(GetCreatorVecCore) .GetMethodInfo().GetGenericMethodDefinition(); - _creatorsOne = new Func[DataKindExtensions.KindCount]; - _creatorsVec = new Func[DataKindExtensions.KindCount]; - for (var kind = DataKindExtensions.KindMin; kind < DataKindExtensions.KindLim; kind++) + _creatorsOne = new Func[InternalDataKindExtensions.KindCount]; + _creatorsVec = new Func[InternalDataKindExtensions.KindCount]; + for (var kind = InternalDataKindExtensions.KindMin; kind < InternalDataKindExtensions.KindLim; kind++) { var type = ColumnTypeExtensions.PrimitiveTypeFromKind(kind); _creatorsOne[kind.ToIndex()] = GetCreatorOneCore(type);