VB.NET:
Dim dictionary0 As WordList = WordList.CreateFromFiles("C:\Users\Aaron\CAG Suite\English Dic\English (American).dic")
Dim ok0 As Boolean = dictionary0.Check("Color")
Dim suggestions As IEnumerable(Of String) = dictionary0.Suggest("Color")
Dim notOk0 As Boolean = dictionary0.Check("Colour")
'Or
Using dictionaryStream2 As Stream = File.OpenRead("C:\Users\Cal\CG Visual Studio\Net6\CAG Suite\English Dic\English (American).dic")
Using affixStream2 As Stream = File.OpenRead("C:\Users\Cal\CG Visual Studio\Net6\CAG Suite\English Dic\English (American).aff")
Dim dictionary2 As WordList = WordList.CreateFromStreams(dictionaryStream2, affixStream2)
Dim ok2 As Boolean = dictionary2.Check("the")
Dim notOk2 As Boolean = Dictionary2.Check("teh")
End Using
End Using
I'm guessing that WordList.CreateFromFiles will also need to read the .aff file so the second approach might be better.
The above works OK but the dictionary files should be embedded in the .exe file.
I know I did something like this in the past but can't rmember how.
What's the best way to include the .dic fit in the .exe file.
Last edited: