Add label.txt and h5 files
This commit is contained in:
parent
fc96c36dc0
commit
26ba03fceb
|
|
@ -196,7 +196,10 @@ public class IntentClassifier
|
|||
|
||||
public string[] GetLabels()
|
||||
{
|
||||
return GetFiles().Select(x => Path.GetFileNameWithoutExtension(x)).ToArray();
|
||||
var agentService = _services.CreateScope().ServiceProvider.GetRequiredService<IAgentService>();
|
||||
string rootDirectory = Path.Combine(agentService.GetDataDir(), _settings.RAW_DATA_DIR, _settings.LABEL_FILE_NAME);
|
||||
var labelText = File.ReadAllLines(rootDirectory);
|
||||
return labelText.OrderBy(x => x).ToArray();
|
||||
}
|
||||
|
||||
public string TextClean(string text)
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@ public class ClassifierSetting
|
|||
|
||||
public string RAW_DATA_DIR { get; set; } = "raw_data";
|
||||
public string MODEL_DIR { get; set; } = "models";
|
||||
public string LABEL_FILE_NAME { get; set; } = "label.txt";
|
||||
}
|
||||
|
|
|
|||
BIN
src/WebStarter/data/models/intent-classifier.h5
Normal file
BIN
src/WebStarter/data/models/intent-classifier.h5
Normal file
Binary file not shown.
3
src/WebStarter/data/raw_data/label.txt
Normal file
3
src/WebStarter/data/raw_data/label.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
goodbye
|
||||
greeting
|
||||
other
|
||||
Loading…
Reference in a new issue