ShareReadability
Settings.cs
Go to the documentation of this file.
1 using System.Collections.Generic;
2 using System.IO;
3 
4 namespace ShareReadability.Container
5 {
6  /// @file Settings.cs
7  /// <summary>
8  /// This class represents a container for the settings from the GUI.
9  /// </summary>
10  public class Settings
11  {
12  private const string DefaultDictionary = "data/dictionary/1000_most_common_english_words.txt";
13  private const string DefaultWhitelist = "data/whitelist.txt";
14 
15  /// <summary>
16  /// Constructor of the settings.
17  /// </summary>
18  public Settings()
19  {
20  WhitelistPath = DefaultWhitelist;
21  DictionaryPath = Path.Combine(Directory.GetCurrentDirectory(), DefaultDictionary);
22  Dictionary = new List<string>(File.ReadAllLines(DictionaryPath));
23  AverageWordLengthWeight = 0.2f;
24  SentenceLengthWeight = 0.2f;
25  VocabularyComplexityWeight = 0.2f;
26  NominalFormsWeight = 0.2f;
27  SentenceStructureComplexityWeight = 0.2f;
28  }
29 
30  // Whitelist
31  public string WhitelistPath { get; set; }
32 
33  // Dictionary
34  public string DictionaryPath { get; set; }
35  public List<string> Dictionary { get; set; }
36 
37  // Weights for the features
38  public float AverageWordLengthWeight { get; set; }
39  public float SentenceLengthWeight { get; set; }
40  public float VocabularyComplexityWeight { get; set; }
41  public float NominalFormsWeight { get; set; }
42  public float SentenceStructureComplexityWeight { get; set; }
43  }
44 }
Settings()
Constructor of the settings.
Definition: Settings.cs:18