Learning Japanese From Zero

Continue or start your personal language log here, including logs for challenge participants
golyplot
Black Belt - 1st Dan
Posts: 1745
Joined: Mon Jan 16, 2017 9:41 pm
Languages: Am. English (N), German, French, ASL (abandoned), Spanish, Dutch, Italian, Japanese (N2)
Language Log: https://forum.language-learners.org/vie ... 15&t=12230
x 3461

Re: Japanese listening from nothing: 2020 Log

Postby golyplot » Fri Mar 06, 2020 4:32 pm

Unfortunately, I've been bitten a lot with procrastination and distraction, so I haven't done much lately besides continuing WK.

There's a bit of a paradox where whenever I try something, I want to do something else. It's hard to remember the WK vocab without seeming them in usage in the wild, but it's also hard to read native content when you don't know the words and grammar, and likewise for listening practice and grammar.

This morning, I decided to try reading NHK News Easy. I was pleasantly surprised that I could recognize many of the words, although I still couldn't actually understand anything. Like, I see 中国と韓国から来る人は国が決めた所に2週間いてもらう, and I can tell that it is something about China and Korea and a decision and a week, but I still can't actually understand it. Reading Japanese is like puzzling over a Sudoku puzzle where half the clues are missing. But I suppose if I keep at it long enough and keep looking up words and grammar, it will get easier.

P.S. It sure is a pain to remove the ruby from copy pasted text. If only there was a way to copy them without it. I'm surprised computers can't handle that yet in this day and age.
0 x

User avatar
ryanheise
Green Belt
Posts: 459
Joined: Tue Jun 04, 2019 3:13 pm
Location: Australia
Languages: English (N), Japanese (beginner)
x 1681
Contact:

Re: Japanese listening from nothing: 2020 Log

Postby ryanheise » Fri Mar 06, 2020 11:33 pm

golyplot wrote:P.S. It sure is a pain to remove the ruby from copy pasted text. If only there was a way to copy them without it. I'm surprised computers can't handle that yet in this day and age.


Someone should make a greasemonkey script for this. But until then, I can think of two DIY approaches.

Approach #1: Vim

(Edit: As ロータス discovered, you can actually just copy and paste directly from the webpage into ANY text editor, or this forum post box, or a Gmail compose window, etc. etc. and it will remove the ruby. I would recommend that approach, although the approaches below might still be useful in the context of scripting and automation.)

if you have the Vim text editor, you can do quite powerful text manipulations, for example, remove ruby.

If you select the text on the webpage, then right-click and view selection source (in Firefox at least), then copy that section of HTML, then paste it into Vim (here's where you will really get stuck if don't know how to use Vim), then run this command to remove the ruby tags:

Code: Select all

:%s/<rt>.\{-}<\/rt>//g|%s/<.\{-}>//g


You can set a hotkey to do these commands in a single keystroke.

Approach #2: Javascript console

In firefox, if you hit Ctrl+Shift+I, it brings up the developer tools. From there, click the "Console" tab where you can type some code, and type this:

Code: Select all

var rts = document.getElementsByTagName("rt");
while (rts.length > 0) rts[0].parentNode.removeChild(rts[0]);


The ruby will be removed from the page in place.

(Edit: I also recommend the copy and paste technique over this one. Although if you are thinking of writing a browser extension or Greasemonkey script, the above code is exactly what you'd need to get started.)
Last edited by ryanheise on Sat Mar 07, 2020 12:26 am, edited 1 time in total.
2 x

User avatar
ryanheise
Green Belt
Posts: 459
Joined: Tue Jun 04, 2019 3:13 pm
Location: Australia
Languages: English (N), Japanese (beginner)
x 1681
Contact:

Re: Japanese listening from nothing: 2020 Log

Postby ryanheise » Sat Mar 07, 2020 12:18 am

ロータス wrote:Another way is by downloading Sublime Text. It removes the ruby automatically when you paste it. Also if you paste the text here (on this forums post box), it also doesn't show the ruby you copied. Found that out just now lol.


Cool find :-) Just realised that also happens if you copy and paste directly from the page into Vim. Basically, if you copy and paste into anything, it will remove the Ruby.
1 x

golyplot
Black Belt - 1st Dan
Posts: 1745
Joined: Mon Jan 16, 2017 9:41 pm
Languages: Am. English (N), German, French, ASL (abandoned), Spanish, Dutch, Italian, Japanese (N2)
Language Log: https://forum.language-learners.org/vie ... 15&t=12230
x 3461

Re: Japanese listening from nothing: 2020 Log

Postby golyplot » Sat Mar 07, 2020 2:04 am

ryanheise wrote:you can actually just copy and paste directly from the webpage into ANY text editor, or this forum post box, or a Gmail compose window, etc. etc. and it will remove the ruby.


