@@ -14,7 +14,7 @@ public static ColumnInferenceResults InferColumns(MLContext context, string path
1414 bool hasHeader , char ? separatorChar , bool ? allowQuotedStrings , bool ? supportSparse , bool trimWhitespace , bool groupColumns )
1515 {
1616 var sample = TextFileSample . CreateFromFullFile ( path ) ;
17- var splitInference = InferSplit ( sample , separatorChar , allowQuotedStrings , supportSparse ) ;
17+ var splitInference = InferSplit ( context , sample , separatorChar , allowQuotedStrings , supportSparse ) ;
1818 var typeInference = InferColumnTypes ( context , sample , splitInference , hasHeader , labelColumnIndex , null ) ;
1919
2020 // if no column is named label,
@@ -32,7 +32,7 @@ public static ColumnInferenceResults InferColumns(MLContext context, string path
3232 char ? separatorChar , bool ? allowQuotedStrings , bool ? supportSparse , bool trimWhitespace , bool groupColumns )
3333 {
3434 var sample = TextFileSample . CreateFromFullFile ( path ) ;
35- var splitInference = InferSplit ( sample , separatorChar , allowQuotedStrings , supportSparse ) ;
35+ var splitInference = InferSplit ( context , sample , separatorChar , allowQuotedStrings , supportSparse ) ;
3636 var typeInference = InferColumnTypes ( context , sample , splitInference , true , null , label ) ;
3737 return InferColumns ( context , path , label , true , splitInference , typeInference , trimWhitespace , groupColumns ) ;
3838 }
@@ -93,10 +93,10 @@ public static ColumnInferenceResults InferColumns(MLContext context, string path
9393 } ;
9494 }
9595
96- private static TextFileContents . ColumnSplitResult InferSplit ( TextFileSample sample , char ? separatorChar , bool ? allowQuotedStrings , bool ? supportSparse )
96+ private static TextFileContents . ColumnSplitResult InferSplit ( MLContext context , TextFileSample sample , char ? separatorChar , bool ? allowQuotedStrings , bool ? supportSparse )
9797 {
9898 var separatorCandidates = separatorChar == null ? TextFileContents . DefaultSeparators : new char [ ] { separatorChar . Value } ;
99- var splitInference = TextFileContents . TrySplitColumns ( sample , separatorCandidates ) ;
99+ var splitInference = TextFileContents . TrySplitColumns ( context , sample , separatorCandidates ) ;
100100
101101 // respect passed-in overrides
102102 if ( allowQuotedStrings != null )
0 commit comments