Skip to content

Instantly share code, notes, and snippets.

@sixtyfive
Created March 17, 2016 16:22
Show Gist options
  • Save sixtyfive/1fa72e586673b4532d3d to your computer and use it in GitHub Desktop.
Save sixtyfive/1fa72e586673b4532d3d to your computer and use it in GitHub Desktop.
# encoding: UTF-8
DIACRITICS = [
'\u0600', '\u0601', '\u0602', '\u0603', '\u0604', '\u0606', '\u0607', # 7
'\u0608', '\u0609', '\u060A', '\u060C', '\u060D', '\u060E', '\u060F', # 14
'\u0610', '\u0611', '\u0612', '\u0613', '\u0614', '\u0615', '\u0616', # 21
'\u0617', '\u0618', '\u0619', '\u061A', '\u061B', '\u061E', '\u061F', # 28
'\u0640', '\u066A', '\u066B', '\u066C', '\u066D', '\u06D4', '\u06D6', # 35
'\u06D7', '\u06D8', '\u06D9', '\u06DA', '\u06DB', '\u06DC', '\u06DD', # 42
'\u06DE', '\u06DF', '\u06E0', '\u06E1', '\u06E2', '\u06E3', '\u06E4', # 49
'\u06E7', '\u06E8', '\u06E9', '\u06EA', '\u06EB', '\u06EC', '\u06ED', # 56
'\u064B', '\uFE71', '\uFE70', '\u08F0', '\u08E7', '\u064C', '\uFE72', # 63
'\uFC5E', '\u08F1', '\u08E8', '\u064D', '\uFE74', '\uFC5F', '\u08F2', # 70
'\u08E9', '\u064E', '\uFE77', '\uFE76', '\uFCF2', '\uFC60', '\u08E4', # 77
'\u08F4', '\u08F5', '\u064F', '\uFE79', '\uFE78', '\uFCF3', '\uFC61', # 84
'\u08E5', '\u08FE', '\u0650', '\uFE7B', '\uFE7A', '\uFCF4', '\uFC62', # 91
'\u08E6', '\u08F6', '\u0651', '\uFE7D', '\uFE7C', '\uFC63', '\u0652', # 98
'\uFE7F', '\uFE7E', '\u0653', '\u0654', '\u0655', '\u065F', '\u0656', # 105
'\u0657', '\u0658', '\u0659', '\u065A', '\u065B', '\u065C', '\u065D', # 112
'\u065E', '\u08F7', '\u08F8', '\u08FD', '\u08FB', '\u08FC', '\u08F9', # 119
'\u08FA', '\u0670'] # 121
File.open("arabic.rules", "w") {|f| DIACRITICS.each {|d| f.write("#{d}\t\n")}; f.close}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment