Natural Language

RSS for tag

Analyze natural language text and deduce its language-specific metadata using Natural Language.

Posts under Natural Language tag

45 Posts

Post

Replies

Boosts

Views

Activity

WeatherKit localization options
I am working on an app that pulls data from weatherKit, including the conditionCode property, the content of which is displayed to the user. I wish to localize the data pulled from weatherKit but when pulling data from: weatherkit.apple.com/api/v1/weather/de/{latitude}/{longitude} The conditionCode and other strings is in english. Same is true if the language parameter is set to es, ja or something else. Am I doing something wrong or is localization yet to be supported in weatherKit? I can't find any documentation on this.
4
0
4.0k
Jan ’24
NLTagger does not enumerate anymore?
I am using NLTagger to tag lexical classes of words, but it suddenly just stopped working. I boiled my code down to the most basic version, but it's never executing the closure of the enumerateTags() function. What do I have to change or what should I try? for e in sentenceArray { let cupcake = "I like you, have a cupcake" tagger.string = cupcake tagger.enumerateTags(in: cupcake.startIndex..<cupcake.endIndex, unit: .word, scheme: .nameTypeOrLexicalClass) { tag, range in print("TAG") return true }
5
1
2.8k
Jan ’24
iOS: Get next word predictions
Does iOS provide an API for getting text predictions based on previous text? I tried with UITextChecker.completions as such let str = "Hello" let range = NSMakeRange(str.utf16.count, 0) let tc = UITextChecker() let completions = tc.completions(forPartialWordRange: range, in: str, language: "en-US") print(completions) However, this only works for completing words, not sentences. Does iOS have a way of doing this? I read somewhere that macOS does. If not, what workarounds/alternatives would you recommend?
0
0
1k
Nov ’23
Find Semantic Similairity Between Models?
In the video of Explore Natural Language multilingual models https://developer.apple.com/videos/play/wwdc2023/10042/, it's said at 6:24 that there are three models. I wonder if it is possible to find semantic similairity between models? For example English and Japanese belong to different models(Latin and CJK), can we compare the vector produced from the different models to find out if two sentences have similar meanings?
1
0
1.6k
Sep ’23
NLEmbedding not found after updating to iOS 14.4
When I try to get the sentence embedding with NLEmbedding.sentenceEmbedding(for: .english), I get nil returned and the message in the console is: "Unable to locate Asset for contextual word embedding model for local en." I've also tried different languages and also NLEmbedding.wordEmbedding(for: .english) doesn't work. This only occurs on my iPhone X after updating to iOS 14.4. Before it worked fine. It also works on the Simulator on iOS 14.4. Did somebody face a similar problem? Or does somebody know how to force iOS to download these embeddings again?
4
1
3k
Jul ’23
NaturalLanguage, Named Entity recognition not working anymore in
The code https://developer.apple.com/documentation/naturallanguage/identifying_people_places_and_organizations works on Swift Playground 4.3.1 under iPad OS but under XCode 14.3.1 the named entities are not recognized and for every word I get: ["Other": 1.0]. Strangely, I had the code work in an iOS App under XCode 14.3.1 but there seems to be some level of unpredictability as to when it works or not. Any hints?
0
1
1.1k
Jul ’23
NaturalLanguage Example Code not working
I am examining the ability of NaturalLanguage to identify placeNames. I ran across the example code in the developer documentation here: https://developer.apple.com/documentation/naturallanguage/identifying_people_places_and_organizations When I execute this example exactly as stated it does not function as expected. Running Xcode 14.3.1 on macOS Ventura 13.4. The code does not find a single tag of any kind in the sample text. Can someone offer an explanation?
1
0
1.5k
Jun ’23
Natural language word segmentation.
Hi community. I was looking for a way to make word segmentation of a string without delimiters and spaces. Apple's Natural language framework does not provide this (I think is strange). I want to achieve something like this: Input: "makesenseofthis" Output: ["make", "sense", "of", "this"] Any third party to do it? Maybe is there any Apple API? Thanks in advance
0
0
1.6k
Jun ’23
Word tagging tools for CreateML?
What tools are folks using to create the json file needed to train a custom word tagger model? I've tried Doccano, but it exports JSONL which is very different than what CreateML is expecting. (example of the required format here: https://developer.apple.com/documentation/naturallanguage/creating_a_word_tagger_model). Are there standard tools or utilities that export/convert to the CreateML format? Thanks.
2
0
3.3k
Apr ’23
ECG Anomaly Dataset
I am a undergraduate research student at a university lab. I am looking to find raw data for the anomaly detection of ECG measured by the apple watch. I understand that Healthkit provides a visual graph of the ECG data. However, I am in need of the numerical data for research purposes. Is there a way for me to get to this dataset?
2
0
2.6k
Mar ’23
iOS 16 TTS is horrible, it doesn’t work!
iOS 15 Siri voices worked perfectly. However, iOS 16 has a lot of issues - such as skipping words and sentences, and stopping reading all together. Obviously, this is a problem with the TTS I myself use Siri to read books while driving, but I regret updating to iOS 16. I went as far as upgrading my iPhone SE to my iPhone 14 Pro thinking it was the memory issue, but it's the same issue on both phones even my Mac M1 Pro with 16Gigs has same issues. https://youtu.be/g58nbW4J0DY It would be nice to receive and update or even a roll back to iOS 15 state of TTS
3
1
2.9k
Jan ’23
How to get auto-suggested word based on drawn Chinese character or stroke info in the form of an array of CGPoint?
I have an array consists of the CGPoint representing the chinese character stroke paths and able to re-draw out the character on UIView. I would like to use this existing information to find out the most similar chinese word. I notice the chinese keyboard hand-writing pad can display the suggested words. However, I have no idea which functions in the documentation that get this to work ( pass the stroke info as CGPoint, and get back suggested Chinese words). What API calls can I use to get the suggested words?
0
0
2.1k
Aug ’22
How to validate NLLanguage values for NLLanguageRecognizer?
I expected the initializer NLLanguage(rawValue: "...") to return nil if I gave it junk, but it doesn't. It accepts any string. I'm loading values from a database so I'd like to know if I'm getting one that is valid, like "en", "es", etc., as opposed to an error. Is there anyway to check that? I'm using it to set NLLanguageRecognizer.languageConstraints, so I guess by "valid" I mean all the languages that work with that property. The struct has a bunch of static constants: struct NLLanguage { static let english = ... static let spanish = ... ... } If those all work with NLLanguageRecognizer I guess I can paste them all into a dictionary.
0
0
1.4k
Jul ’22
Parse data from natural language text using SiriKit
I want to add a feature where a user can type a request using natural language to trigger different actions within my app (eg. "Create an assignment due tomorrow at midnight", "Create a high priority assignment called Final Presentation"). I'd like to leverage SiriKit to process this text, parse the data, and handle the response like I would if the user had asked Siri. First, is this even possible to do? Second, if not what other technologies could I use to parse natural language text?
1
0
1.8k
Jul ’22
Use of Apples Thesaurus & Translator
Hey, I’m wondering if it’s possible to use the Translation service by Apple when selecting text like it’s possible in safari or other apps developed by apple. For example in notes or others you can select text and hit the translate button, which shows the translation to the systems language as far as I know. My question now is if it is possible to also provide this feature in my own app. To be more specific, having a selectable text view , then being able to translate this wording and maybe even get the results not only shown to the user himself but returning the translation to my own app for further processes … as far as I know, the standard dictionary entries are provided by Oxford or in Germany by Duden api services. Is it even possible to the app to choose which service to use and another question: is it possible to customize the options popping up when text is selected? (The view where also “copy”,”paste”,”cut”…. Is shown -> extend options with “translate”? Many thanks for your help. Unfortunately, I haven’t found an answer to those questions. My only thought has been to use external api by Oxford etc but first I would like to be in knowledge of the possibility or unavailability of the given service already implemented by apple to iOS and macOS devices. Have a great day. À bientôt
3
0
3.1k
Jun ’22
WeatherKit localization options
I am working on an app that pulls data from weatherKit, including the conditionCode property, the content of which is displayed to the user. I wish to localize the data pulled from weatherKit but when pulling data from: weatherkit.apple.com/api/v1/weather/de/{latitude}/{longitude} The conditionCode and other strings is in english. Same is true if the language parameter is set to es, ja or something else. Am I doing something wrong or is localization yet to be supported in weatherKit? I can't find any documentation on this.
Replies
4
Boosts
0
Views
4.0k
Activity
Jan ’24
NLTagger does not enumerate anymore?
I am using NLTagger to tag lexical classes of words, but it suddenly just stopped working. I boiled my code down to the most basic version, but it's never executing the closure of the enumerateTags() function. What do I have to change or what should I try? for e in sentenceArray { let cupcake = "I like you, have a cupcake" tagger.string = cupcake tagger.enumerateTags(in: cupcake.startIndex..<cupcake.endIndex, unit: .word, scheme: .nameTypeOrLexicalClass) { tag, range in print("TAG") return true }
Replies
5
Boosts
1
Views
2.8k
Activity
Jan ’24
iOS: Get next word predictions
Does iOS provide an API for getting text predictions based on previous text? I tried with UITextChecker.completions as such let str = "Hello" let range = NSMakeRange(str.utf16.count, 0) let tc = UITextChecker() let completions = tc.completions(forPartialWordRange: range, in: str, language: "en-US") print(completions) However, this only works for completing words, not sentences. Does iOS have a way of doing this? I read somewhere that macOS does. If not, what workarounds/alternatives would you recommend?
Replies
0
Boosts
0
Views
1k
Activity
Nov ’23
Find Semantic Similairity Between Models?
In the video of Explore Natural Language multilingual models https://developer.apple.com/videos/play/wwdc2023/10042/, it's said at 6:24 that there are three models. I wonder if it is possible to find semantic similairity between models? For example English and Japanese belong to different models(Latin and CJK), can we compare the vector produced from the different models to find out if two sentences have similar meanings?
Replies
1
Boosts
0
Views
1.6k
Activity
Sep ’23
NLEmbedding not found after updating to iOS 14.4
When I try to get the sentence embedding with NLEmbedding.sentenceEmbedding(for: .english), I get nil returned and the message in the console is: "Unable to locate Asset for contextual word embedding model for local en." I've also tried different languages and also NLEmbedding.wordEmbedding(for: .english) doesn't work. This only occurs on my iPhone X after updating to iOS 14.4. Before it worked fine. It also works on the Simulator on iOS 14.4. Did somebody face a similar problem? Or does somebody know how to force iOS to download these embeddings again?
Replies
4
Boosts
1
Views
3k
Activity
Jul ’23
NaturalLanguage, Named Entity recognition not working anymore in
The code https://developer.apple.com/documentation/naturallanguage/identifying_people_places_and_organizations works on Swift Playground 4.3.1 under iPad OS but under XCode 14.3.1 the named entities are not recognized and for every word I get: ["Other": 1.0]. Strangely, I had the code work in an iOS App under XCode 14.3.1 but there seems to be some level of unpredictability as to when it works or not. Any hints?
Replies
0
Boosts
1
Views
1.1k
Activity
Jul ’23
NaturalLanguage Example Code not working
I am examining the ability of NaturalLanguage to identify placeNames. I ran across the example code in the developer documentation here: https://developer.apple.com/documentation/naturallanguage/identifying_people_places_and_organizations When I execute this example exactly as stated it does not function as expected. Running Xcode 14.3.1 on macOS Ventura 13.4. The code does not find a single tag of any kind in the sample text. Can someone offer an explanation?
Replies
1
Boosts
0
Views
1.5k
Activity
Jun ’23
Natural language word segmentation.
Hi community. I was looking for a way to make word segmentation of a string without delimiters and spaces. Apple's Natural language framework does not provide this (I think is strange). I want to achieve something like this: Input: "makesenseofthis" Output: ["make", "sense", "of", "this"] Any third party to do it? Maybe is there any Apple API? Thanks in advance
Replies
0
Boosts
0
Views
1.6k
Activity
Jun ’23
Word tagging tools for CreateML?
What tools are folks using to create the json file needed to train a custom word tagger model? I've tried Doccano, but it exports JSONL which is very different than what CreateML is expecting. (example of the required format here: https://developer.apple.com/documentation/naturallanguage/creating_a_word_tagger_model). Are there standard tools or utilities that export/convert to the CreateML format? Thanks.
Replies
2
Boosts
0
Views
3.3k
Activity
Apr ’23
ECG Anomaly Dataset
I am a undergraduate research student at a university lab. I am looking to find raw data for the anomaly detection of ECG measured by the apple watch. I understand that Healthkit provides a visual graph of the ECG data. However, I am in need of the numerical data for research purposes. Is there a way for me to get to this dataset?
Replies
2
Boosts
0
Views
2.6k
Activity
Mar ’23
iOS 16 TTS is horrible, it doesn’t work!
iOS 15 Siri voices worked perfectly. However, iOS 16 has a lot of issues - such as skipping words and sentences, and stopping reading all together. Obviously, this is a problem with the TTS I myself use Siri to read books while driving, but I regret updating to iOS 16. I went as far as upgrading my iPhone SE to my iPhone 14 Pro thinking it was the memory issue, but it's the same issue on both phones even my Mac M1 Pro with 16Gigs has same issues. https://youtu.be/g58nbW4J0DY It would be nice to receive and update or even a roll back to iOS 15 state of TTS
Replies
3
Boosts
1
Views
2.9k
Activity
Jan ’23
How to get auto-suggested word based on drawn Chinese character or stroke info in the form of an array of CGPoint?
I have an array consists of the CGPoint representing the chinese character stroke paths and able to re-draw out the character on UIView. I would like to use this existing information to find out the most similar chinese word. I notice the chinese keyboard hand-writing pad can display the suggested words. However, I have no idea which functions in the documentation that get this to work ( pass the stroke info as CGPoint, and get back suggested Chinese words). What API calls can I use to get the suggested words?
Replies
0
Boosts
0
Views
2.1k
Activity
Aug ’22
How to validate NLLanguage values for NLLanguageRecognizer?
I expected the initializer NLLanguage(rawValue: "...") to return nil if I gave it junk, but it doesn't. It accepts any string. I'm loading values from a database so I'd like to know if I'm getting one that is valid, like "en", "es", etc., as opposed to an error. Is there anyway to check that? I'm using it to set NLLanguageRecognizer.languageConstraints, so I guess by "valid" I mean all the languages that work with that property. The struct has a bunch of static constants: struct NLLanguage { static let english = ... static let spanish = ... ... } If those all work with NLLanguageRecognizer I guess I can paste them all into a dictionary.
Replies
0
Boosts
0
Views
1.4k
Activity
Jul ’22
Parse data from natural language text using SiriKit
I want to add a feature where a user can type a request using natural language to trigger different actions within my app (eg. "Create an assignment due tomorrow at midnight", "Create a high priority assignment called Final Presentation"). I'd like to leverage SiriKit to process this text, parse the data, and handle the response like I would if the user had asked Siri. First, is this even possible to do? Second, if not what other technologies could I use to parse natural language text?
Replies
1
Boosts
0
Views
1.8k
Activity
Jul ’22
Use of Apples Thesaurus & Translator
Hey, I’m wondering if it’s possible to use the Translation service by Apple when selecting text like it’s possible in safari or other apps developed by apple. For example in notes or others you can select text and hit the translate button, which shows the translation to the systems language as far as I know. My question now is if it is possible to also provide this feature in my own app. To be more specific, having a selectable text view , then being able to translate this wording and maybe even get the results not only shown to the user himself but returning the translation to my own app for further processes … as far as I know, the standard dictionary entries are provided by Oxford or in Germany by Duden api services. Is it even possible to the app to choose which service to use and another question: is it possible to customize the options popping up when text is selected? (The view where also “copy”,”paste”,”cut”…. Is shown -> extend options with “translate”? Many thanks for your help. Unfortunately, I haven’t found an answer to those questions. My only thought has been to use external api by Oxford etc but first I would like to be in knowledge of the possibility or unavailability of the given service already implemented by apple to iOS and macOS devices. Have a great day. À bientôt
Replies
3
Boosts
0
Views
3.1k
Activity
Jun ’22