but if you want others to help debug, please give them the information they ask for.
I didn't mean to be bucking the I.T. help. The output greatly depends on where I dump this hash, is what I have learned. The existence of this page with its content proves its antedent existence in this hash, just not now as it is one line from going out of scope. I seem to have lot of warnings that I might characterize as "accretion problems." All of my paths are still blessed. Some are ready to house new paths and data.
Btw, how does a person change the subject? We're addressing less Ultima Thule and more "displaying an array of unicode characters faithfully."
I also suggest you read through Short, Self-Contained, Correct Example.
I'm glad to have SSCCE in my write-ups now. Just asking people to post one (or any code they have) is gonna put me in the points path, because that is how code gets posted and thereafter improved by perl's hive-mind. An occasional re-read does no harm. I've been trying for months now to make these functions more exportable, portable. Separating functions into modules that do only that task. Mostly this takes the form of editing and updating the perl.Update working example shows caller
html7.pm is to handle all the html worries now. We got in there on this thread and made some improvements:
The new things are being written in utils1.pm. It's gonna build its PathTinyness in a different place than when it was written. As we look farther away at when these utils were written, we start to see them using File::Slurp. Getting rid of it has been this Napoleonic war. It's fun to let Path::Tiny grow organically, simplifying what it encounters. You'll recognize a couple subroutines of yours that I want to test in the world of crossworld puzzles.
nibley1.pm is as far as it reaches, and it shows the capability I want to have: I would like to build hashes with english words as keys and their corresponding russian word. I think the get_text function in the following might have made those substitutions.
What do these substitutions do?
while (<$hh>) {
$_ =~ s/($check)/$hash{$1}/gi;
$_ =~ s/[^[:ascii:]]+/ /g;
# $_ =~ s%<br>%%;
say "default is $_";
$text = $text . $_;
}
What would put me at the end of the process and looking back is if I could subsume these parts into my script. The text_to_caption routine looks like it would work alright, but there's no need to propagate it and its File::Slurp-ness.
For an SSCCE, consider:
$ touch 1.mp.txt
$ gedit 1.mp.txt &
[1] 11120
$ trans :de file://1.mp.txt
Ich winke meine privaten Teile an Ihre Tanten, Sie käsige Menge gebrau
+chte elektrische Esel-Bottom-Beißer.
[1]+ Done gedit 1.mp.txt
$ cat 1.mp.txt
I wave my private parts at your aunties, you cheesy lot of second hand
+ electric donkey-bottom biters.
$
The taunt from ultimate scene in Monty Python's Grail makes a great example of the difficulty of translating a sentence. First, there's nothing in the google german translation that suggests genitive. What does one do with the 'of'? (I think the adjective gebrauchter should show the genitive plural declination.) We know that donkey bottom is a word that we would aggregate. Not the easiest for a translator when people seem to take license whenever we do.
For the translations, I've got the ones with the module and google API key and the translation shell as well.
Thanks for your comment,
|