Natural Language

RSS for tag

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

Posts under Natural Language tag

51 Posts

Post

Replies

Boosts

Views

Activity

Can I get sample code for this keynote?
I am a student from a non-English speaking country. I would like to get the sample code from the "Make apps smarter with Natural Language" keynote on dynamic word embeddings and custom sentence embeddings. I can't find relevant examples on google to keep learning about it. I hope the developer community can share the full text of the sample code for the Nosh app and Merch app in the video. Thanks Vivek and Doug.
1
0
1k
Jan ’22
Can I get sample code for WWDC20 Make apps smarter with Natural Language?
I am a student from a non-English speaking country. I would like to get the sample code from the "Make apps smarter with Natural Language" keynote on dynamic word embeddings and custom sentence embeddings. I can't find relevant examples on google to keep learning about it. I hope the developer community can share the full text of the sample code for the Nosh app and Merch app in the video. Thanks Vivek and Doug.
1
0
853
Jan ’22
Natural Language framework error
am using Natural Language framework on a Swift Playground XCode version is 13.0 (13A233) and sometimes at random, it stops processing the string and get these two errors: Class _PathPoint is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x11f3eca78) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x131eb48b0). One of the two will be used. Which one is undefined. objc[15209]: Class _PointQueue is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x11f3eca50) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x131eb48d8). One of the two will be used. Which one is undefined. It seems that something inside NLTagger is confused about these two classes but I cannot determine what is causing it, as sometimes it works fine and other times it shows these errors and the string is left without fully processing. Has anyone found this issue before and any potential solution? The playground seems to keep going, so it is not an error forwarded to my code, but the NLP process is not affecting all the string when it happens.
0
0
1.1k
Oct ’21
MLWordEmbedding
Question 1: I'm trying to follow along with the code from WWDC20-10657 , but my Xcode won't recognise MLWordEmbedding . I am importing Natural Language, CoreML and CreateML Question 2: More generally - I have not grasped how an .mlmodel (which I built in Playgrounds from my domain specific text corpus) can be easily converted into a custom sentence embedding. Right now I have 'something' that I can use in that I brute force unpacked the .mlmodel into [key: [vector]] dictionary, which I am now trying the reformat as a custom embedding - but the video implied that the .mlmodel could be used more or less directly.
1
0
976
Oct ’21
Can NLTokenizer handle .sentence s?
My app would significantly benefit from being able to identify sentences in text. So I'm trying NLTokenizer, since the api makes it looks like it could do that. I'm not able to obtain sentences as tokens. However, if I change the unit to words or paragraphs, I do get words and paragraphs respectively. Am I missing something or is this a bug? Here's some small example code: let source = "It was many and many a year ago, in a kingdom by the sea. \"Quiet\", said the raven." let tokenizer = NLTokenizer(unit: .sentence) tokenizer.string = source tokenizer.setLanguage(.english) print("begin") let tokens = tokenizer.tokens(for: source.startIndex..<source.endIndex).map({ range in return source[range] }) print(tokens) print("end") I expected to get: begin  ["It was many and many a year ago, in a kingdom by the sea.", "\"Quiet\", said the raven."] end But what I actually get is: begin [] end I found a blog where someone had claimed they had iterated the sentences using NLTokenizer, but when I examined his output, he had actually enumerated the words. macOS 10.15.6 beta 1
1
0
1.2k
Aug ’21
NLTagger tagHypotheses always returns a single entry
Hi, I noticed that the NLTagger is always returning a dictionary with a single entry when using tagHypotheses. However for some words I was expecting to see several entries with different probability. Shouldn't that be the case? Is there something to set to alter this behaviour outside of setting maximumCount to a value greater than 1? For example, we know that "drive" can be a verb or a noun. But tagHypotheses() will only return the most likely based on context in the sentence (either verb or noun) and completely ignore the other one when returning the results dictionary. Interestingly if you submit "drive" as the only item in the string linked to the tagger, it will say it is a verb. However, if you submit "drive, roam" then tagHypotheses will say that both are nouns (and no probability for either of them being a verb)... Thanks! --------- Code used for testing ------- tagger.enumerateTags(             in: text.startIndex..<text.endIndex,              unit: .word,              scheme: .lexicalClass,              options: [.omitWhitespace, .omitPunctuation, .omitOther, .joinNames]         ) { (tag, range) -> Bool in             let (hypotheses, range) = tagger.tagHypotheses(                 at: range.lowerBound,                  unit: .word,                  scheme: .lexicalClass,                  maximumCount: 5             )             print(hypotheses.count, String(text[range]))
0
0
927
Jul ’21
NLTagger not getting number 46
I'm working with NLTagger to enumerate tags to know what kind of word is in a sentence. If I have "Route 45" I get "Noun" for Route and "Number" for 45. It is working ok except for number 46. If I have "Route 46" I get "Noun" for Route and "Pronoun" but if I only have a String with "46" it gets identified as a Number. Does anyone know what is happening here?
0
0
526
Jun ’21
Can I get sample code for this keynote?
I am a student from a non-English speaking country. I would like to get the sample code from the "Make apps smarter with Natural Language" keynote on dynamic word embeddings and custom sentence embeddings. I can't find relevant examples on google to keep learning about it. I hope the developer community can share the full text of the sample code for the Nosh app and Merch app in the video. Thanks Vivek and Doug.
Replies
1
Boosts
0
Views
1k
Activity
Jan ’22
Can I get sample code for WWDC20 Make apps smarter with Natural Language?
I am a student from a non-English speaking country. I would like to get the sample code from the "Make apps smarter with Natural Language" keynote on dynamic word embeddings and custom sentence embeddings. I can't find relevant examples on google to keep learning about it. I hope the developer community can share the full text of the sample code for the Nosh app and Merch app in the video. Thanks Vivek and Doug.
Replies
1
Boosts
0
Views
853
Activity
Jan ’22
Natural Language framework error
am using Natural Language framework on a Swift Playground XCode version is 13.0 (13A233) and sometimes at random, it stops processing the string and get these two errors: Class _PathPoint is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x11f3eca78) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x131eb48b0). One of the two will be used. Which one is undefined. objc[15209]: Class _PointQueue is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x11f3eca50) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x131eb48d8). One of the two will be used. Which one is undefined. It seems that something inside NLTagger is confused about these two classes but I cannot determine what is causing it, as sometimes it works fine and other times it shows these errors and the string is left without fully processing. Has anyone found this issue before and any potential solution? The playground seems to keep going, so it is not an error forwarded to my code, but the NLP process is not affecting all the string when it happens.
Replies
0
Boosts
0
Views
1.1k
Activity
Oct ’21
MLWordEmbedding
Question 1: I'm trying to follow along with the code from WWDC20-10657 , but my Xcode won't recognise MLWordEmbedding . I am importing Natural Language, CoreML and CreateML Question 2: More generally - I have not grasped how an .mlmodel (which I built in Playgrounds from my domain specific text corpus) can be easily converted into a custom sentence embedding. Right now I have 'something' that I can use in that I brute force unpacked the .mlmodel into [key: [vector]] dictionary, which I am now trying the reformat as a custom embedding - but the video implied that the .mlmodel could be used more or less directly.
Replies
1
Boosts
0
Views
976
Activity
Oct ’21
Is there a big difference between CFStringTokenizer and NLTokenizer ?
We are thinking about using NLTokenizer which is currently using CFStringTokenizer . What are the differences or advantages between the two APIs?
Replies
0
Boosts
0
Views
631
Activity
Sep ’21
NLP Datasets Example
Hi everybody, for my app that is a dictionary I need to create some ML to analyze the text the users inputs in to search bar of my app to do correct search of word asked. I need principally POS and Lemmatization ML. Can you give me some example of dataset?
Replies
0
Boosts
0
Views
1.1k
Activity
Aug ’21
Can NLTokenizer handle .sentence s?
My app would significantly benefit from being able to identify sentences in text. So I'm trying NLTokenizer, since the api makes it looks like it could do that. I'm not able to obtain sentences as tokens. However, if I change the unit to words or paragraphs, I do get words and paragraphs respectively. Am I missing something or is this a bug? Here's some small example code: let source = "It was many and many a year ago, in a kingdom by the sea. \"Quiet\", said the raven." let tokenizer = NLTokenizer(unit: .sentence) tokenizer.string = source tokenizer.setLanguage(.english) print("begin") let tokens = tokenizer.tokens(for: source.startIndex..<source.endIndex).map({ range in return source[range] }) print(tokens) print("end") I expected to get: begin  ["It was many and many a year ago, in a kingdom by the sea.", "\"Quiet\", said the raven."] end But what I actually get is: begin [] end I found a blog where someone had claimed they had iterated the sentences using NLTokenizer, but when I examined his output, he had actually enumerated the words. macOS 10.15.6 beta 1
Replies
1
Boosts
0
Views
1.2k
Activity
Aug ’21
NLTagger tagHypotheses always returns a single entry
Hi, I noticed that the NLTagger is always returning a dictionary with a single entry when using tagHypotheses. However for some words I was expecting to see several entries with different probability. Shouldn't that be the case? Is there something to set to alter this behaviour outside of setting maximumCount to a value greater than 1? For example, we know that "drive" can be a verb or a noun. But tagHypotheses() will only return the most likely based on context in the sentence (either verb or noun) and completely ignore the other one when returning the results dictionary. Interestingly if you submit "drive" as the only item in the string linked to the tagger, it will say it is a verb. However, if you submit "drive, roam" then tagHypotheses will say that both are nouns (and no probability for either of them being a verb)... Thanks! --------- Code used for testing ------- tagger.enumerateTags(             in: text.startIndex..<text.endIndex,              unit: .word,              scheme: .lexicalClass,              options: [.omitWhitespace, .omitPunctuation, .omitOther, .joinNames]         ) { (tag, range) -> Bool in             let (hypotheses, range) = tagger.tagHypotheses(                 at: range.lowerBound,                  unit: .word,                  scheme: .lexicalClass,                  maximumCount: 5             )             print(hypotheses.count, String(text[range]))
Replies
0
Boosts
0
Views
927
Activity
Jul ’21
Change app name and description without upload a new build
Hi, I would like to change only the name and the description of my app in the apple store, but I want to do it without uploading a new build, because it doesn't have sense that the user has to download a new version if the only change is going to be the marketing in the apple store
Replies
0
Boosts
0
Views
759
Activity
Jul ’21
Application language
How can I delete all languages and add only English in app store? Ap
Replies
0
Boosts
0
Views
544
Activity
Jul ’21
NLTagger not getting number 46
I'm working with NLTagger to enumerate tags to know what kind of word is in a sentence. If I have "Route 45" I get "Noun" for Route and "Number" for 45. It is working ok except for number 46. If I have "Route 46" I get "Noun" for Route and "Pronoun" but if I only have a String with "46" it gets identified as a Number. Does anyone know what is happening here?
Replies
0
Boosts
0
Views
526
Activity
Jun ’21