Closed
Description
Since the object being created is a "TextLoader", I'd recommend the method's name to say so, instead of "TextReader" which looks like a different type.
I mean code like the following feels confusing:
TextLoader textLoader = mlContext.Data.TextReader(new TextLoader.Arguments()
{
Separator = "tab",
HasHeader = true,
Column = new[]
{
new TextLoader.Column("Label", DataKind.Bool, 0),
new TextLoader.Column("Text", DataKind.Text, 1)
}
});
In addition to that, methods should have a verb as part of the name, so if what it is doing is to create a TextReader, let's say so, as:
mlContext.Data.CreateTextLoader()
We're not being consistent now when having some methods with a verb but other methods just a noun:
It is also against C# conventions (and most languages). A method's name should have a verb describing the action being performed by that method: