feat: add SstData with DictionaryFile and word knowledge
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import Testing
|
||||
@testable import SstData
|
||||
|
||||
struct SystemWordKnowledgeTests {
|
||||
let knowledge = SystemWordKnowledge()
|
||||
|
||||
@Test func recognisesEnglishAndDutchWords() {
|
||||
#expect(knowledge.isWord("cloud"))
|
||||
#expect(knowledge.isWord("Cloud"))
|
||||
#expect(knowledge.isWord("vandaag"))
|
||||
}
|
||||
|
||||
@Test func doesNotTreatProductNamesAsWords() {
|
||||
#expect(!knowledge.isWord("vercel"))
|
||||
#expect(!knowledge.isWord("supabase"))
|
||||
#expect(!knowledge.isWord("anthropic"))
|
||||
}
|
||||
|
||||
@Test func functionWordsComeFromTheBuiltInList() {
|
||||
#expect(knowledge.isFunctionWord("de"))
|
||||
#expect(knowledge.isFunctionWord("The"))
|
||||
#expect(!knowledge.isFunctionWord("vercel"))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user