我有文字指示码其工作良好,快捷3,但迁移到SWIFT 4后,我得到了错误 let tagScheme = [NSLinguisticTagScheme.language]
let tagger = NSLinguisticTagger(tagSchemes: tagScheme, options: 0)
tagger.string = self.text
let la
我需要一个关键字(这是它的词汇形式)与文本匹配,返回是否关键字匹配(就像一个搜索引擎) 例如 text: I want some apples
keyword: apple
result: matched
keyword: banana
result: not matched
这是我的方法,我总是空的标签 - (BOOL)matchKeywordWithText:(NSString *
我的代码在操场的工作,和Xcode中显示没有错误,但是当我编译命令行上的文件时,它用错误 use of undeclared type NSLinguisticTagScheme
and String has no member 'tokenType'
继承人的问题代码回来。 let tagSchemes : [NSLinguisticTagScheme] = [ .tokenType]