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.
A simulator is designed to create an environment that contains all of the software variables and configurations that will exist in an app's actual production environment. In contrast, an emulator attempts to mimic all of the hardware features of a production environment and software features.
Simulation. For iOS apps, a simulator creates an environment that mimics the behaviors, variables, and configurations that exist in an app's production environment. For Android apps, an emulator is designed to mimic all of the hardware and software features for the production environment of a real device.
In the automation industry, both simulation and emulation is used when designing, commissioning and operating automation systems in e.g. factories, distribution centers and airports. The essential difference is in the control system that controls the simulated automation system.
Emulators mimic all the hardware and software functionalities of real mobile devices for development purposes. However, they do not replicate the device's behavior and its configurations.
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 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...
Uninstall the target language...then reinstall it.
I guess this "reset" the language package to re-include these schemes. Happy codinggg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With