Return the set of IPA characters that are defined in normal form C in the
	spec. As of 2015, this is only the voiceless palatal fricative, ç.
481980
def get_precomposed_chars():
	
	return set([
		letter for letter in chart.consonants
		if unicodedata.normalize('NFD', letter) != letter ])
1127342
public static boolean isPrintable( char c ) {
	    Character.UnicodeBlock block = Character.UnicodeBlock.of( c );
	    return (!Character.isISOControl(c)) 	&& 
	    		c != KeyEvent.CHAR_UNDEFINED 	&&
	            block != null 					&&
	            block != Character.UnicodeBlock.SPECIALS;
	}
691679
public Charset getCharset() {
        String charset = getParameter(PARAM_CHARSET);
        return (charset != null ? Charset.forName(unquote(charset)) : null);
    }
674860
public static boolean isCJKChar( int c ) 
    {
        /*
         * @Note: added at 2015-11-25
         * for foreign country translated name recognize
         * add '·' as CJK chars
        */
        if ( c == 183 
                || Character.getType(c) == Character.OTHER_LETTER )
            return true;
        return false;
    }
721368
def get_letters( word ):
    
    ta_letters = list()
    not_empty = False
    WLEN,idx = len(word),0
    while (idx < WLEN):
        c = word[idx]
        #print(idx,hex(ord(c)),len(ta_letters))
        if c in uyir_letter_set or c == ayudha_letter:
            ta_letters.append(c)
            not_empty = True
        elif c in grantha_agaram_set:
            ta_letters.append(c)
            not_empty = True
        elif c in accent_symbol_set:
            if not not_empty:
                # odd situation
                ta_letters.append(c)
                not_empty = True
            else:
                #print("Merge/accent")
                ta_letters[-1] += c
        else:
            if ord(c) < 256 or not (is_tamil_unicode(c)):
                ta_letters.append( c )
            else:
                if not_empty:
                    #print("Merge/??")
                    ta_letters[-1]+= c
                else:
                    ta_letters.append(c)
                    not_empty = True
        idx = idx + 1
    return ta_letters
1279223
def is_ipa(s):
    """"""
    re_pattern = ('(?:%(syllable)s|[ \t%(punctuation)s])+' %
                  {'syllable': _IPA_SYLLABLE,
                   'punctuation': zhon.pinyin.punctuation})
    return _is_pattern_match(re_pattern, s)
456057
def remove_diacritics(self_or_cls, identifier):
        
        chars = ''
        for c in identifier:
            replacement = unicodedata.normalize('NFKD', c).encode('ASCII', 'ignore')
            if replacement != '':
                chars += bytes_to_unicode(replacement)
            else:
                chars += c
        return chars
372600
def recognise(self, string, line_num):
		
		symbols = []
		unknown = []

		for char in string:
			if char == SPACE:
				continue

			try:
				name = unicodedata.name(char)
			except ValueError:
				name = 'UNNAMED CHARACTER {}'.format(ord(char))

			if char in self.ipa:
				symbol = Symbol(char, name, self.ipa[char])
				symbols.append(symbol)
				self.ipa_symbols[symbol].append(line_num)
			else:
				symbol = UnknownSymbol(char, name)
				unknown.append(symbol)
				self.unk_symbols[symbol].append(line_num)

		return tuple(symbols), tuple(unknown)
1119951
def load_ipa(self, file_path):
		
		sections = {
			'# consonants (pulmonic)': self.consonants,
			'# consonants (non-pulmonic)': self.consonants,
			'# other symbols': self.consonants,
			'# tie bars': self.tie_bars,
			'# vowels': self.vowels,
			'# diacritics': self.diacritics,
			'# suprasegmentals': self.suprasegmentals,
			'# lengths': self.lengths,
			'# tones and word accents': self.tones }

		curr_section = None

		with open(file_path, encoding='utf-8') as f:
			for line in map(lambda x: x.strip(), f):
				if line.startswith('#'):
					if line in sections:
						curr_section = sections[line]
					else:
						curr_section = None
				elif line:
					if curr_section is not None:
						curr_section.add(line.split('\t')[0])
479264
def is_indiclang_char(c,lang): 
    
    o=get_offset(c,lang)
    return (o>=0 and o<=0x7f) or ord(c)==DANDA or ord(c)==DOUBLE_DANDA
579193
public int getFCD16FromNormData(int c) {
        // Only loops for 1:1 algorithmic mappings.
        for(;;) {
            int norm16=getNorm16(c);
            if(norm16<=minYesNo) {
                // no decomposition or Hangul syllable, all zeros
                return 0;
            } else if(norm16>=MIN_NORMAL_MAYBE_YES) {
                // combining mark
                norm16&=0xff;
                return norm16|(norm16<<8);
            } else if(norm16>=minMaybeYes) {
                return 0;
            } else if(isDecompNoAlgorithmic(norm16)) {
                c=mapAlgorithmic(c, norm16);
            } else {
                // c decomposes, get everything from the variable-length extra data
                int firstUnit=extraData.charAt(norm16);
                if((firstUnit&MAPPING_LENGTH_MASK)==0) {
                    // A character that is deleted (maps to an empty string) must
                    // get the worst-case lccc and tccc values because arbitrary
                    // characters on both sides will become adjacent.
                    return 0x1ff;
                } else {
                    int fcd16=firstUnit>>8;  // tccc
                    if((firstUnit&MAPPING_HAS_CCC_LCCC_WORD)!=0) {
                        fcd16|=extraData.charAt(norm16-1)&0xff00;  // lccc
                    }
                    return fcd16;
                }
            }
        }
    }
929934
def pinyin_to_ipa(s):
    
    return _convert(s, zhon.pinyin.syllable, pinyin_syllable_to_ipa,
                    remove_apostrophes=True, separate_syllables=True)
764142
def translate_to_english_phonetic_alphabet(self, hide_stress_mark=False):
        '''
        
        '''

        translations = self.stress.mark_ipa() if (not hide_stress_mark) and self.have_vowel else ""

        for phoneme in self._phoneme_list:
            translations += phoneme.english

        return translations
115754
def _char_ro_vowel(self, char_info, type):
        '''
        
        '''
        if type == CV:
            return char_info[3]

        if type == VOWEL or type == XVOWEL:
            return char_info[0]

        return None
1005239
def _find_solo_consonant(self, letters: List[str]) -> List[int]:
        """"""
        solos = []
        for idx, letter in enumerate(letters):
            if len(letter) == 1 and self._contains_consonants(letter):
                solos.append(idx)
        return solos
677506
def is_cjk_punctuation(char):
    """"""
    lower = int('0x3000', 16)
    higher = int('0x300F', 16)
    return ord(char) >= lower and ord(char) <= higher
375876
public static String normalizeChar(char c, boolean canonical)
   {

      switch (c)
      {
         case '<' :
            return "&lt;";
         case '>' :
            return "&gt;";
         case '&' :
            return "&amp;";
         case '"' :
            return "&quot;";
         case '\'' :
            return "&apos;";
         case '\r' :
            if (canonical)
               return "_x000D_";
         case '\n' :
            if (canonical)
               return "_x000A_";
         case '\t' :
            if (canonical)
               return "_x0009_";
         case ' ' :
            if (canonical)
               return "_x0020_";
         case '_' :
            if (canonical)
               return "_x005f_";
            // else, default print char
         default :
            return "" + c;
      }
   }