How to add NSLinguisticTagger Scheme if doesn't exist

Viewed 208

I need to get stem of word. So i can't get if lemma scheme doesn't exist for english.

Here's the code that i'm testing available tag schemes :

    let tagSchemes = NSLinguisticTagger.availableTagSchemes(forLanguage: "en")
    print(tagSchemes)

and this is output:

[__C.NSLinguisticTagScheme(_rawValue: TokenType),
     __C.NSLinguisticTagScheme(_rawValue: Language),
     __C.NSLinguisticTagScheme(_rawValue: Script)]

Notice that, simulators will return all scheme. My issue is on my device. You can try 'fr' or 'de' except 'en'.

1 Answers
Related