![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
= Konjac
A Ruby command-line utility for translating files using a YAML wordlist
Homepage:: http://www.brymck.com Author:: Bryan McKelvey Copyright:: (c) 2012 Bryan McKelvey License:: MIT
== Features
== Installation
=== Stable
With {Ruby}[http://www.ruby-lang.org/en/downloads/] installed, run the following in your terminal:
gem install konjac
=== Development
With Ruby, {Git}[http://help.github.com/set-up-git-redirect] and {Bundler}[http://gembundler.com/] installed, navigate in your command line to a directory of your choice, then run:
git clone git://github.com/brymck/konjac.git cd konjac bundle update rake install
== Usage
Translate all text files in the current directory from Japanese into English:
konjac translate *.txt --from japanese --to english konjac translate *.txt -f ja -t en
Use multiple dictionaries:
konjac translate financial_report_en.txt --to japanese --using {finance,fluffery} konjac translate financial_report_en.txt -t ja -u {finance,fluffery}
Extract text from a .docx? document (creates a plain-text test.konjac file from test.docx):
konjac export test.doc konjac export test.docx
Extract text from a .docx document and process with a dictionary
konjac export test.docx --from japanese --to english --using pre konjac export test.docx -f ja -t en -u pre
Import tags file back into .docx document (for .doc files, this opens the file in word and imports the changes; for .docx files this outputs a new file named test_imported.docx):
konjac import test.doc konjac import test.docx
Add a word to your dictionary:
konjac add --original dog --from english --translation 犬 --to japanese konjac add -o dog -f en -r 犬 -t ja
Translate a word using your dictionary:
konjac translate dog --from english --to japanese --word konjac translate dog -f en -t ja -w
Suggest a word using your dictionary:
konjac suggest dog --from english --to japanese konjac suggest dog -f en -t ja
=== Ruby
Create a Suggestor object:
require "konjac" Konjac::Dictionary.add_word :from => :en, :original => "word", :to => :ja, :translation => "言葉" s = Konjac::Suggestor.new(:en, :ja) s.suggest "word" # => [[1.0, "word", "言葉"]]
== Dictionary Format
Store terms in ~/.konjac/dict.yml.
Simple (two-way equivalent terms) - English "I" is equivalent to Spanish "yo":
Not as simple - Japanese lacks a plural, therefore both "dog" and "dogs" translate as 犬:
== Documentation
Should be simple enough to generate yourself:
rm -rf konjac git clone git://github.com/brymck/konjac cd konjac bundle update rake rdoc rm -rf !(doc) mv doc/rdoc/* . rm -rf doc
== Supplementary Stuff
== Name
Hon'yaku means "translation" in Japanese. This utility relies on a YAML wordlist. Konnyaku (Japanese for "{konjac}[http://en.wikipedia.org/wiki/Konjac]") rhymes with hon'yaku and is a type of yam. Also, {Doraemon}[http://en.wikipedia.org/wiki/Doraemon] had something called a hon'yaku konnyaku that allowed him to speak every language. IIRC it worked with animals too. But I digress.
FAQs
Unknown package
We found that konjac demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.