设备与模拟器语言方案 [英] Device vs. Simulator Linguistic Schemes
问题描述
有没有人理解为什么会发生这种情况?
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);
}
产生以下结果:
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
但是,在我的设备上( iPhone 6s iOS 11.2 ),我收到以下内容..
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
任何人都可以帮我解释为什么我不能访问其他方案?特别是我希望能够使用 NSLinguisticTagSchemeLexicalClass
和 NSLinguisticTagger
。目前,此问题导致标记器将任何字标记为(OtherWord),而不是它的真正词性。
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..
更新
所有物理设备给我相同的结果 - 只有三个可用的方案......我在这里不知所措。
ALL physical devices give me the same results - only three available schemes... I am at a loss here.
推荐答案
经过不懈的研究,不眠之夜,以及三次前往病房,我发现了问题所在。虽然修复无论如何都是穷人的解决方案,但它仍然有效。
After tireless research, sleepless nights, and three trips to the ward, I found out the problem. While the fix was by all means the poor man's solution, it worked nonetheless.
For 无论什么原因我的iPhone 6s iOS 11.2.5在我最初设置手机时不想安装所有可用的语言方案?无论是那个还是它决定在无聊的时候删除它们。
For whatever reason my iPhone 6s iOS 11.2.5 didn't feel like installing all of the available linguistic schemes when I originally set up my phone? Either that or it decided to remove them one day when it was bored.
无论如何,解决方案是......鼓滚......
Regardless, the solution was... drum roll...
卸载目标语言...然后重新安装。
<我猜这个重置语言包重新包含这些方案。快乐的编码
I guess this "reset" the language package to re-include these schemes. Happy codinggg
这篇关于设备与模拟器语言方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!