Questions tagged [nslinguistictagger]
18 questions
58
votes
8 answers
Converting a Vision VNTextObservation to a String
I'm looking through the Apple's Vision API documentation and I see a couple of classes that relate to text detection in UIImages:
1) class VNDetectTextRectanglesRequest
2) class VNTextObservation
It looks like they can detect characters, but I don't…

Adrian
- 16,233
- 18
- 112
- 180
22
votes
3 answers
How to detect text (string) language in iOS?
For instance, given the following strings:
let textEN = "The quick brown fox jumps over the lazy dog"
let textES = "El zorro marrón rápido salta sobre el perro perezoso"
let textAR = "الثعلب البني السريع يقفز فوق الكلب الكسول"
let textDE = "Der…

Ahmad F
- 30,560
- 17
- 97
- 143
6
votes
2 answers
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 *availSchemes = [NSLinguisticTagger availableTagSchemesForLanguage:@"en"];
for (NSLinguisticTagScheme…

Will Von Ullrich
- 2,129
- 2
- 15
- 42
4
votes
1 answer
NSLinguisticTagger enumerateTagsInRange doesn't work on device with NSLinguisticTagSchemeNameTypeOrLexicalClass
Here's the code I'm using, it prints nothing no matter what sentence I use on the device. On simulator it works fine!
- (NSMutableArray *)getTagEntries:(NSString *)sentence {
NSArray *tagSchemes = [NSLinguisticTagger…

BigCheesy
- 1,128
- 8
- 14
4
votes
1 answer
Value of type 'NSLinguisticTag' has no member 'range'
I have text direction code its working good with swift 3 but after migration to swift 4, I got error
let tagScheme = [NSLinguisticTagScheme.language]
let tagger = NSLinguisticTagger(tagSchemes: tagScheme, options: 0)
tagger.string =…

Sam
- 137
- 7
4
votes
1 answer
Identifying person names with NSLinguisticTagger
I am tinkering with the NSLinguisticTagger.
Identifying basic word types like noun, verb, prepositions works really well.
However the recognition of person names NSLinguisticTagPersonalName hardly works in my tests (iOS8). Places…

Bernd
- 11,133
- 11
- 65
- 98
2
votes
1 answer
Swift NSLinguisticTagger results for languages other than English
I'm currently checking out Swift's NSLinguisticTagger. For test purposes I used the code from appcoda Introduction to Natural Language Processing.
For the English language it works as expected and described in the tutorial. But when I use…

Krid
- 269
- 1
- 3
- 14
2
votes
1 answer
use of undeclared type NSLinguisticTagScheme
I have the code working in a playground, and Xcode shows no bugs, but when I compile the file on the command line it comes back with the errors
use of undeclared type NSLinguisticTagScheme
and String has no member 'tokenType'
Heres the problem…

aj604
- 21
- 2
2
votes
0 answers
Xamarin and NSLinguisticTagger - bug or incorrect usage?
I am trying to integrate syntactic parsing into an iOS app written in Xamarin.iOS (4.03) on Visual Studio 2017. To get my feet wet I created the simplest of apps.
a single page app
2 UITextViews, one named SentenceInput, one named SentenceOutput
a…

Marakai
- 1,163
- 11
- 26
2
votes
1 answer
NSLinguisticTaggerOptions in swift
Is this a bug in swift ? or am i missing something here i have declared the following
let opts = (NSLinguisticTaggerOptions.OmitWhitespace | NSLinguisticTaggerOptions.JoinNames)
i get the following error
fatal error: Can't unwrap…

isaiah_p
- 325
- 1
- 8
1
vote
0 answers
Linguistic schemes got removed from old devices
I'm using NSLinguisticTagger for my application and it was working fine across all devices with iOS 11 and above. Recently, the 2 older devices (6s and iPad mini) stopped recognizing the tags, only returned "Other" tag.
On a different thread,…

Anujin Munkhbat
- 11
- 1
1
vote
1 answer
IOS/Objective-C: NSLinguisticTagger for Recognizing Named Entities
Apple provides an for using the tagger to identify named entities in Swift but not for Objective-C.
Here is the Swift example they provide:
let text = "The American Red Cross was established in Washington, D.C., by Clara Barton."
let tagger =…

user6631314
- 1,751
- 1
- 13
- 44
0
votes
1 answer
How to detect the dominant language of a text word?
It's looks good for string but it's not working for me for a word. I am working with search as per as my requirement when user typing any 3 character in the meantime looking to check which language user typing. if I think it should not work with…

Nazmul Hasan
- 10,130
- 7
- 50
- 73
0
votes
1 answer
How to add names to NSLinguisticTagger?
I'm currently doing work with people using speech recognition and detecting names in speech. This works well however I'm having issues with names. I'm in Wales and many people around have Welsh names (including me). I have a CSV of all the Welsh…

Osian
- 171
- 1
- 14
0
votes
1 answer
NSLinguisticTagger: Filter out Specified Token Depending on Tag Type
I am trying to filter out specific tokens based on their tags. When I run my code I get this as the output. I want to only retrieve the adjectives and have that outputted. Is there an easy way to do this?
Hello: NSLinguisticTag(_rawValue:…

Jazzin
- 45
- 2
- 8