2018-10-16 19:47:11 +00:00
|
|
|
|
//using Bigtree.Algorithm.Matrix;
|
2018-09-26 22:09:39 +00:00
|
|
|
|
using System;
|
2018-09-13 04:33:34 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.NLP.Featuring
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IFeatureExtractor
|
|
|
|
|
|
{
|
2018-09-13 20:01:40 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Feature dimension size
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
int Dimension { get; set; }
|
2018-09-26 22:09:39 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The whole corpus
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
List<Sentence> Sentences { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Feature names
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
List<String> Features { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// All words and frequency
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
List<Tuple<String, int>> Dictionary { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Vectorize sentence
|
|
|
|
|
|
/// </summary>
|
2018-10-03 21:49:40 +00:00
|
|
|
|
void Vectorize(List<string> features);
|
2018-09-26 22:09:39 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Array shape
|
|
|
|
|
|
/// </summary>
|
2018-10-16 19:47:11 +00:00
|
|
|
|
//Shape Shape { get; set; }
|
2018-10-03 22:28:47 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Pre-trained model file path
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
string ModelFile { get; set; }
|
2018-09-13 04:33:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|