00steveng / nsstring-japanese Goto Github PK
View Code? Open in Web Editor NEWNSString category methods for working with Japanese strings
License: MIT License
NSString category methods for working with Japanese strings
License: MIT License
In my application, I use "stringByTransliteratingJapaneseToHiragana" method to transform Japanese like a Kanji or Katakana to Hiragana, it worked.
But when use environment as iOS 8.1, "stringByTransliteratingJapaneseToHiragana" method always return nil.
I found that on:
CFStringTokenizerTokenType result = CFStringTokenizerAdvanceToNextToken(tok);
In iOS 8.1, the result always was "kCFStringTokenizerTokenNone".
Do you know how to fix it.
Thank you very much.
P.S. Sorry for my poor english.
Dear Mr Steven Grace
I am a fresher with Object-C and I would like to make an application that it can convert between romaji, kanji, katakana, hiragana. I had searched and found out sample source code that it meet with my demand at https://github.com/00StevenG/NSString-Japanese link.
I has downloaded source code from this link and run it in Xcode. The application has run normally but functions convert between romaji, hiragana, katakana and kanji are not working. When I executed debug, I has recognized that the source code as below always return only value is kCFStringTokenizerTokenNone.
// create a tokenizer to enumerate by WORD
CFStringTokenizerRef tok = CFStringTokenizerCreate(NULL,
(CFStringRef)self,
CFRangeMake(0,self.length),
kCFStringTokenizerUnitWord,
CFLocaleCreate(kCFAllocatorDefault, CFSTR("Japanese")));
// goto the first token in the string
CFStringTokenizerTokenType result =CFStringTokenizerAdvanceToNextToken(tok);
So that code below is never executed and can not convert romaji, hiragana, katakana, kanji.
while(result !=kCFStringTokenizerTokenNone){
...
}
Below is the text that I used as parameter to pass into your app
"映画作品"
Could you please point out or give me any hints to cope with this problem.
Best regards,
Vuong Nguyen
There are some nice methods here :) 👍
I have a question:
Does +(NSArray*)possibleJapaneseCompletionsForString:(NSString*)aString
really work? I've been trying completionsForPartialWordRange:inString:language:
with @"JA", @"ja_jp", @"ja", @"jp" and several other remote combinations. No luck.
I wonder how are you dealing with it? Japanese does not appear in the list of availableLanguages
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.