How to determine if a character is a Chinese character using ruby?
Optical character recognition (OCR) – Many apps and websites provide OCR features where you can scan or take pictures of the character(s) you want to look up. Google Docs has such a feature and there are others online you can easily find by searching for “Chinese” and “OCR”.
It is made of strokes. There are 6 basic strokes. Some of them have several variants, and strokes can be combined to create more strokes. But the basic idea is that most characters are made from a small number of strokes.
They were created by combining two components: a phonetic component on the rebus principle, that is, a character with approximately the correct pronunciation. a semantic component, also called a determinative, one of a limited number of characters which supplied an element of meaning.
Chinese characters are logograms. This means that, instead of being written using the letters of an alphabet, logograms consist of characters or “pictures” that represent a word. Egyptian hieroglyphics are a good example of this.
Ruby 1.9
#encoding: utf-8
"漢" =~ /\p{Han}/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With