Skip to content

Commit

Permalink
vi and zh instances (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
etspaceman authored Aug 21, 2020
1 parent 29c9eb8 commit d4c79db
Show file tree
Hide file tree
Showing 21 changed files with 281 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/resources/vi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include "vi/name.conf"
include "vi/internet.conf"
include "vi/phone.conf"
include "vi/address.conf"
include "vi/company.conf"
20 changes: 20 additions & 0 deletions src/main/resources/vi/address.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
include "name.conf"

address {
postal-code-builder = {options = [{parts = [{type = "string-regex-part", value = "[A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}"}]}]}
city-names = ["Bắc Giang", "Bắc Kạn", "Bắc Ninh", "Cao Bằng", "Điện Biên", "Hà Giang", "Hà Nam", "Hà Tây",
"Hải Dương", "TP Hải Phòng", "Hòa Bình", "Hưng Yên", "Lai Châu", "Lào Cai", "Lạng Sơn", "Nam Định",
"Ninh Bình", "Phú Thọ", "Quảng Ninh", "Sơn La", "Thái Bình", "Thái Nguyên", "Tuyên Quang", "Vĩnh Phúc",
"Yên Bái", "TP Đà Nẵng", "Bình Định", "Đắk Lắk", "Đắk Nông", "Gia Lai", "Hà Tĩnh", "Khánh Hòa", "Kon Tum",
"Nghệ An", "Phú Yên", "Quảng Bình", "Quảng Nam", "Quảng Ngãi", "Quảng Trị", "Thanh Hóa", "Thừa Thiên Huế",
"TP TP. Hồ Chí Minh", "An Giang", "Bà Rịa Vũng Tàu", "Bạc Liêu", "Bến Tre", "Bình Dương", "Bình Phước",
"Bình Thuận", "Cà Mau", "TP Cần Thơ", "Đồng Nai", "Đồng Tháp", "Hậu Giang", "Kiên Giang", "Lâm Đồng",
"Long An", "Ninh Thuận", "Sóc Trăng", "Tây Ninh", "Tiền Giang", "Trà Vinh", "Vĩnh Long"]
city-builder = {
options = [
{parts = [{type = "seq-string-part", value = ${address.city-names}}]}
]
}

default-countries = [{code = "VI", name = "Việt Nam"}]
}
11 changes: 11 additions & 0 deletions src/main/resources/vi/company.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include "name.conf"

company {
prefixes = ["Công ty", "Cty TNHH", "Cty", "Cửa hàng", "Trung tâm", "Chi nhánh"]

company-name-builder = {
options = [
{parts = [{type = "seq-string-part", value = ${company.prefixes}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}}]}
]
}
}
3 changes: 3 additions & 0 deletions src/main/resources/vi/internet.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
internet {
domain-suffixes = [com, net, info, vn, com.vn]
}
9 changes: 9 additions & 0 deletions src/main/resources/vi/lorem.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
lorem.words = ["đã", "đang", "ừ", "ờ", "á", "không", "biết", "gì", "hết", "đâu", "nha",
"thế", "thì", "là", "đánh", "đá", "đập", "phá", "viết", "vẽ", "tô", "thuê",
"mướn", "mượn", "mua", "một", "hai", "ba", "bốn", "năm", "sáu", "bảy", "tám",
"chín", "mười", "thôi", "việc", "nghỉ", "làm", "nhà", "cửa", "xe", "đạp", "ác",
"độc", "khoảng", "khoan", "thuyền", "tàu", "bè", "lầu", "xanh", "đỏ", "tím", "vàng",
"kim", "chỉ", "khâu", "may", "vá", "em", "anh", "yêu", "thương", "thích", "con", "cái",
"bàn", "ghế", "tủ", "quần", "áo", "nón", "dép", "giày", "lỗi", "được", "ghét", "giết",
"chết", "hết", "tôi", "bạn", "tui", "trời", "trăng", "mây", "gió", "máy", "hàng", "hóa",
"leo", "núi", "bơi", "biển", "chìm", "xuồng", "nước", "ngọt", "ruộng", "đồng", "quê", "hương"]
26 changes: 26 additions & 0 deletions src/main/resources/vi/name.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name {
first.names = ["Phạm", "Nguyễn", "Trần", "Lê", "Lý", "Hoàng", "Phan", "Vũ", "Tăng",
"Đặng", "Bùi", "Đỗ", "Hồ", "Ngô", "Dương", "Đào", "Đoàn", "Vương",
"Trịnh", "Đinh", "Lâm", "Phùng", "Mai", "Tô", "Trương", "Hà"]
last.names = ["Nam", "Trung", "Thanh", "Thị", "Văn", "Dương", "Tăng", "Quốc", "Như",
"Phạm", "Nguyễn", "Trần", "Lê", "Lý", "Hoàng", "Phan", "Vũ", "Tăng",
"Đặng", "Bùi", "Đỗ", "Hồ", "Ngô", "Dương", "Đào", "Đoàn", "Vương",
"Trịnh", "Đinh", "Lâm", "Phùng", "Mai", "Tô", "Trương", "Hà",
"Vinh", "Nhung", "Hòa", "Tiến", "Tâm", "Bửu", "Loan", "Hiền", "Hải",
"Vân", "Kha", "Minh", "Nhân", "Triệu", "Tuân", "Hữu", "Đức", "Phú", "Khoa",
"Thắng", "Sơn", "Dung", "Tú", "Trinh", "Thảo", "Sa", "Kim", "Long", "Thi",
"Cường", "Ngọc", "Sinh", "Khang", "Phong", "Thắm", "Thu", "Thủy", "Nhàn"]

full-name-builder = {
options = [
{parts = [{type = "seq-string-part", value = ${name.first.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}}]},
{parts = [{type = "seq-string-part", value = ${name.first.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}}]},
{parts = [{type = "seq-string-part", value = ${name.first.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}}]}
]
}
full-name-with-middle-builder = {
options = [
{parts = [{type = "seq-string-part", value = ${name.first.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}}]}
]
}
}
4 changes: 4 additions & 0 deletions src/main/resources/vi/phone.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
phone {
phone-number-builder = {options = [{parts = [{type = "seq-string-part", value = ["01#### #####", "01### ######", "01#1 ### ####", "011# ### ####", "02# #### ####", "03## ### ####", "055 #### ####", "056 #### ####", "0800 ### ####", "08## ### ####", "09## ### ####", "016977 ####", "01### #####", "0500 ######", "0800 ######"]}]}]}
cell-number-builder = {options = [{parts = [{type = "seq-string-part", value = ["012# ### ####", "0162 ### ####", "0163 ### ####", "0164 ### ####", "0165 ### ####", "0166 ### ####", "0167 ### ####", "0168 ### ####", "0169 ### ####", "0186 ### ####", "0188 ### ####", "0199 ### ####", "0866 ### ###", "0868 ### ###", "0869 ### ###", "088# ### ###", "09## ### ###"]}]}]}
}
3 changes: 3 additions & 0 deletions src/main/resources/zh_CN.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include "zh_CN/name.conf"
include "zh_CN/phone.conf"
include "zh_CN/address.conf"
66 changes: 66 additions & 0 deletions src/main/resources/zh_CN/address.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
include "name.conf"

