Skip to content

Instantly share code, notes, and snippets.

@yihuang
Created January 21, 2018 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yihuang/c6119bd26b5639964348f2a67e4831d4 to your computer and use it in GitHub Desktop.
Save yihuang/c6119bd26b5639964348f2a67e4831d4 to your computer and use it in GitHub Desktop.
Use chinese character as recovery phase for daedalus wallet.
#!stack runhaskell
import Data.List(elemIndex)
import System.Environment(getArgs)
wl_en :: [String]
wl_en =
[ "abandon", "ability", "able", "about", "above", "absent"
, "absorb", "abstract", "absurd", "abuse", "access", "accident"
, "account", "accuse", "achieve", "acid", "acoustic", "acquire"
, "across", "act", "action", "actor", "actress", "actual"
, "adapt", "add", "addict", "address", "adjust", "admit"
, "adult", "advance", "advice", "aerobic", "affair", "afford"
, "afraid", "again", "age", "agent", "agree", "ahead"
, "aim", "air", "airport", "aisle", "alarm", "album"
, "alcohol", "alert", "alien", "all", "alley", "allow"
, "almost", "alone", "alpha", "already", "also", "alter"
, "always", "amateur", "amazing", "among", "amount", "amused"
, "analyst", "anchor", "ancient", "anger", "angle", "angry"
, "animal", "ankle", "announce", "annual", "another", "answer"
, "antenna", "antique", "anxiety", "any", "apart", "apology"
, "appear", "apple", "approve", "april", "arch", "arctic"
, "area", "arena", "argue", "arm", "armed", "armor"
, "army", "around", "arrange", "arrest", "arrive", "arrow"
, "art", "artefact", "artist", "artwork", "ask", "aspect"
, "assault", "asset", "assist", "assume", "asthma", "athlete"
, "atom", "attack", "attend", "attitude", "attract", "auction"
, "audit", "august", "aunt", "author", "auto", "autumn"
, "average", "avocado", "avoid", "awake", "aware", "away"
, "awesome", "awful", "awkward", "axis", "baby", "bachelor"
, "bacon", "badge", "bag", "balance", "balcony", "ball"
, "bamboo", "banana", "banner", "bar", "barely", "bargain"
, "barrel", "base", "basic", "basket", "battle", "beach"
, "bean", "beauty", "because", "become", "beef", "before"
, "begin", "behave", "behind", "believe", "below", "belt"
, "bench", "benefit", "best", "betray", "better", "between"
, "beyond", "bicycle", "bid", "bike", "bind", "biology"
, "bird", "birth", "bitter", "black", "blade", "blame"
, "blanket", "blast", "bleak", "bless", "blind", "blood"
, "blossom", "blouse", "blue", "blur", "blush", "board"
, "boat", "body", "boil", "bomb", "bone", "bonus"
, "book", "boost", "border", "boring", "borrow", "boss"
, "bottom", "bounce", "box", "boy", "bracket", "brain"
, "brand", "brass", "brave", "bread", "breeze", "brick"
, "bridge", "brief", "bright", "bring", "brisk", "broccoli"
, "broken", "bronze", "broom", "brother", "brown", "brush"
, "bubble", "buddy", "budget", "buffalo", "build", "bulb"
, "bulk", "bullet", "bundle", "bunker", "burden", "burger"
, "burst", "bus", "business", "busy", "butter", "buyer"
, "buzz", "cabbage", "cabin", "cable", "cactus", "cage"
, "cake", "call", "calm", "camera", "camp", "can"
, "canal", "cancel", "candy", "cannon", "canoe", "canvas"
, "canyon", "capable", "capital", "captain", "car", "carbon"
, "card", "cargo", "carpet", "carry", "cart", "case"
, "cash", "casino", "castle", "casual", "cat", "catalog"
, "catch", "category", "cattle", "caught", "cause", "caution"
, "cave", "ceiling", "celery", "cement", "census", "century"
, "cereal", "certain", "chair", "chalk", "champion", "change"
, "chaos", "chapter", "charge", "chase", "chat", "cheap"
, "check", "cheese", "chef", "cherry", "chest", "chicken"
, "chief", "child", "chimney", "choice", "choose", "chronic"
, "chuckle", "chunk", "churn", "cigar", "cinnamon", "circle"
, "citizen", "city", "civil", "claim", "clap", "clarify"
, "claw", "clay", "clean", "clerk", "clever", "click"
, "client", "cliff", "climb", "clinic", "clip", "clock"
, "clog", "close", "cloth", "cloud", "clown", "club"
, "clump", "cluster", "clutch", "coach", "coast", "coconut"
, "code", "coffee", "coil", "coin", "collect", "color"
, "column", "combine", "come", "comfort", "comic", "common"
, "company", "concert", "conduct", "confirm", "congress", "connect"
, "consider", "control", "convince", "cook", "cool", "copper"
, "copy", "coral", "core", "corn", "correct", "cost"
, "cotton", "couch", "country", "couple", "course", "cousin"
, "cover", "coyote", "crack", "cradle", "craft", "cram"
, "crane", "crash", "crater", "crawl", "crazy", "cream"
, "credit", "creek", "crew", "cricket", "crime", "crisp"
, "critic", "crop", "cross", "crouch", "crowd", "crucial"
, "cruel", "cruise", "crumble", "crunch", "crush", "cry"
, "crystal", "cube", "culture", "cup", "cupboard", "curious"
, "current", "curtain", "curve", "cushion", "custom", "cute"
, "cycle", "dad", "damage", "damp", "dance", "danger"
, "daring", "dash", "daughter", "dawn", "day", "deal"
, "debate", "debris", "decade", "december", "decide", "decline"
, "decorate", "decrease", "deer", "defense", "define", "defy"
, "degree", "delay", "deliver", "demand", "demise", "denial"
, "dentist", "deny", "depart", "depend", "deposit", "depth"
, "deputy", "derive", "describe", "desert", "design", "desk"
, "despair", "destroy", "detail", "detect", "develop", "device"
, "devote", "diagram", "dial", "diamond", "diary", "dice"
, "diesel", "diet", "differ", "digital", "dignity", "dilemma"
, "dinner", "dinosaur", "direct", "dirt", "disagree", "discover"
, "disease", "dish", "dismiss", "disorder", "display", "distance"
, "divert", "divide", "divorce", "dizzy", "doctor", "document"
, "dog", "doll", "dolphin", "domain", "donate", "donkey"
, "donor", "door", "dose", "double", "dove", "draft"
, "dragon", "drama", "drastic", "draw", "dream", "dress"
, "drift", "drill", "drink", "drip", "drive", "drop"
, "drum", "dry", "duck", "dumb", "dune", "during"
, "dust", "dutch", "duty", "dwarf", "dynamic", "eager"
, "eagle", "early", "earn", "earth", "easily", "east"
, "easy", "echo", "ecology", "economy", "edge", "edit"
, "educate", "effort", "egg", "eight", "either", "elbow"
, "elder", "electric", "elegant", "element", "elephant", "elevator"
, "elite", "else", "embark", "embody", "embrace", "emerge"
, "emotion", "employ", "empower", "empty", "enable", "enact"
, "end", "endless", "endorse", "enemy", "energy", "enforce"
, "engage", "engine", "enhance", "enjoy", "enlist", "enough"
, "enrich", "enroll", "ensure", "enter", "entire", "entry"
, "envelope", "episode", "equal", "equip", "era", "erase"
, "erode", "erosion", "error", "erupt", "escape", "essay"
, "essence", "estate", "eternal", "ethics", "evidence", "evil"
, "evoke", "evolve", "exact", "example", "excess", "exchange"
, "excite", "exclude", "excuse", "execute", "exercise", "exhaust"
, "exhibit", "exile", "exist", "exit", "exotic", "expand"
, "expect", "expire", "explain", "expose", "express", "extend"
, "extra", "eye", "eyebrow", "fabric", "face", "faculty"
, "fade", "faint", "faith", "fall", "false", "fame"
, "family", "famous", "fan", "fancy", "fantasy", "farm"
, "fashion", "fat", "fatal", "father", "fatigue", "fault"
, "favorite", "feature", "february", "federal", "fee", "feed"
, "feel", "female", "fence", "festival", "fetch", "fever"
, "few", "fiber", "fiction", "field", "figure", "file"
, "film", "filter", "final", "find", "fine", "finger"
, "finish", "fire", "firm", "first", "fiscal", "fish"
, "fit", "fitness", "fix", "flag", "flame", "flash"
, "flat", "flavor", "flee", "flight", "flip", "float"
, "flock", "floor", "flower", "fluid", "flush", "fly"
, "foam", "focus", "fog", "foil", "fold", "follow"
, "food", "foot", "force", "forest", "forget", "fork"
, "fortune", "forum", "forward", "fossil", "foster", "found"
, "fox", "fragile", "frame", "frequent", "fresh", "friend"
, "fringe", "frog", "front", "frost", "frown", "frozen"
, "fruit", "fuel", "fun", "funny", "furnace", "fury"
, "future", "gadget", "gain", "galaxy", "gallery", "game"
, "gap", "garage", "garbage", "garden", "garlic", "garment"
, "gas", "gasp", "gate", "gather", "gauge", "gaze"
, "general", "genius", "genre", "gentle", "genuine", "gesture"
, "ghost", "giant", "gift", "giggle", "ginger", "giraffe"
, "girl", "give", "glad", "glance", "glare", "glass"
, "glide", "glimpse", "globe", "gloom", "glory", "glove"
, "glow", "glue", "goat", "goddess", "gold", "good"
, "goose", "gorilla", "gospel", "gossip", "govern", "gown"
, "grab", "grace", "grain", "grant", "grape", "grass"
, "gravity", "great", "green", "grid", "grief", "grit"
, "grocery", "group", "grow", "grunt", "guard", "guess"
, "guide", "guilt", "guitar", "gun", "gym", "habit"
, "hair", "half", "hammer", "hamster", "hand", "happy"
, "harbor", "hard", "harsh", "harvest", "hat", "have"
, "hawk", "hazard", "head", "health", "heart", "heavy"
, "hedgehog", "height", "hello", "helmet", "help", "hen"
, "hero", "hidden", "high", "hill", "hint", "hip"
, "hire", "history", "hobby", "hockey", "hold", "hole"
, "holiday", "hollow", "home", "honey", "hood", "hope"
, "horn", "horror", "horse", "hospital", "host", "hotel"
, "hour", "hover", "hub", "huge", "human", "humble"
, "humor", "hundred", "hungry", "hunt", "hurdle", "hurry"
, "hurt", "husband", "hybrid", "ice", "icon", "idea"
, "identify", "idle", "ignore", "ill", "illegal", "illness"
, "image", "imitate", "immense", "immune", "impact", "impose"
, "improve", "impulse", "inch", "include", "income", "increase"
, "index", "indicate", "indoor", "industry", "infant", "inflict"
, "inform", "inhale", "inherit", "initial", "inject", "injury"
, "inmate", "inner", "innocent", "input", "inquiry", "insane"
, "insect", "inside", "inspire", "install", "intact", "interest"
, "into", "invest", "invite", "involve", "iron", "island"
, "isolate", "issue", "item", "ivory", "jacket", "jaguar"
, "jar", "jazz", "jealous", "jeans", "jelly", "jewel"
, "job", "join", "joke", "journey", "joy", "judge"
, "juice", "jump", "jungle", "junior", "junk", "just"
, "kangaroo", "keen", "keep", "ketchup", "key", "kick"
, "kid", "kidney", "kind", "kingdom", "kiss", "kit"
, "kitchen", "kite", "kitten", "kiwi", "knee", "knife"
, "knock", "know", "lab", "label", "labor", "ladder"
, "lady", "lake", "lamp", "language", "laptop", "large"
, "later", "latin", "laugh", "laundry", "lava", "law"
, "lawn", "lawsuit", "layer", "lazy", "leader", "leaf"
, "learn", "leave", "lecture", "left", "leg", "legal"
, "legend", "leisure", "lemon", "lend", "length", "lens"
, "leopard", "lesson", "letter", "level", "liar", "liberty"
, "library", "license", "life", "lift", "light", "like"
, "limb", "limit", "link", "lion", "liquid", "list"
, "little", "live", "lizard", "load", "loan", "lobster"
, "local", "lock", "logic", "lonely", "long", "loop"
, "lottery", "loud", "lounge", "love", "loyal", "lucky"
, "luggage", "lumber", "lunar", "lunch", "luxury", "lyrics"
, "machine", "mad", "magic", "magnet", "maid", "mail"
, "main", "major", "make", "mammal", "man", "manage"
, "mandate", "mango", "mansion", "manual", "maple", "marble"
, "march", "margin", "marine", "market", "marriage", "mask"
, "mass", "master", "match", "material", "math", "matrix"
, "matter", "maximum", "maze", "meadow", "mean", "measure"
, "meat", "mechanic", "medal", "media", "melody", "melt"
, "member", "memory", "mention", "menu", "mercy", "merge"
, "merit", "merry", "mesh", "message", "metal", "method"
, "middle", "midnight", "milk", "million", "mimic", "mind"
, "minimum", "minor", "minute", "miracle", "mirror", "misery"
, "miss", "mistake", "mix", "mixed", "mixture", "mobile"
, "model", "modify", "mom", "moment", "monitor", "monkey"
, "monster", "month", "moon", "moral", "more", "morning"
, "mosquito", "mother", "motion", "motor", "mountain", "mouse"
, "move", "movie", "much", "muffin", "mule", "multiply"
, "muscle", "museum", "mushroom", "music", "must", "mutual"
, "myself", "mystery", "myth", "naive", "name", "napkin"
, "narrow", "nasty", "nation", "nature", "near", "neck"
, "need", "negative", "neglect", "neither", "nephew", "nerve"
, "nest", "net", "network", "neutral", "never", "news"
, "next", "nice", "night", "noble", "noise", "nominee"
, "noodle", "normal", "north", "nose", "notable", "note"
, "nothing", "notice", "novel", "now", "nuclear", "number"
, "nurse", "nut", "oak", "obey", "object", "oblige"
, "obscure", "observe", "obtain", "obvious", "occur", "ocean"
, "october", "odor", "off", "offer", "office", "often"
, "oil", "okay", "old", "olive", "olympic", "omit"
, "once", "one", "onion", "online", "only", "open"
, "opera", "opinion", "oppose", "option", "orange", "orbit"
, "orchard", "order", "ordinary", "organ", "orient", "original"
, "orphan", "ostrich", "other", "outdoor", "outer", "output"
, "outside", "oval", "oven", "over", "own", "owner"
, "oxygen", "oyster", "ozone", "pact", "paddle", "page"
, "pair", "palace", "palm", "panda", "panel", "panic"
, "panther", "paper", "parade", "parent", "park", "parrot"
, "party", "pass", "patch", "path", "patient", "patrol"
, "pattern", "pause", "pave", "payment", "peace", "peanut"
, "pear", "peasant", "pelican", "pen", "penalty", "pencil"
, "people", "pepper", "perfect", "permit", "person", "pet"
, "phone", "photo", "phrase", "physical", "piano", "picnic"
, "picture", "piece", "pig", "pigeon", "pill", "pilot"
, "pink", "pioneer", "pipe", "pistol", "pitch", "pizza"
, "place", "planet", "plastic", "plate", "play", "please"
, "pledge", "pluck", "plug", "plunge", "poem", "poet"
, "point", "polar", "pole", "police", "pond", "pony"
, "pool", "popular", "portion", "position", "possible", "post"
, "potato", "pottery", "poverty", "powder", "power", "practice"
, "praise", "predict", "prefer", "prepare", "present", "pretty"
, "prevent", "price", "pride", "primary", "print", "priority"
, "prison", "private", "prize", "problem", "process", "produce"
, "profit", "program", "project", "promote", "proof", "property"
, "prosper", "protect", "proud", "provide", "public", "pudding"
, "pull", "pulp", "pulse", "pumpkin", "punch", "pupil"
, "puppy", "purchase", "purity", "purpose", "purse", "push"
, "put", "puzzle", "pyramid", "quality", "quantum", "quarter"
, "question", "quick", "quit", "quiz", "quote", "rabbit"
, "raccoon", "race", "rack", "radar", "radio", "rail"
, "rain", "raise", "rally", "ramp", "ranch", "random"
, "range", "rapid", "rare", "rate", "rather", "raven"
, "raw", "razor", "ready", "real", "reason", "rebel"
, "rebuild", "recall", "receive", "recipe", "record", "recycle"
, "reduce", "reflect", "reform", "refuse", "region", "regret"
, "regular", "reject", "relax", "release", "relief", "rely"
, "remain", "remember", "remind", "remove", "render", "renew"
, "rent", "reopen", "repair", "repeat", "replace", "report"
, "require", "rescue", "resemble", "resist", "resource", "response"
, "result", "retire", "retreat", "return", "reunion", "reveal"
, "review", "reward", "rhythm", "rib", "ribbon", "rice"
, "rich", "ride", "ridge", "rifle", "right", "rigid"
, "ring", "riot", "ripple", "risk", "ritual", "rival"
, "river", "road", "roast", "robot", "robust", "rocket"
, "romance", "roof", "rookie", "room", "rose", "rotate"
, "rough", "round", "route", "royal", "rubber", "rude"
, "rug", "rule", "run", "runway", "rural", "sad"
, "saddle", "sadness", "safe", "sail", "salad", "salmon"
, "salon", "salt", "salute", "same", "sample", "sand"
, "satisfy", "satoshi", "sauce", "sausage", "save", "say"
, "scale", "scan", "scare", "scatter", "scene", "scheme"
, "school", "science", "scissors", "scorpion", "scout", "scrap"
, "screen", "script", "scrub", "sea", "search", "season"
, "seat", "second", "secret", "section", "security", "seed"
, "seek", "segment", "select", "sell", "seminar", "senior"
, "sense", "sentence", "series", "service", "session", "settle"
, "setup", "seven", "shadow", "shaft", "shallow", "share"
, "shed", "shell", "sheriff", "shield", "shift", "shine"
, "ship", "shiver", "shock", "shoe", "shoot", "shop"
, "short", "shoulder", "shove", "shrimp", "shrug", "shuffle"
, "shy", "sibling", "sick", "side", "siege", "sight"
, "sign", "silent", "silk", "silly", "silver", "similar"
, "simple", "since", "sing", "siren", "sister", "situate"
, "six", "size", "skate", "sketch", "ski", "skill"
, "skin", "skirt", "skull", "slab", "slam", "sleep"
, "slender", "slice", "slide", "slight", "slim", "slogan"
, "slot", "slow", "slush", "small", "smart", "smile"
, "smoke", "smooth", "snack", "snake", "snap", "sniff"
, "snow", "soap", "soccer", "social", "sock", "soda"
, "soft", "solar", "soldier", "solid", "solution", "solve"
, "someone", "song", "soon", "sorry", "sort", "soul"
, "sound", "soup", "source", "south", "space", "spare"
, "spatial", "spawn", "speak", "special", "speed", "spell"
, "spend", "sphere", "spice", "spider", "spike", "spin"
, "spirit", "split", "spoil", "sponsor", "spoon", "sport"
, "spot", "spray", "spread", "spring", "spy", "square"
, "squeeze", "squirrel", "stable", "stadium", "staff", "stage"
, "stairs", "stamp", "stand", "start", "state", "stay"
, "steak", "steel", "stem", "step", "stereo", "stick"
, "still", "sting", "stock", "stomach", "stone", "stool"
, "story", "stove", "strategy", "street", "strike", "strong"
, "struggle", "student", "stuff", "stumble", "style", "subject"
, "submit", "subway", "success", "such", "sudden", "suffer"
, "sugar", "suggest", "suit", "summer", "sun", "sunny"
, "sunset", "super", "supply", "supreme", "sure", "surface"
, "surge", "surprise", "surround", "survey", "suspect", "sustain"
, "swallow", "swamp", "swap", "swarm", "swear", "sweet"
, "swift", "swim", "swing", "switch", "sword", "symbol"
, "symptom", "syrup", "system", "table", "tackle", "tag"
, "tail", "talent", "talk", "tank", "tape", "target"
, "task", "taste", "tattoo", "taxi", "teach", "team"
, "tell", "ten", "tenant", "tennis", "tent", "term"
, "test", "text", "thank", "that", "theme", "then"
, "theory", "there", "they", "thing", "this", "thought"
, "three", "thrive", "throw", "thumb", "thunder", "ticket"
, "tide", "tiger", "tilt", "timber", "time", "tiny"
, "tip", "tired", "tissue", "title", "toast", "tobacco"
, "today", "toddler", "toe", "together", "toilet", "token"
, "tomato", "tomorrow", "tone", "tongue", "tonight", "tool"
, "tooth", "top", "topic", "topple", "torch", "tornado"
, "tortoise", "toss", "total", "tourist", "toward", "tower"
, "town", "toy", "track", "trade", "traffic", "tragic"
, "train", "transfer", "trap", "trash", "travel", "tray"
, "treat", "tree", "trend", "trial", "tribe", "trick"
, "trigger", "trim", "trip", "trophy", "trouble", "truck"
, "true", "truly", "trumpet", "trust", "truth", "try"
, "tube", "tuition", "tumble", "tuna", "tunnel", "turkey"
, "turn", "turtle", "twelve", "twenty", "twice", "twin"
, "twist", "two", "type", "typical", "ugly", "umbrella"
, "unable", "unaware", "uncle", "uncover", "under", "undo"
, "unfair", "unfold", "unhappy", "uniform", "unique", "unit"
, "universe", "unknown", "unlock", "until", "unusual", "unveil"
, "update", "upgrade", "uphold", "upon", "upper", "upset"
, "urban", "urge", "usage", "use", "used", "useful"
, "useless", "usual", "utility", "vacant", "vacuum", "vague"
, "valid", "valley", "valve", "van", "vanish", "vapor"
, "various", "vast", "vault", "vehicle", "velvet", "vendor"
, "venture", "venue", "verb", "verify", "version", "very"
, "vessel", "veteran", "viable", "vibrant", "vicious", "victory"
, "video", "view", "village", "vintage", "violin", "virtual"
, "virus", "visa", "visit", "visual", "vital", "vivid"
, "vocal", "voice", "void", "volcano", "volume", "vote"
, "voyage", "wage", "wagon", "wait", "walk", "wall"
, "walnut", "want", "warfare", "warm", "warrior", "wash"
, "wasp", "waste", "water", "wave", "way", "wealth"
, "weapon", "wear", "weasel", "weather", "web", "wedding"
, "weekend", "weird", "welcome", "west", "wet", "whale"
, "what", "wheat", "wheel", "when", "where", "whip"
, "whisper", "wide", "width", "wife", "wild", "will"
, "win", "window", "wine", "wing", "wink", "winner"
, "winter", "wire", "wisdom", "wise", "wish", "witness"
, "wolf", "woman", "wonder", "wood", "wool", "word"
, "work", "world", "worry", "worth", "wrap", "wreck"
, "wrestle", "wrist", "write", "wrong", "yard", "year"
, "yellow", "you", "young", "youth", "zebra", "zero"
, "zone", "zoo"
]
wl_cn :: [String]
wl_cn =
[ "一", "乙", "二", "十", "丁", "厂", "七", "卜"
, "人", "入", "八", "九", "几", "儿", "了", "力"
, "乃", "刀", "又", "三", "于", "干", "亏", "士"
, "工", "土", "才", "寸", "下", "大", "丈", "与"
, "万", "上", "小", "口", "巾", "山", "千", "乞"
, "川", "亿", "个", "勺", "久", "凡", "及", "夕"
, "丸", "么", "广", "亡", "门", "义", "之", "尸"
, "弓", "己", "已", "子", "卫", "也", "女", "飞"
, "刃", "习", "叉", "马", "乡", "丰", "王", "井"
, "开", "夫", "天", "无", "元", "专", "云", "扎"
, "艺", "木", "五", "支", "厅", "不", "太", "犬"
, "区", "历", "尤", "友", "匹", "车", "巨", "牙"
, "屯", "比", "互", "切", "瓦", "止", "少", "日"
, "中", "冈", "贝", "内", "水", "见", "午", "牛"
, "手", "毛", "气", "升", "长", "仁", "什", "片"
, "仆", "化", "仇", "币", "仍", "仅", "斤", "爪"
, "反", "介", "父", "从", "今", "凶", "分", "乏"
, "公", "仓", "月", "氏", "勿", "欠", "风", "丹"
, "匀", "乌", "凤", "勾", "文", "六", "方", "火"
, "为", "斗", "忆", "订", "计", "户", "认", "心"
, "尺", "引", "丑", "巴", "孔", "队", "办", "以"
, "允", "予", "劝", "双", "书", "幻", "玉", "刊"
, "示", "末", "未", "击", "打", "巧", "正", "扑"
, "扒", "功", "扔", "去", "甘", "世", "古", "节"
, "本", "术", "汇", "头", "汉", "宁", "穴", "它"
, "讨", "写", "让", "礼", "训", "必", "议", "讯"
, "记", "永", "司", "尼", "民", "出", "汁", "丙"
, "左", "厉", "右", "石", "布", "龙", "平", "灭"
, "轧", "东", "卡", "北", "占", "业", "旧", "帅"
, "归", "且", "旦", "目", "叶", "甲", "申", "叮"
, "电", "号", "田", "由", "史", "只", "央", "兄"
, "叼", "叫", "另", "叨", "叹", "四", "生", "失"
, "禾", "丘", "付", "仗", "代", "仙", "们", "仪"
, "白", "仔", "他", "斥", "瓜", "乎", "丛", "令"
, "用", "甩", "印", "乐", "句", "匆", "册", "犯"
, "外", "处", "冬", "鸟", "务", "包", "饥", "主"
, "市", "立", "闪", "兰", "半", "辽", "奶", "奴"
, "加", "召", "皮", "边", "发", "孕", "圣", "对"
, "台", "矛", "纠", "母", "幼", "丝", "可", "式"
, "刑", "动", "扛", "寺", "吉", "扣", "考", "托"
, "老", "执", "巩", "圾", "扩", "扫", "地", "扬"
, "场", "耳", "共", "芒", "亚", "芝", "朽", "朴"
, "机", "权", "过", "臣", "再", "协", "西", "压"
, "厌", "在", "有", "百", "存", "而", "页", "匠"
, "夸", "夺", "灰", "达", "列", "死", "成", "夹"
, "轨", "邪", "划", "迈", "毕", "至", "此", "贞"
, "师", "尘", "尖", "劣", "光", "当", "早", "吐"
, "吓", "虫", "曲", "团", "同", "吊", "吃", "因"
, "吸", "吗", "屿", "帆", "岁", "回", "岂", "刚"
, "则", "肉", "网", "年", "朱", "先", "丢", "舌"
, "竹", "迁", "乔", "伟", "传", "乒", "乓", "休"
, "伍", "伏", "优", "伐", "延", "件", "任", "伤"
, "价", "份", "华", "仰", "仿", "伙", "伪", "自"
, "血", "向", "似", "后", "行", "舟", "全", "会"
, "杀", "合", "兆", "企", "众", "爷", "伞", "创"
, "肌", "朵", "杂", "危", "旬", "旨", "负", "各"
, "名", "多", "争", "色", "壮", "冲", "冰", "庄"
, "庆", "亦", "刘", "齐", "交", "次", "衣", "产"
, "决", "充", "妄", "闭", "问", "闯", "羊", "并"
, "关", "米", "灯", "州", "汗", "污", "江", "池"
, "汤", "忙", "兴", "宇", "守", "宅", "字", "安"
, "讲", "军", "许", "论", "农", "讽", "设", "访"
, "寻", "那", "迅", "尽", "导", "异", "孙", "阵"
, "阳", "收", "阶", "阴", "防", "奸", "如", "妇"
, "好", "她", "妈", "戏", "羽", "观", "欢", "买"
, "红", "纤", "级", "约", "纪", "驰", "巡", "寿"
, "弄", "麦", "形", "进", "戒", "吞", "远", "违"
, "运", "扶", "抚", "坛", "技", "坏", "扰", "拒"
, "找", "批", "扯", "址", "走", "抄", "坝", "贡"
, "攻", "赤", "折", "抓", "扮", "抢", "孝", "均"
, "抛", "投", "坟", "抗", "坑", "坊", "抖", "护"
, "壳", "志", "扭", "块", "声", "把", "报", "却"
, "劫", "芽", "花", "芹", "芬", "苍", "芳", "严"
, "芦", "劳", "克", "苏", "杆", "杠", "杜", "材"
, "村", "杏", "极", "李", "杨", "求", "更", "束"
, "豆", "两", "丽", "医", "辰", "励", "否", "还"
, "歼", "来", "连", "步", "坚", "旱", "盯", "呈"
, "时", "吴", "助", "县", "里", "呆", "园", "旷"
, "围", "呀", "吨", "足", "邮", "男", "困", "吵"
, "串", "员", "听", "吩", "吹", "呜", "吧", "吼"
, "别", "岗", "帐", "财", "针", "钉", "告", "我"
, "乱", "利", "秃", "秀", "私", "每", "兵", "估"
, "体", "何", "但", "伸", "作", "伯", "伶", "佣"
, "低", "你", "住", "位", "伴", "身", "皂", "佛"
, "近", "彻", "役", "返", "余", "希", "坐", "谷"
, "妥", "含", "邻", "岔", "肝", "肚", "肠", "龟"
, "免", "狂", "犹", "角", "删", "条", "卵", "岛"
, "迎", "饭", "饮", "系", "言", "冻", "状", "亩"
, "况", "床", "库", "疗", "应", "冷", "这", "序"
, "辛", "弃", "冶", "忘", "闲", "间", "闷", "判"
, "灶", "灿", "弟", "汪", "沙", "汽", "沃", "泛"
, "沟", "没", "沈", "沉", "怀", "忧", "快", "完"
, "宋", "宏", "牢", "究", "穷", "灾", "良", "证"
, "启", "评", "补", "初", "社", "识", "诉", "诊"
, "词", "译", "君", "灵", "即", "层", "尿", "尾"
, "迟", "局", "改", "张", "忌", "际", "陆", "阿"
, "陈", "阻", "附", "妙", "妖", "妨", "努", "忍"
, "劲", "鸡", "驱", "纯", "纱", "纳", "纲", "驳"
, "纵", "纷", "纸", "纹", "纺", "驴", "纽", "奉"
, "玩", "环", "武", "青", "责", "现", "表", "规"
, "抹", "拢", "拔", "拣", "担", "坦", "押", "抽"
, "拐", "拖", "拍", "者", "顶", "拆", "拥", "抵"
, "拘", "势", "抱", "垃", "拉", "拦", "拌", "幸"
, "招", "坡", "披", "拨", "择", "抬", "其", "取"
, "苦", "若", "茂", "苹", "苗", "英", "范", "直"
, "茄", "茎", "茅", "林", "枝", "杯", "柜", "析"
, "板", "松", "枪", "构", "杰", "述", "枕", "丧"
, "或", "画", "卧", "事", "刺", "枣", "雨", "卖"
, "矿", "码", "厕", "奔", "奇", "奋", "态", "欧"
, "垄", "妻", "轰", "顷", "转", "斩", "轮", "软"
, "到", "非", "叔", "肯", "齿", "些", "虎", "虏"
, "肾", "贤", "尚", "旺", "具", "果", "味", "昆"
, "国", "昌", "畅", "明", "易", "昂", "典", "固"
, "忠", "咐", "呼", "鸣", "咏", "呢", "岸", "岩"
, "帖", "罗", "帜", "岭", "凯", "败", "贩", "购"
, "图", "钓", "制", "知", "垂", "牧", "物", "乖"
, "刮", "秆", "和", "季", "委", "佳", "侍", "供"
, "使", "例", "版", "侄", "侦", "侧", "凭", "侨"
, "佩", "货", "依", "的", "迫", "质", "欣", "征"
, "往", "爬", "彼", "径", "所", "舍", "金", "命"
, "斧", "爸", "采", "受", "乳", "贪", "念", "贫"
, "肤", "肺", "肢", "肿", "胀", "朋", "股", "肥"
, "服", "胁", "周", "昏", "鱼", "兔", "狐", "忽"
, "狗", "备", "饰", "饱", "饲", "变", "京", "享"
, "店", "夜", "庙", "府", "底", "剂", "郊", "废"
, "净", "盲", "放", "刻", "育", "闸", "闹", "郑"
, "券", "卷", "单", "炒", "炊", "炕", "炎", "炉"
, "沫", "浅", "法", "泄", "河", "沾", "泪", "油"
, "泊", "沿", "泡", "注", "泻", "泳", "泥", "沸"
, "波", "泼", "泽", "治", "怖", "性", "怕", "怜"
, "怪", "学", "宝", "宗", "定", "宜", "审", "宙"
, "官", "空", "帘", "实", "试", "郎", "诗", "肩"
, "房", "诚", "衬", "衫", "视", "话", "诞", "询"
, "该", "详", "建", "肃", "录", "隶", "居", "届"
, "刷", "屈", "弦", "承", "孟", "孤", "陕", "降"
, "限", "妹", "姑", "姐", "姓", "始", "驾", "参"
, "艰", "线", "练", "组", "细", "驶", "织", "终"
, "驻", "驼", "绍", "经", "贯", "奏", "春", "帮"
, "珍", "玻", "毒", "型", "挂", "封", "持", "项"
, "垮", "挎", "城", "挠", "政", "赴", "赵", "挡"
, "挺", "括", "拴", "拾", "挑", "指", "垫", "挣"
, "挤", "拼", "挖", "按", "挥", "挪", "某", "甚"
, "革", "荐", "巷", "带", "草", "茧", "茶", "荒"
, "茫", "荡", "荣", "故", "胡", "南", "药", "标"
, "枯", "柄", "栋", "相", "查", "柏", "柳", "柱"
, "柿", "栏", "树", "要", "咸", "威", "歪", "研"
, "砖", "厘", "厚", "砌", "砍", "面", "耐", "耍"
, "牵", "残", "殃", "轻", "鸦", "皆", "背", "战"
, "点", "临", "览", "竖", "省", "削", "尝", "是"
, "盼", "眨", "哄", "显", "哑", "冒", "映", "星"
, "昨", "畏", "趴", "胃", "贵", "界", "虹", "虾"
, "蚁", "思", "蚂", "虽", "品", "咽", "骂", "哗"
, "咱", "响", "哈", "咬", "咳", "哪", "炭", "峡"
, "罚", "贱", "贴", "骨", "钞", "钟", "钢", "钥"
, "钩", "卸", "缸", "拜", "看", "矩", "怎", "牲"
, "选", "适", "秒", "香", "种", "秋", "科", "重"
, "复", "竿", "段", "便", "俩", "贷", "顺", "修"
, "保", "促", "侮", "俭", "俗", "俘", "信", "皇"
, "泉", "鬼", "侵", "追", "俊", "盾", "待", "律"
, "很", "须", "叙", "剑", "逃", "食", "盆", "胆"
, "胜", "胞", "胖", "脉", "勉", "狭", "狮", "独"
, "狡", "狱", "狠", "贸", "怨", "急", "饶", "蚀"
, "饺", "饼", "弯", "将", "奖", "哀", "亭", "亮"
, "度", "迹", "庭", "疮", "疯", "疫", "疤", "姿"
, "亲", "音", "帝", "施", "闻", "阀", "阁", "差"
, "养", "美", "姜", "叛", "送", "类", "迷", "前"
, "首", "逆", "总", "炼", "炸", "炮", "烂", "剃"
, "洁", "洪", "洒", "浇", "浊", "洞", "测", "洗"
, "活", "派", "洽", "染", "济", "洋", "洲", "浑"
, "浓", "津", "恒", "恢", "恰", "恼", "恨", "举"
, "觉", "宣", "室", "宫", "宪", "突", "穿", "窃"
, "客", "冠", "语", "扁", "袄", "祖", "神", "祝"
, "误", "诱", "说", "诵", "垦", "退", "既", "屋"
, "昼", "费", "陡", "眉", "孩", "除", "险", "院"
, "娃", "姥", "姨", "姻", "娇", "怒", "架", "贺"
, "盈", "勇", "怠", "柔", "垒", "绑", "绒", "结"
, "绕", "骄", "绘", "给", "络", "骆", "绝", "绞"
, "统", "耕", "耗", "艳", "泰", "珠", "班", "素"
, "蚕", "顽", "盏", "匪", "捞", "栽", "捕", "振"
, "载", "赶", "起", "盐", "捎", "捏", "埋", "捉"
, "捆", "捐", "损", "都", "哲", "逝", "捡", "换"
, "挽", "热", "恐", "壶", "挨", "耻", "耽", "恭"
, "莲", "莫", "荷", "获", "晋", "恶", "真", "框"
, "桂", "档", "桐", "株", "桥", "桃", "格", "校"
, "核", "样", "根", "索", "哥", "速", "逗", "栗"
, "配", "翅", "辱", "唇", "夏", "础", "破", "原"
, "套", "逐", "烈", "殊", "顾", "轿", "较", "顿"
, "毙", "致", "柴", "桌", "虑", "监", "紧", "党"
, "晒", "眠", "晓", "鸭", "晃", "晌", "晕", "蚊"
, "哨", "哭", "恩", "唤", "啊", "唉", "罢", "峰"
, "圆", "贼", "贿", "钱", "钳", "钻", "铁", "铃"
, "铅", "缺", "氧", "特", "牺", "造", "乘", "敌"
, "秤", "租", "积", "秧", "秩", "称", "秘", "透"
, "笔", "笑", "笋", "债", "借", "值", "倚", "倾"
, "倒", "倘", "俱", "倡", "候", "俯", "倍", "倦"
, "健", "臭", "射", "躬", "息", "徒", "徐", "舰"
, "舱", "般", "航", "途", "拿", "爹", "爱", "颂"
, "翁", "脆", "脂", "胸", "胳", "脏", "胶", "脑"
, "狸", "狼", "逢", "留", "皱", "饿", "恋", "桨"
, "浆", "衰", "高", "席", "准", "座", "脊", "症"
, "病", "疾", "疼", "疲", "效", "离", "唐", "资"
, "凉", "站", "剖", "竞", "部", "旁", "旅", "畜"
, "阅", "羞", "瓶", "拳", "粉", "料", "益", "兼"
, "烤", "烘", "烦", "烧", "烛", "烟", "递", "涛"
, "浙", "涝", "酒", "涉", "消", "浩", "海", "涂"
, "浴", "浮", "流", "润", "浪", "浸", "涨", "烫"
, "涌", "悟", "悄", "悔", "悦", "害", "宽", "家"
, "宵", "宴", "宾", "窄", "容", "宰", "案", "请"
, "朗", "诸", "读", "扇", "袜", "袖", "袍", "被"
, "祥", "课", "谁", "调", "冤", "谅", "谈", "谊"
, "剥", "恳", "展", "剧", "屑", "弱", "陵", "陶"
, "陷", "陪", "娱", "娘", "通", "能", "难", "预"
, "桑", "绢", "绣", "验", "继", "球", "理", "捧"
, "堵", "描", "域", "掩", "捷", "排", "掉", "堆"
, "推", "掀", "授", "教", "掏", "掠", "培", "接"
, "控", "探", "据", "掘", "职", "基", "著", "勒"
, "黄", "萌", "萝", "菌", "菜", "萄", "菊", "萍"
, "菠", "营", "械", "梦", "梢", "梅", "检", "梳"
, "梯", "桶", "救", "副", "票", "戚", "爽", "聋"
, "袭", "盛", "雪", "辅", "辆", "虚", "雀", "堂"
, "常", "匙", "晨", "睁", "眯", "眼", "悬", "野"
, "啦", "晚", "啄", "距", "跃", "略", "蛇", "累"
, "唱", "患", "唯", "崖", "崭", "崇", "圈", "铜"
, "铲", "银", "甜", "梨", "犁", "移", "笨", "笼"
, "笛", "符", "第", "敏", "做", "袋", "悠", "偿"
, "偶", "偷", "您", "售", "停", "偏", "假", "得"
, "衔", "盘", "船", "斜", "盒", "鸽", "悉", "欲"
, "彩", "领", "脚", "脖", "脸", "脱", "象", "够"
, "猜", "猪", "猎", "猫", "猛", "馅", "馆", "凑"
, "减", "毫", "麻", "痒", "痕", "廊", "康", "庸"
, "鹿", "盗", "章", "竟", "商", "族", "旋", "望"
, "率", "着", "盖", "粘", "粗", "粒", "断", "剪"
, "兽", "清", "添", "淋", "淹", "渠", "渐", "混"
, "渔", "淘", "液", "淡", "深", "婆", "梁", "渗"
, "情", "惜", "惭", "悼", "惧", "惕", "惊", "惨"
, "惯", "寇", "寄", "宿", "窑", "密", "谋", "谎"
, "祸", "谜", "逮", "敢", "屠", "弹", "随", "蛋"
, "隆", "隐", "婚", "婶", "颈", "绩", "绪", "续"
, "骑", "绳", "维", "绵", "绸", "绿", "琴", "斑"
, "替", "款", "堪", "搭", "塔", "越", "趁", "趋"
, "超", "提", "堤", "博", "揭", "喜", "插", "揪"
, "搜", "煮", "援", "裁", "搁", "搂", "搅", "握"
, "揉", "斯", "期", "欺", "联", "散", "惹", "葬"
, "葛", "董", "葡", "敬", "葱", "落", "朝", "辜"
, "葵", "棒", "棋", "植", "森", "椅", "椒", "棵"
, "棍", "棉", "棚", "棕", "惠", "惑", "逼", "厨"
, "厦", "硬", "确", "雁", "殖", "裂", "雄", "暂"
, "雅", "辈", "悲", "紫", "辉", "敞", "赏", "掌"
, "晴", "暑", "最", "量", "喷", "晶", "喇", "遇"
, "喊", "景", "践", "跌", "跑", "遗", "蛙", "蛛"
, "蜓", "喝", "喂", "喘", "喉", "幅", "帽", "赌"
, "赔", "黑", "铸", "铺", "链", "销", "锁", "锄"
, "锅", "锈", "锋", "锐", "短", "智", "毯", "鹅"
, "剩", "稍", "程", "稀", "税", "筐", "等", "筑"
, "策", "筛", "筒", "答", "筋", "筝", "傲", "傅"
, "牌", "堡", "集", "焦", "傍", "储", "奥", "街"
]
convert_to_cn :: String -> Maybe String
convert_to_cn w = fmap (wl_cn !!) (elemIndex w wl_en)
convert_from_cn :: String -> Maybe String
convert_from_cn w = fmap (wl_en !!) (elemIndex w wl_cn)
main :: IO ()
main = do
ws <- getArgs
let m_ws_cn = mapM convert_to_cn ws
ws_cn <- maybe (fail "invalid recovery phase.") return m_ws_cn
mapM_ putStr ws_cn
putStr "\n"
@yihuang
Copy link
Author

yihuang commented Jan 21, 2018

$ ./chinese_recovery_phase.hs canal artefact iron again dinosaur
白日依山尽

@yihuang
Copy link
Author

yihuang commented Jan 21, 2018

$ ./chinese_recovery_phase.hs develop design device decrease
守江宅亦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment