Beispiel #1
0
        public TestForm()
        {
            InitializeComponent();

            // create wordnet engine (use disk-based retrieval by default)
            string root = Directory.GetDirectoryRoot(".");

            _wordNetEngine = new WordNetEngine("C:/Git/EZI/dict/", false);

            if (!_wordNetEngine.InMemory)
            {
                test.Text += " (will take a while)";
            }

            // populate POS list
            foreach (WordNetEngine.POS p in Enum.GetValues(typeof(WordNetEngine.POS)))
            {
                if (p != WordNetEngine.POS.None)
                {
                    pos.Items.Add(p);
                }
            }

            pos.SelectedIndex = 0;

            // allow scrolling of synset list
            synSets.HorizontalScrollbar = true;

            _semSimSs1 = _semSimSs2 = null;
            _origSsLbl = ss1.Text;
            _semanticSimilarityModel = new WordNetSimilarityModel(_wordNetEngine);
        }
Beispiel #2
0
 public General()
 {
     // maintaining one WordNetEngine for all tests
     // this might be dumb but giving it a try in hopes of increased efficiency
     // another option might be to set inMemory to false
     _wordNetEngine = TestHelper.WordNetEngine;
     _semanticSimilarityModel = new WordNetSimilarityModel(_wordNetEngine);
 }