Ruby gems for language translations

Sep 04, 2016

Tradsim is useful for translation between Traditional Chinese and Simplified Chinese.

# traditional to simplified chinese translation
Tradsim::to_sim("轉街過巷 就如滑過浪潮 聽天說地 仍然剩我心跳") => "转街过巷 就如滑过浪潮 听天说地 仍然剩我心跳"

# simplified to traditional chinese translation
Tradsim::to_trad("转街过巷 就如滑过浪潮 听天说地 仍然剩我心跳") => "轉街過巷 就如滑過浪潮 聽天說地 仍然剩我心跳"

# guess whether text is traditional, simplified or unknown
Tradsim::guess("轉街過巷 就如滑過浪潮 聽天說地 仍然剩我心跳")  => :traditional

script_detector Library for detecting if string is traditional Chinese, simplified Chinese, Japanese or Korean

string = "我的氣墊船充滿了鱔魚."
string.chinese?  => true
string.japanese? => false

Note: Tradsim only work in UTF-8 encoding, put following at the beginning of the ruby code.

# encoding: UTF-8

or

#!/usr/bin/env ruby -wKU

Check out the these gems: Tradsim, Script detector

One gmail id trick

Sep 04, 2016

Gmail ignores period(.) and any random text written after + in email-address ( before @ ). This helps to use same email address for various purposes.

For example, Any of the following email addresses will point to your primary address Exampleorg@gmail.com

Example.org@gmail.com
Example.o.r.g@gmail.com
Ex.ample.org@gmail.com
Exampleorg+randomtext@gmail.com
Example.org@googlemail.com
Example.o.r.g@googlemail.com
Ex.ample.org@googlemail.com
Exampleorg+randomtext@googlemail.com
E.x.a.m.p.l.e.o.r.g@gmail.com

With this trick you can use same email address for work/personal/other category stuff

You can set email id as

Example.org@gmail.com for work
Exampleorg@gmail.com for personal
Exampleorg+othercategory@gmail.com for other category
 
This will help to filter/block incoming email using specified recipient email address.

Subscribe via RSS