Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Tamba
Apr 5, 2010

Searching thorugh massive piles of XML souns like a performance nightmare, so importing it into some kind of database is probably your best bet.

Or, if you want to cheat, you could look at how aedict did it
https://code.google.com/p/aedict/

Adbot
ADBOT LOVES YOU

Tamba
Apr 5, 2010

Are you trying to download something in the main thread? That's not allowed anymore, but it should produce this exception:
https://developer.android.com/reference/android/os/NetworkOnMainThreadException.html

Tamba
Apr 5, 2010

Karthe posted:

I want to underline certain words in a Japanese sentence, but without any kind of white space around the underlined words, it's hard to tell when one word ends and another begins.


https://mecab.googlecode.com/svn/trunk/mecab/doc/index.html
Mecab seems to have an option that just adds spaces around everything (-O, or search for "わかち書きをする" on that page)

I can't find an android version, and the java-version just seems to call the library via JNI, so might have to screw around with compiling that library for android if you need to use it on the device itself.

Tamba
Apr 5, 2010

Yeah, it's quite powerful, but if the task is "insert spaces around japanese words", you probably won't get around parsing the sentence to understand where the words are.

If you only need spaces around whatever you're trying to underline, then adding a space for every word you find shouldn't be too difficult?

Tamba
Apr 5, 2010

I like that more, because reading Japanese with spaces feels kind of strange. But using different colors makes it seems like you're marking different things with each color, which could be confusing.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply