Does anyone understand why this is happening?
On any simulator all of the schemes are found with the following code:
NSArray<NSLinguisticTagScheme> *availSchemes = [NSLinguisticTagger availableTagSchemesForLanguage:@"en"];
for (NSLinguisticTagScheme scheme in availSchemes) {
NSLog(@"Tag scheme %@", scheme);
}
yielding the following:
2018-02-13 09:12:54.066970-0500 MY_APP[79671:5737063] Tag scheme Language
2018-02-13 09:12:54.067160-0500 MY_APP[79671:5737063] Tag scheme Script
2018-02-13 09:12:54.067300-0500 MY_APP[79671:5737063] Tag scheme TokenType
2018-02-13 09:12:54.067425-0500 MY_APP[79671:5737063] Tag scheme LexicalClass
2018-02-13 09:12:54.067541-0500 MY_APP[79671:5737063] Tag scheme NameType
2018-02-13 09:12:54.067655-0500 MY_APP[79671:5737063] Tag scheme NameTypeOrLexicalClass
2018-02-13 09:12:54.067768-0500 MY_APP[79671:5737063] Tag scheme Lemma
However, on my device (iPhone 6s iOS 11.2) I receive the following..
2018-02-13 09:13:09.834879-0500 MY_APP[4327:313598] Tag scheme Language
2018-02-13 09:13:09.835256-0500 MY_APP[4327:313598] Tag scheme Script
2018-02-13 09:13:09.835556-0500 MY_APP[4327:313598] Tag scheme TokenType
Can anyone help explain to me why I cannot access the other schemes? In particular I am looking to be able to use the NSLinguisticTagSchemeLexicalClass
with NSLinguisticTagger
. Currently this issue is causing the tagger to tag any word as (OtherWord), instead of it's true part of speech.
Any help would be appreciated..
UPDATE
ALL physical devices give me the same results - only three available schemes... I am at a loss here.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…