Package apple.foundation
Class NSLinguisticTagger
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.foundation.NSLinguisticTagger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceNSLinguisticTagger.Block_enumerateTagsForStringRangeUnitSchemeOptionsOrthographyUsingBlockstatic interfaceNSLinguisticTagger.Block_enumerateTagsInRangeSchemeOptionsUsingBlockstatic interfaceNSLinguisticTagger.Block_enumerateTagsInRangeUnitSchemeOptionsUsingBlock-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSLinguisticTagger(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static NSLinguisticTaggeralloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static NSArray<java.lang.String>availableTagSchemesForLanguage(java.lang.String language)Clients wishing to know the tag schemes supported in NSLinguisticTagger for a particular language at the word level may query them with this method.static NSArray<java.lang.String>availableTagSchemesForUnitLanguage(long unit, java.lang.String language)Clients wishing to know the tag schemes supported in NSLinguisticTagger for a particular unit and language may query them with this method.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()java.lang.StringdominantLanguage()Returns the top identified language (if any) for the entire string.static java.lang.StringdominantLanguageForString(java.lang.String string)The following class methods are conveniences for clients who wish to perform a single analysis on a string without having to create an instance of NSLinguisticTagger.static voidenumerateTagsForStringRangeUnitSchemeOptionsOrthographyUsingBlock(java.lang.String string, NSRange range, long unit, java.lang.String scheme, long options, NSOrthography orthography, NSLinguisticTagger.Block_enumerateTagsForStringRangeUnitSchemeOptionsOrthographyUsingBlock block)voidenumerateTagsInRangeSchemeOptionsUsingBlock(NSRange range, java.lang.String tagScheme, long opts, NSLinguisticTagger.Block_enumerateTagsInRangeSchemeOptionsUsingBlock block)Methods that do not specify a unit act at the word level.voidenumerateTagsInRangeUnitSchemeOptionsUsingBlock(NSRange range, long unit, java.lang.String scheme, long options, NSLinguisticTagger.Block_enumerateTagsInRangeUnitSchemeOptionsUsingBlock block)The tagger will segment the string as needed into tokens for the given unit, and return those ranges along with a tag for any scheme in its array of tag schemes.static longhash_static()NSLinguisticTaggerinit()NSLinguisticTaggerinitWithTagSchemesOptions(NSArray<java.lang.String> tagSchemes, long opts)An instance of NSLinguisticTagger is created with an array of tag schemes.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()NSOrthographyorthographyAtIndexEffectiveRange(long charIndex, NSRange effectiveRange)NSArray<java.lang.String>possibleTagsAtIndexSchemeTokenRangeSentenceRangeScores(long charIndex, java.lang.String tagScheme, NSRange tokenRange, NSRange sentenceRange, org.moe.natj.general.ptr.Ptr<NSArray<? extends NSValue>> scores)Deprecated method for obtaining a list of possible tags for the token at a given index.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)NSRangesentenceRangeForRange(NSRange range)Returns a range covering all sentences intersecting the given range.voidsetOrthographyRange(NSOrthography orthography, NSRange range)If clients know the orthography for a given portion of the string, they may supply it to the tagger.voidsetString(java.lang.String value)static voidsetVersion_static(long aVersion)java.lang.Stringstring()voidstringEditedInRangeChangeInLength(NSRange newRange, long delta)If the string attached to the tagger is mutable, this method must be called to inform the tagger whenever the string changes.static org.moe.natj.objc.Classsuperclass_static()java.lang.StringtagAtIndexSchemeTokenRangeSentenceRange(long charIndex, java.lang.String scheme, NSRange tokenRange, NSRange sentenceRange)java.lang.StringtagAtIndexUnitSchemeTokenRange(long charIndex, long unit, java.lang.String scheme, NSRange tokenRange)static java.lang.StringtagForStringAtIndexUnitSchemeOrthographyTokenRange(java.lang.String string, long charIndex, long unit, java.lang.String scheme, NSOrthography orthography, NSRange tokenRange)NSArray<java.lang.String>tagSchemes()static NSArray<java.lang.String>tagsForStringRangeUnitSchemeOptionsOrthographyTokenRanges(java.lang.String string, NSRange range, long unit, java.lang.String scheme, long options, NSOrthography orthography, org.moe.natj.general.ptr.Ptr<NSArray<? extends NSValue>> tokenRanges)NSArray<java.lang.String>tagsInRangeSchemeOptionsTokenRanges(NSRange range, java.lang.String tagScheme, long opts, org.moe.natj.general.ptr.Ptr<NSArray<? extends NSValue>> tokenRanges)NSArray<java.lang.String>tagsInRangeUnitSchemeOptionsTokenRanges(NSRange range, long unit, java.lang.String scheme, long options, org.moe.natj.general.ptr.Ptr<NSArray<? extends NSValue>> tokenRanges)NSRangetokenRangeAtIndexUnit(long charIndex, long unit)Returns the range corresponding to the token for the given unit that contains the given character index.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSLinguisticTagger alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
availableTagSchemesForLanguage
public static NSArray<java.lang.String> availableTagSchemesForLanguage(java.lang.String language)
Clients wishing to know the tag schemes supported in NSLinguisticTagger for a particular language at the word level may query them with this method. The language should be specified using a standard abbreviation as with NSOrthography.
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
enumerateTagsInRangeSchemeOptionsUsingBlock
public void enumerateTagsInRangeSchemeOptionsUsingBlock(NSRange range, java.lang.String tagScheme, long opts, NSLinguisticTagger.Block_enumerateTagsInRangeSchemeOptionsUsingBlock block)
Methods that do not specify a unit act at the word level.
-
init
public NSLinguisticTagger init()
-
initWithTagSchemesOptions
public NSLinguisticTagger initWithTagSchemesOptions(NSArray<java.lang.String> tagSchemes, long opts)
An instance of NSLinguisticTagger is created with an array of tag schemes. The tagger will be able to supply tags corresponding to any of the schemes in this array.
-
orthographyAtIndexEffectiveRange
public NSOrthography orthographyAtIndexEffectiveRange(long charIndex, NSRange effectiveRange)
-
possibleTagsAtIndexSchemeTokenRangeSentenceRangeScores
public NSArray<java.lang.String> possibleTagsAtIndexSchemeTokenRangeSentenceRangeScores(long charIndex, java.lang.String tagScheme, NSRange tokenRange, NSRange sentenceRange, org.moe.natj.general.ptr.Ptr<NSArray<? extends NSValue>> scores)
Deprecated method for obtaining a list of possible tags for the token at a given index.
-
sentenceRangeForRange
public NSRange sentenceRangeForRange(NSRange range)
Returns a range covering all sentences intersecting the given range.
-
setOrthographyRange
public void setOrthographyRange(NSOrthography orthography, NSRange range)
If clients know the orthography for a given portion of the string, they may supply it to the tagger. Otherwise, the tagger will infer the language from the contents of the text. In each case, the charIndex or range passed in must not extend beyond the end of the tagger's string, or the methods will raise an exception.
-
setString
public void setString(java.lang.String value)
-
string
public java.lang.String string()
-
stringEditedInRangeChangeInLength
public void stringEditedInRangeChangeInLength(NSRange newRange, long delta)
If the string attached to the tagger is mutable, this method must be called to inform the tagger whenever the string changes. The newRange is the range in the final string which was explicitly edited, and delta is the change in length from the previous version to the current version of the string. Alternatively, the client may call setString: again to reset all information about the string, but this has the disadvantage of not preserving information about portions of the string that have not changed.
-
tagAtIndexSchemeTokenRangeSentenceRange
public java.lang.String tagAtIndexSchemeTokenRangeSentenceRange(long charIndex, java.lang.String scheme, NSRange tokenRange, NSRange sentenceRange)
-
tagSchemes
public NSArray<java.lang.String> tagSchemes()
-
tagsInRangeSchemeOptionsTokenRanges
public NSArray<java.lang.String> tagsInRangeSchemeOptionsTokenRanges(NSRange range, java.lang.String tagScheme, long opts, org.moe.natj.general.ptr.Ptr<NSArray<? extends NSValue>> tokenRanges)
-
availableTagSchemesForUnitLanguage
public static NSArray<java.lang.String> availableTagSchemesForUnitLanguage(long unit, java.lang.String language)
Clients wishing to know the tag schemes supported in NSLinguisticTagger for a particular unit and language may query them with this method. The language should be specified using a standard BCP-47 language tag as with NSOrthography.
-
dominantLanguage
public java.lang.String dominantLanguage()
Returns the top identified language (if any) for the entire string. Convenience for tagAtIndex: with NSLinguisticTagSchemeLanguage and NSLinguisticTaggerUnitDocument.
-
dominantLanguageForString
public static java.lang.String dominantLanguageForString(java.lang.String string)
The following class methods are conveniences for clients who wish to perform a single analysis on a string without having to create an instance of NSLinguisticTagger. If more than one tagging operation is needed on a given string, it is more efficient to use an explicit NSLinguisticTagger instance.
-
enumerateTagsForStringRangeUnitSchemeOptionsOrthographyUsingBlock
public static void enumerateTagsForStringRangeUnitSchemeOptionsOrthographyUsingBlock(java.lang.String string, NSRange range, long unit, java.lang.String scheme, long options, NSOrthography orthography, NSLinguisticTagger.Block_enumerateTagsForStringRangeUnitSchemeOptionsOrthographyUsingBlock block)
-
enumerateTagsInRangeUnitSchemeOptionsUsingBlock
public void enumerateTagsInRangeUnitSchemeOptionsUsingBlock(NSRange range, long unit, java.lang.String scheme, long options, NSLinguisticTagger.Block_enumerateTagsInRangeUnitSchemeOptionsUsingBlock block)
The tagger will segment the string as needed into tokens for the given unit, and return those ranges along with a tag for any scheme in its array of tag schemes. The fundamental tagging method on NSLinguisticTagger is a block iterator, that iterates over all tokens intersecting a given range, supplying tags and ranges. There are several additional convenience methods, for obtaining a sentence range, information about a single token, or for obtaining information about all tokens intersecting a given range at once, in arrays. In each case, the charIndex or range passed in must not extend beyond the end of the tagger's string, or the methods will raise an exception. Note that a given instance of NSLinguisticTagger should not be used from more than one thread simultaneously.
-
tagAtIndexUnitSchemeTokenRange
public java.lang.String tagAtIndexUnitSchemeTokenRange(long charIndex, long unit, java.lang.String scheme, NSRange tokenRange)
-
tagForStringAtIndexUnitSchemeOrthographyTokenRange
public static java.lang.String tagForStringAtIndexUnitSchemeOrthographyTokenRange(java.lang.String string, long charIndex, long unit, java.lang.String scheme, NSOrthography orthography, NSRange tokenRange)
-
tagsForStringRangeUnitSchemeOptionsOrthographyTokenRanges
public static NSArray<java.lang.String> tagsForStringRangeUnitSchemeOptionsOrthographyTokenRanges(java.lang.String string, NSRange range, long unit, java.lang.String scheme, long options, NSOrthography orthography, org.moe.natj.general.ptr.Ptr<NSArray<? extends NSValue>> tokenRanges)
-
tagsInRangeUnitSchemeOptionsTokenRanges
public NSArray<java.lang.String> tagsInRangeUnitSchemeOptionsTokenRanges(NSRange range, long unit, java.lang.String scheme, long options, org.moe.natj.general.ptr.Ptr<NSArray<? extends NSValue>> tokenRanges)
-
tokenRangeAtIndexUnit
public NSRange tokenRangeAtIndexUnit(long charIndex, long unit)
Returns the range corresponding to the token for the given unit that contains the given character index.
-
-