address {
postal-code-builder = {options = [{parts = [{type = "string-part", value = "######"}]}]}
city-names = [海门, 鄂尔多斯, 招远, 舟山, 齐齐哈尔, 盐城, 赤峰, 青岛, 乳山, 金昌, 泉州, 莱西, 日照, 胶南, 南通, 拉萨, 云浮, 梅州, 文登, 上海, 攀枝花, 威海, 承德, 厦门, 汕尾, 潮州, 丹东, 太仓, 曲靖, 烟台, 福州, 瓦房店, 即墨, 抚顺, 玉溪, 张家口, 阳泉, 莱州, 湖州, 汕头, 昆山, 宁波, 湛江, 揭阳, 荣成, 连云港, 葫芦岛, 常熟, 东莞, 河源, 淮安, 泰州, 南宁, 营口, 惠州, 江阴, 蓬莱, 韶关, 嘉峪关, 广州, 延安, 太原, 清远, 中山, 昆明, 寿光, 盘锦, 长治, 深圳, 珠海, 宿迁, 咸阳, 铜川, 平度, 佛山, 海口, 江门, 章丘, 肇庆, 大连, 临汾, 吴江, 石嘴山, 沈阳, 苏州, 茂名, 嘉兴, 长春, 胶州, 银川, 张家港, 三门峡, 锦州, 南昌, 柳州, 三亚, 自贡, 吉林, 阳江, 泸州, 西宁, 宜宾, 呼和浩特, 成都, 大同, 镇江, 桂林, 张家界, 宜兴, 北海, 西安, 金坛, 东营, 牡丹江, 遵义, 绍兴, 扬州, 常州, 潍坊, 重庆, 台州, 南京, 滨州, 贵阳, 无锡, 本溪, 克拉玛依, 渭南, 马鞍山, 宝鸡, 焦作, 句容, 北京, 徐州, 衡水, 包头, 绵阳, 乌鲁木齐, 枣庄, 杭州, 淄博, 鞍山, 溧阳, 库尔勒, 安阳, 开封, 济南, 德阳, 温州, 九江, 邯郸, 临安, 兰州, 沧州, 临沂, 南充, 天津, 富阳, 泰安, 诸暨, 郑州, 哈尔滨, 聊城, 芜湖, 唐山, 平顶山, 邢台, 德州, 济宁, 荆州, 宜昌, 义乌, 丽水, 洛阳, 秦皇岛, 株洲, 石家庄, 莱芜, 常德, 保定, 湘潭, 金华, 岳阳, 长沙, 衢州, 廊坊, 菏泽, 合肥, 武汉, 大庆]
city-builder = {
options = [
{parts = [{type = "seq-string-part", value = ${address.city-names}}]}
]
}
states = [
{ type = "province", abbr = 京, name = 北京市, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 沪, name = 上海市, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 津, name = 天津市, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 渝, name = 重庆市, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 黑, name = 黑龙江省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 吉, name = 吉林省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 辽, name = 辽宁省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 蒙, name = 内蒙古, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 冀, name = 河北省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 新, name = 新疆, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 甘, name = 甘肃省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 青, name = 青海省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 陕, name = 陕西省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 宁, name = 宁夏, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 豫, name = 河南省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 鲁, name = 山东省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 晋, name = 山西省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 皖, name = 安徽省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 鄂, name = 湖北省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 湘, name = 湖南省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 苏, name = 江苏省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 川, name = 四川省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 黔, name = 贵州省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 滇, name = 云南省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 桂, name = 广西省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 藏, name = 西藏, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 浙, name = 浙江省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 赣, name = 江西省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 粤, name = 广东省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 闽, name = 福建省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 琼, name = 海南省, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 港, name = 香港, postal-code-builder = ${address.postal-code-builder}},
{ type = "province", abbr = 澳, name = 澳门, postal-code-builder = ${address.postal-code-builder}}
]

building-numbers = ["#", "##", "###", "####", "#####"]
street-suffixes = [巷, 街, 路, 桥, 侬, 旁, 中心, 栋]
street-name-builder = {
options = [
{parts = [{type = "seq-string-part", value = ${name.last.names}}, {type = "seq-string-part", value = ${address.street-suffixes}}]}
]
}

street-address-builder = {
options = [
{parts = [{type = "string-builder-part", value = ${address.street-name-builder}}, {type = "seq-string-part", value = ${address.building-numbers}}]}
]
}
full-address-builder = {
options = [
{parts = [{type = "string-builder-part", value = ${address.street-name-builder}, suffix = ", "}, {type = "string-builder-part", value = ${address.city-builder}, suffix = ", "}, {type = "string-builder-part", value = ${address.postal-code-builder}, suffix = " "}, {type = "seq-state-name-part", value = ${address.states}}]}
]
}
default-countries = [{code = "中国", name = "中国"}]
}
15 changes: 15 additions & 0 deletions src/main/resources/zh_CN/name.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name {
first.names = [绍齐, 博文, 梓晨, 胤祥, 瑞霖, 明哲, 天翊, 凯瑞, 健雄, 耀杰, 潇然, 子涵, 越彬, 钰轩, 智辉, 致远, 俊驰, 雨泽, 烨磊, 晟睿, 文昊, 修洁, 黎昕, 远航, 旭尧, 鸿涛, 伟祺, 荣轩, 越泽, 浩宇, 瑾瑜, 皓轩, 擎苍, 擎宇, 志泽, 子轩, 睿渊, 弘文, 哲瀚, 雨泽, 楷瑞, 建辉, 晋鹏, 天磊, 绍辉, 泽洋, 鑫磊, 鹏煊, 昊强, 伟宸, 博超, 君浩, 子骞, 鹏涛, 炎彬, 鹤轩, 越彬, 风华, 靖琪, 明辉, 伟诚, 明轩, 健柏, 修杰, 志泽, 弘文, 峻熙, 嘉懿, 煜城, 懿轩, 烨伟, 苑博, 伟泽, 熠彤, 鸿煊, 博涛, 烨霖, 烨华, 煜祺, 智宸, 正豪, 昊然, 明杰, 立诚, 立轩, 立辉, 峻熙, 弘文, 熠彤, 鸿煊, 烨霖, 哲瀚, 鑫鹏, 昊天, 思聪, 展鹏, 笑愚, 志强, 炫明, 雪松, 思源, 智渊, 思淼, 晓啸, 天宇, 浩然, 文轩, 鹭洋, 振家, 乐驹, 晓博, 文博, 昊焱, 立果, 金鑫, 锦程, 嘉熙, 鹏飞, 子默, 思远, 浩轩, 语堂, 聪健, 明, 文, 果, 思, 鹏, 驰, 涛, 琪, 浩, 航, 彬]
last.names = [王, 李, 张, 刘, 陈, 杨, 黄, 吴, 赵, 周, 徐, 孙, 马, 朱, 胡, 林, 郭, 何, 高, 罗, 郑, 梁, 谢, 宋, 唐, 许, 邓, 冯, 韩, 曹, 曾, 彭, 萧, 蔡, 潘, 田, 董, 袁, 于, 余, 叶, 蒋, 杜, 苏, 魏, 程, 吕, 丁, 沈, 任, 姚, 卢, 傅, 钟, 姜, 崔, 谭, 廖, 范, 汪, 陆, 金, 石, 戴, 贾, 韦, 夏, 邱, 方, 侯, 邹, 熊, 孟, 秦, 白, 江, 阎, 薛, 尹, 段, 雷, 黎, 史, 龙, 陶, 贺, 顾, 毛, 郝, 龚, 邵, 万, 钱, 严, 赖, 覃, 洪, 武, 莫, 孔]

full-name-builder = {
options = [
{parts = [{type = "seq-string-part", value = ${name.first.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}}]}
]
}
full-name-with-middle-builder = {
options = [
{parts = [{type = "seq-string-part", value = ${name.first.names}, suffix = " "}, {type = "seq-string-part", value = ${name.last.names}}]}
]
}
}
4 changes: 4 additions & 0 deletions src/main/resources/zh_CN/phone.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
phone {
phone-number-builder = {options = [{parts = [{type = "seq-string-part", value = ["###-########", "####-########", "###########"]}]}]}
cell-number-builder = {options = [{parts = [{type = "seq-string-part", value = ["13#########", "145########", "147########", "150########", "151########", "152########", "153########", "155########", "156########", "157########", "158########", "159########", "170########", "171########", "172########", "173########", "175########", "176########", "177########", "178########", "18#########"]}]}]}
}
3 changes: 3 additions & 0 deletions src/main/resources/zh_TW.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include "zh_TW/name.conf"
include "zh_TW/phone.conf"
include "zh_TW/address.conf"
Loading

0 comments on commit d4c79db

Please sign in to comment.