示例#1
0
        static void Main(string[] args)
        {
            try
            {
                TextStorage ts = TextStorage.Instance;
                Console.WriteLine(" \n Text with all separators: ");
                ts.showTextWithSeparators(false);

                TextAnalyser ta = new FiltersAnalyser(ts, 1);
                ta.check();
                ta = new ExclusionsAnalyser(ts, -1);
                ta.check();

                Console.WriteLine(" \n\n Result: ");
                ts.showTextWithSeparators(true, ConsoleColor.DarkMagenta);
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
示例#2
0
 public ExclusionsAnalyser(TextStorage ts, int weight)
     : base(ts, weight)
 {
     exclusions = new List <string>(System.IO.File.ReadAllLines("exclusions", Encoding.UTF8));
 }
示例#3
0
 public FiltersAnalyser(TextStorage ts, int weight)
     : base(ts, weight)
 {
     filters = new List <string>(System.IO.File.ReadAllLines("filters", Encoding.UTF8));
 }
示例#4
0
 public LexicalAnalyser(TextStorage ts) : base(ts)
 {
 }
示例#5
0
 public PatternAnalyser(TextStorage ts, int weight) : base(ts)
 {
     this.weight = weight;
 }
示例#6
0
 public TextAnalyser(TextStorage ts)
 {
     this.ts = ts;
 }
示例#7
0
 public ExclusionsAnalyser(TextStorage ts, int weight)
     : base(ts,weight)
 {
     exclusions = new List<string>(System.IO.File.ReadAllLines("exclusions", Encoding.UTF8));
 }
示例#8
0
 public TextAnalyser(TextStorage ts)
 {
     this.ts = ts;
 }
示例#9
0
 public PatternAnalyser(TextStorage ts, int weight)
     : base(ts)
 {
     this.weight = weight;
 }
示例#10
0
 public LexicalAnalyser(TextStorage ts)
     : base(ts)
 {
 }
示例#11
0
 public FiltersAnalyser(TextStorage ts, int weight)
     : base(ts,weight)
 {
     filters = new List<string>(System.IO.File.ReadAllLines("filters", Encoding.UTF8));
 }