ロータス wrote:Also if you paste the text here (on this forums post box), it also doesn't show the ruby you copied. Found that out just now lol.


I tried those, but they didn't work. The whole reason I was complaining in the first place was because I wanted to paste the title of this article into my previous log entry, but it showed up with ruby no matter what I did (中国ちゅうごくと韓国かんこくから来くる人ひとは国くにが決きめた所ところに2週間しゅうかんいてもらう), so I had to tediously remove them by hand after pasting.
0 x

User avatar
ryanheise
Green Belt
Posts: 459
Joined: Tue Jun 04, 2019 3:13 pm
Location: Australia
Languages: English (N), Japanese (beginner)
x 1681
Contact:

Re: Japanese listening from nothing: 2020 Log

Postby ryanheise » Sat Mar 07, 2020 5:02 am

Just tested, and this will work in Firefox, but not Chrome.
0 x

golyplot
Black Belt - 1st Dan
Posts: 1745
Joined: Mon Jan 16, 2017 9:41 pm
Languages: Am. English (N), German, French, ASL (abandoned), Spanish, Dutch, Italian, Japanese (N2)
Language Log: https://forum.language-learners.org/vie ... 15&t=12230
x 3461

Re: Japanese listening from nothing: 2020 Log

Postby golyplot » Sat Mar 07, 2020 5:15 am

I was using Chrome, so that would explain it. Oh well.
0 x

crush
Blue Belt
Posts: 514
Joined: Mon Nov 30, 2015 3:35 pm
Languages: EN (N), ES, ZH
Maintain: EUS, YUE, JP, HAW
Study: TGL, SV
On Hold: RU
x 953

Re: Japanese listening from nothing: 2020 Log

Postby crush » Sat Mar 07, 2020 11:31 am

Alternatively, from the DevTools window (Ctrl+Shift+I) you can just hide the 'rt' tags:

Code: Select all

document.getElementsByTagName('rt').forEach(rt => rt.style.display= 'none');


This will make it behave like Firefox (which doesn't include the ruby tags when copying, Chrome does). You can hide the rt tags, copy, then unhide the tags. For example, this line will do just that (copy the highlighted text without the ruby tags):

Code: Select all

document.getElementsByTagName('rt').forEach(rt => rt.style.display = 'none'); document.execCommand('copy'); document.getElementsByTagName('rt').forEach(rt => rt.style.display = '');


(Edit: that can/should all be on one line, so you can just copy/paste into the console as one command)
2 x

User avatar
devilyoudont
Blue Belt
Posts: 571
Joined: Tue Jun 26, 2018 1:34 am
Location: Philadelphia
Languages: EN (N), EO (C), JA (B), ES (A)
Language Log: https://forum.language-learners.org/vie ... 15&t=16424
x 1829
Contact:

Re: Japanese listening from nothing: 2020 Log

Postby devilyoudont » Sat Mar 07, 2020 6:29 pm

Using Firefox and it doesn't grab the ruby even without any modification.

Using Chrome: Clicking the below button hides the ruby and allows me to copy and paste without it.

Image

Hope this helps.

Edit: I feel I should add as a long time android user, Google is actually way behind on issues like these, so it's not an issue of computers, but an issue of prioritization for Google. I want to give you a heads up on this because google everything (chrome, android, whatever), still has issues dealing with Han Unification like twenty years after every other major tech company has sorted it out.
2 x

golyplot
Black Belt - 1st Dan
Posts: 1745
Joined: Mon Jan 16, 2017 9:41 pm
Languages: Am. English (N), German, French, ASL (abandoned), Spanish, Dutch, Italian, Japanese (N2)
Language Log: https://forum.language-learners.org/vie ... 15&t=12230
x 3461

Re: Japanese listening from nothing: 2020 Log

Postby golyplot » Thu Mar 12, 2020 3:43 am

On my previous attempt at reading NHK News Easy, I gave up after two sentences. Tonight, I tried again, and this time lasted an entire paragraph and a half before throwing in the towel. Even when I look up every word, I still have no idea what the sentences actually mean. It's really frustrating. I wish there was some sort of more beginner friendly resource I could use as a stepping stone.
0 x

User avatar
ryanheise
Green Belt
Posts: 459
Joined: Tue Jun 04, 2019 3:13 pm
Location: Australia
Languages: English (N), Japanese (beginner)
x 1681
Contact:

Re: Japanese listening from nothing: 2020 Log

Postby ryanheise » Thu Mar 12, 2020 5:18 am

I'd be curious to run that through my script to sort the news articles by difficulty. (Edit: I was going to ask you if you knew the RSS feed, and then I found this.)
0 x


Return to “Language logs”

Who is online

Users browsing this forum: Severine and 2 guests