2018-09-29 04:21:44 +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>
|
|
|
|
|
|
void Vectorize();
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Array shape
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Shape Shape { get; set; }
|
2018-09-13 04:33:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|