{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# https://www.facebook.com/SayaAnakMelaka/posts/kamus-loghat-melaka-draf-akhir-ada-lg-yg-nak-tambah-atau-nak-ubahanggai-jemurame/10152503932636883/\n",
    "\n",
    "additional = \"\"\"\n",
    "Anggai-Jemur\n",
    "Amek - Ambil\n",
    "Ape Ngentam - Apa Kena\n",
    "Air Semangkeng-Air Tembikai..\n",
    "Ambuat : Buat Apa\n",
    "Ampang=Sangat\n",
    "Ajuk - Kutuk\n",
    "Amende-Apabenda\n",
    "Ayo=Air\n",
    "Acop = Lepas Had\n",
    "Acop=Paras Kepala\n",
    "Belajau-Belajar\n",
    "Begolot-Golot=Berebut2\n",
    "Berlendir-Berdating\n",
    "Beygaw:Degil\n",
    "BONDAR-Anak Sungai\n",
    "Bongkau = Bangun\n",
    "Begau - Degil\n",
    "Beledau - Mangkuk Besen.\n",
    "Bejeman - Berzaman/Lama Sgt\n",
    "Bernyawa - Bercinta Besau Nau = Besar Nya\n",
    "Begau - Msk Air(Gila-Gila)\n",
    "Bagha - Makan\n",
    "Biau Benau : Biar Benar\n",
    "Betina Langli - Bole Dduk Diam\n",
    "Bahlighap- Bahasa Kasar Bermaksud Makan\n",
    "Berposak-Posak - Melakukan Sesuatu Yang Payah Dibuat\n",
    "Barah – Makan\n",
    "Becinta-Malas\n",
    "Boyan - Buaian\n",
    "Berkepau - Bselerak\n",
    "Belo - Bodoh\n",
    "Berkalok - Berdaki\n",
    "Boko - Makan\n",
    "Begau - Degil\n",
    "Bakau Darah - Buat Orang Panas Ati\n",
    "Bokoh-Makan Berbagrah\n",
    "Boleng:Togel\n",
    "Bebal - Bodoh\n",
    "Berantam-Antam=Berkongsi\n",
    "Begau - Xbetul, Dtg Giler\n",
    "Bokbang - Ckp Tggi\n",
    "Berdepot - Mantap\n",
    "Bak - Bagi Sini\n",
    "Baut - Degil\n",
    "Berlambir - Melayot\n",
    "Bingai - Bodoh\n",
    "Berbuse - Mulut Yg Penuh Dgn X Kesah La Pape\n",
    "Batok Kesembo - Makan Dgn Sgt Pelahapnye\n",
    "Buah Kepaya - Betik\n",
    "Bertitip - Berderet\n",
    "Bau Haghi - Bau Tengit Berjemur Di Tghari\n",
    "Bergambat - Berkejar2an\n",
    "Bagak - Besar Dan Kasar (Rupa/Bentuk)\n",
    "Bighat/Birat - Kulit Yang Gelap, Hitam\n",
    "BERDORAP - Tujahan Yg Kuat Hehe\n",
    "Bigau - Nakal/Buas\n",
    "Berlonak - Banyak\n",
    "Balon - Pukul@Lanyak\n",
    "Bigau - Sewel Sikit\n",
    "Bebulu - Geram\n",
    "Boya - Pelampung.\n",
    "Bertakau2 - Byk Bekas\n",
    "Bongok - Bodoh/Bengap\n",
    "Bedepot - Mantap\n",
    "Bokbang , Bedaah - Membohong\n",
    "Buran - Tak Betul Betul\n",
    "Baruh - Ke Bawah\n",
    "Belengging - Xpakai Baju\n",
    "Berkepau - Bersepah\n",
    "Begauk - Heboh\n",
    "Banjau - Mana Arah\n",
    "Beledau - Besen\n",
    "Bersepai - Hancur\n",
    "Berteribas - Kelam Kabut\n",
    "Capang - Telinga Mcm Piring Astro\n",
    "Cecah - Celup\n",
    "Cakl Lengkong - Agar–Agar\n",
    "Cekau - Rampas\n",
    "Cendekil - Main Tipu\n",
    "Coken - Towel Mandi\n",
    "Cakuncak - Pesta Meriah\n",
    "Cuak - Takut\n",
    "Chemat - Rotan\n",
    "Cebuk - Istinjak\n",
    "Cenekel - Main Tipu\n",
    "Cenekel - Bnyk Akal\n",
    "Cekadak - Banyak Songeh\n",
    "Cakpi - Mancis Api,\n",
    "Caklon - Isap Gam\n",
    "Cepuk/Kompang - Pukul\n",
    "Damau- Plastik Atau Bhan Yg Rapuh\n",
    "Dak – Si P0lan\n",
    "Dak - Menunjuk Pd Seseorg Cth: Dak Ali/ Si Ali.\n",
    "Darat - Atas\n",
    "Dekak - Sekel\n",
    "Dari Kulu - Dr Arah Ulu Ke Kilir\n",
    "Deras - Cepat @ Segera\n",
    "Dedat - Kesat\n",
    "Duel - Biol\n",
    "Dedau - Badan Panas Nak Demam\n",
    "Dano - Dungu/Ter.. Bodoh\n",
    "Edan - Aku\n",
    "Godak - Kacau\n",
    "Gedabak - Sangat Besar\n",
    "Gedempong - Sangat Gemuk\n",
    "Gobau - Huru-Hara\n",
    "Gobok - Almari\n",
    "Ganyut - Tidak Empuk/Terlalu Tua\n",
    "Gamai – Ramai\n",
    "Gebau - Selimut\n",
    "Handau - Sia2\n",
    "Hagol - Hantuk Kan 2 Kpale\n",
    "Himul - Degil\n",
    "Hongges - Kupas Guna Gigi\n",
    "Handau - Kalah/Tewas\n",
    "Hati Kaudu - Hati Keras\n",
    "Hanjeng - Anjing\n",
    "Ikan Betuk - Ikan Puyu\n",
    "Ikan Guan - Haruan\n",
    "Godak - Mengacau/Bancuh\n",
    "Gigal - Gila2\n",
    "Gempau - Gempar Gegau - Goyang\n",
    "Ghetok - Byk Ckap, Mulut Bising\n",
    "Galeh - Ketepi\n",
    "Gombong - Bakul Baju Untk Isi Baju Bayi\n",
    "Gebang - Ckp Besau\n",
    "Gogop - Teguk\n",
    "Gebas - Gerimis\n",
    "Gegau - Goyang\n",
    "Galip - Mata Dah Galip/Mengantuk\n",
    "Gelegau Gelegus - Haus Yg Teramat Sgt\n",
    "Gogail - Bercanggah\n",
    "Jalan Kengkang - Jalan Berterabor\n",
    "Jenjet - Jinjing\n",
    "Jibauk - Musibat\n",
    "Jikbidau/ Begaok = Huru-Hara\n",
    "Jaum - Jarum\n",
    "Kensal - Tuala\n",
    "Kuang – Kurang\n",
    "Kendeng - Berjalan Sambil Membawa Sesuatu Benda/Barang Yg Kedua Di Atas Bahu Atau Tangan\n",
    "Kendian - Kemudian\n",
    "Kerok - Garu\n",
    "Kuti - Picit\n",
    "Kahau - Panas Baran\n",
    "Kuntau - Penyodok Sampah\n",
    "Keyki - Marah\n",
    "Keneneng - Pening\n",
    "Kemap - Melekat\n",
    "Koghet - Anak Bongsu\n",
    "Kiben - Mencuri\n",
    "Kebentak - Kenyang Amat Sangat\n",
    "Kuak - Tepi Sikit\n",
    "Kacau - Usik\n",
    "Kebah - Berpeluh Baik Dari Demam\n",
    "Kutukana - Perpustakaan\n",
    "Ketetel - Lari Lari Anak\n",
    "Kohot - Kering\n",
    "Kotai - Terlalu Kurus\n",
    "Kodi - Macam\n",
    "Kedaung - Jauh/Hulu\n",
    "Kakun - Terlalu Tua\n",
    "Kambas - Peria\n",
    "Kejau - Kejar\n",
    "Ketiau - Ikhtiar\n",
    "Kebelai - Pepadah Kebuloh\n",
    "Kongkam - Masuk Air\n",
    "Kuluh - Sukun Goreng\n",
    "Kandau - Kandar\n",
    "Kalok - Hitam Legam\n",
    "Kemut - Kedekut Nak Mampos\n",
    "Kuau - Keluar\n",
    "Keleyse - Malas\n",
    "Kengga - Kerengga\n",
    "Kepau - Bersepah\n",
    "Kamen - Bukan Main\n",
    "Kohot - Kering Hbis\n",
    "Kokel - Makan Terus Pada Buah\n",
    "Kememeh - Kuat Menangis\n",
    "Ketotet - Sangat Kecik/Kenit\n",
    "Kebentak - Kenyang\n",
    "Keyrop - Alamat@Address\n",
    "Kebongsang - Kekenyangan\n",
    "Kendian - Kemudian\n",
    "Kebau Balau - Kerbau Besar\n",
    "Kelepau - Bersepah\n",
    "Karang - Kejap Lagi\n",
    "Kongkang - Gigit Bontot\n",
    "Keneneng - Pening2 Lalat\n",
    "Kahau - Bahasa Kasau\n",
    "Lecak - Lopak Air..\n",
    "Lapau - Lapar\n",
    "Loghot - Gelongsor\n",
    "Lahabau - Apa Kabar\n",
    "Lahabau – Malaun\n",
    "Leba Lebo - Cakap Ye Ye Je\n",
    "Loyang - Bekas Kueh\n",
    "Lekas - Cepat\n",
    "Loteng - Atas Rumah Simpan Barang\n",
    "Lacak - Pijak\n",
    "Lebau - Lebar...\n",
    "Licau - Licin X Berbaki\n",
    "Lompok - Longgok\n",
    "Ler – Lah\n",
    "Lecut - Baling\n",
    "Lebang - Pemalas\n",
    "Lopong - Belobang\n",
    "Lopak - Pensil Box\n",
    "Lepuk - Pukul\n",
    "Lompang - Lempang\n",
    "Longgau - Longgar\n",
    "Loghat - Perbuatan Yang Melampau\n",
    "Loghat - Menyibuk\n",
    "Lokos - Basah Kuyup\n",
    "Membobok - Becakap Tak Abes Abes\n",
    "Melilau - Tak Tentu Arah Tuju\n",
    "Mengkewan - Tandas Luar Rumah\n",
    "Melingkau - Melingkar\n",
    "Mengimol - Menyibuk\n",
    "Mengengkek - Tedengkut2 @ Susah\n",
    "Menangok - Merayau\n",
    "Mangkau - Nakal\n",
    "Melantak – Makan\n",
    "Merewang - Berg0t0ng R0y0ng\n",
    "Memboyak - Gemok Sgt\n",
    "Mengimul - Semahu-Mahunya\n",
    "Mesi - Jururawat\n",
    "Melesit - Sangat Putih\n",
    "Madang - Selalu\n",
    "Mengimol - Ngade2\n",
    "Medu - Terlalu Manis\n",
    "Menyingai - Senyum Kambing\n",
    "Mengenyut - Terlalu Hitam\n",
    "Mentareh - Selepas Selesai Sesuatu Perkerjaan Yang Amat Letih...\n",
    "Memacul - Tido\n",
    "Mak We - Mak Cik\n",
    "Maham Tanah - Makan Tanah\n",
    "Menantong - Merayap Tgh2 Hari Atau Malam\n",
    "Menjejes - Air Menitik Sepnjang Jln\n",
    "Melahak - Sangat Besar / Sangat Banyak\n",
    "Melak-Melak - Kalau2\n",
    "Melesau - Merapati\n",
    "Mengkereh - Mengangkat Sesuatu Benda/Barang Yang Amat Berat\n",
    "Mata Perun - Tempat Org Bakau Sampah\n",
    "Menceceh - Membebel/Berleter\n",
    "Melantong - Bau yg sgt busuk\n",
    "Melangut - Lepak Buang Masa\n",
    "Mentadarah - Mkn X Igt Dunia, Mengatong-Bjalan Uma Ke Uma,\n",
    "Melintau - Mencari Sesuatu\n",
    "Melilau - Kelam kabut mencari sesuatu\n",
    "Mengimol - Keterlaluan..Asyik..\n",
    "Mengah – Letih\n",
    "Majal – Degil\n",
    "Mata Perun - Tempat Bakau Sampah\n",
    "Menatong - Menanguk (Ddk Umh Owg Jer. Xde Keje Laen)\n",
    "Mengabong - Merepek\n",
    "Musibat - Org Salah/Tak Baek\n",
    "Mengabong - Mengarut/X Masuk Akal\n",
    "Menteneng - Kenyang Sgt\n",
    "Menabor - Berak Cair\n",
    "Membesei - Kencing\n",
    "Melebau - Tiada Hala Tuju\n",
    "Mengeket - Kering,Kurus\n",
    "Mengkal - Kembang\n",
    "Mengekek-Ngekek- Gelak Berdekah-Dekah\n",
    "Mencanak - Terhebat\n",
    "Melau - Lawak\n",
    "Menyengket - Jalan Terhenjut2\n",
    "Menaun - Lama Sgt\n",
    "Majal - Masuk Air\n",
    "Melalak - Menangis\n",
    "Moh - Jom\n",
    "Memekak - Buat Bising\n",
    "Melilau - Cari Merata2\n",
    "Menatong - Suka G Umah Jiran Jd Ahli Mesyuarat Tingkap\n",
    "Mangkau - Degil\n",
    "Membobok - Berbuih-Buih\n",
    "Menculer - Mata Yg Jegil@Terjojol\n",
    "Menyandau - Kekenyangan\n",
    "Meleju - Melulu\n",
    "Mengimul/Menyimul - Beriya2 Nk Kn Sesuatu Wktu Tu Jgak..\n",
    "Monceh - Duit Baki\n",
    "Mala'on - Maki\n",
    "Mengulau - Curi Tulang\n",
    "Moktan - Rambutan\n",
    "Meleyd0h - Keja Nk Bring/Rehat Je\n",
    "Menggelebeh - Longgau\n",
    "Madang - Selalu\n",
    "Mengakas - Tergesa2@Kelamkabut\n",
    "Mengenyam - Gatal\n",
    "Membobok - Membuak-Buak Dr Dlm Tanah\n",
    "Majal - Degil.\n",
    "Menghuntu - Sangat Penuh\n",
    "Menaon - Lama Sangat\n",
    "Muka Seposen - Muka Sedih\n",
    "Melese/Melendat - Suka Duduk Rapat2/Himpit (Sampai Org Rasa Lemas)\n",
    "Niur- Kelapa\n",
    "Nijam – Sekarang\n",
    "Nombol-Nombor\n",
    "Nyandau@Sandau=Menyandar@Sandar\n",
    "Owang - Membahasakan diri sendiri/Saya\n",
    "Ongket - Angkat\n",
    "Orang Kaya Kedaung - Org Yg Sangat Kaya\n",
    "Pagau - Pagar\n",
    "Panggil - Gi Rmh Org Kawin\n",
    "Pici-Pici - Ganbau\n",
    "Pakrak - Bodoh\n",
    "Peygang - Pegang\n",
    "Pijau - Sakit pijar/Pedih Yang Teramat\n",
    "Panas Menyenggau - Panas Sangat\n",
    "Pasau - Pasar\n",
    "Pengau/Saghal - Mereng\n",
    "Pijo - Pedas\n",
    "Polok - Sumbat Bnyk2 Masuk Mulut\n",
    "Peroi - Hancur\n",
    "Palotak Kau - Kepala Otak Kau\n",
    "Penyapu Buruk - Menyusahkan Orang\n",
    "Pareng - Separuh\n",
    "Pasar Lambak - Pasar Malam\n",
    "Pokdan - Pemarut Kelapa.\n",
    "Peran - Stor Atas Rumah\n",
    "Patah Kandau - Muflis/Kesuntukan Duit Yg Melampau\n",
    "Peloseh - Pemalas\n",
    "Pengkau - Tersalah Sasaran\n",
    "Pentad - Katil\n",
    "Penampau - Penampar\n",
    "Piuk - Periuk\n",
    "Pelantau - Pelantar\n",
    "Petas - Mercun\n",
    "Pasau Gesel - Pasar Malam\n",
    "Peruk - Longgok\n",
    "Pangkin - Anjung Rumah Kayu\n",
    "Pedehal - Tak Kesah\n",
    "Para - Tempat Letak Dulang Atau Pinggan Mangkuk\n",
    "Pepah - Bantai\n",
    "Roti Cece - Roti Jala\n",
    "Sina=Disini\n",
    "Selandas - Menggoreng Fasa Pertama\n",
    "Sakai / Jakun - Tak Pernah Buat\n",
    "Saktang - Bkas Smpn Kuih2\n",
    "Sepok - Tampar/Sepak\n",
    "Sidai - Ampai\n",
    "Sulau/Suau - Seluar\n",
    "Sojar - Askar\n",
    "Sapu Hawau - Tak Guna/Celaka\n",
    "Sesah - Belasah\n",
    "Secebih - Sedikit\n",
    "Sakau - Mencuri\n",
    "Soyok - Hujung\n",
    "Sengkuap - Beranda Tak Bertutup\n",
    "Sattang - Tin Biskut\n",
    "Segambi - Serambi\n",
    "Sekali Arong - Sekaligus\n",
    "Seghaw - Mcm Perkataan Hawau Juga\n",
    "Sempiran - Ampaian\n",
    "Seligi - Belasah\n",
    "Sengkil - Muke Yg Burok\n",
    "Seloghoh - Bergurau\n",
    "Sabau – Sabar\n",
    "Seron - Takut\n",
    "Santak – Penuh\n",
    "Sepuk - Tampar\n",
    "Seriau - Menyirap\n",
    "Segunyas - Jongang/Gigii yg kedepan\n",
    "Simpang Perenang - Tunggang Langgang\n",
    "Soyat - Koyak\n",
    "Sapan - Jahanam\n",
    "Semekin - Miskin\n",
    "Tutoh - Bantai/Bedal/Belasah/Tebang Dahan Pokok\n",
    "Terejal - Degil Sesangat\n",
    "Telinga Jampang - Telinga Pekak\n",
    "Tebau - Tebar\n",
    "Telokop - Rosak\n",
    "Tujang : Sepak\n",
    "Tersosol - Terkeluar\n",
    "Tecegat -Tecongok\n",
    "Terkiaw - Terbengkok\n",
    "Taruk - Simpan\n",
    "Tekuan - Teko\n",
    "Te,mbel - Lembab\n",
    "Tayat - Berlagak\n",
    "Tok U = Kicap\n",
    "Tenggek Air - Msk Air\n",
    "Tajo - Pancing Nk Tangkap Ikan Guan\n",
    "Tak Palau - Tak Hairan\n",
    "Tarah - Potong Sesuatu\n",
    "Tonjet - Jinjit Kaki\n",
    "Tumpang Tui - Tumpang Tuah\n",
    "Tapau - Bungkus\n",
    "Takbleh Nak Cagau - Takleh Wat Pape\n",
    "Telokop Aup - Pergi Jahanam\n",
    "Tgh Abalan - Tengah Jalan\n",
    "Tambak - Jalan\n",
    "Terbejel - Terjojol (Mata)\n",
    "Terpelengau - Melopong\n",
    "Telokop - Rosak/Lingkup\n",
    "Telokop Aup - Paling Hancur,Teruk\n",
    "Terjongkang - Jatuh Terlentang Dgn Kedua Dua Kaki Terangkat Ke Atas\n",
    "Temahak - Tamak\n",
    "Tala - Belasah\n",
    "Tutoh - Pukul\n",
    "Takdan - Tak Dapat Nak Buat Ape2 Pon.\n",
    "Teroba - Lari Dalam Rumah\n",
    "Tekyan - Sama2 Kuar Duit Utk Bayau Pape\n",
    "Tawau Hebeh - Tawar\n",
    "Tiak - Panggil/Beritahu\n",
    "Upau - Kantung Duit\n",
    "Urko - Anak Rambut Kt Tgh2 Dahi\n",
    "Waima – Walaupun\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import malaya\n",
    "\n",
    "malays = malaya.texts._malay_words._malay_words"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import re\n",
    "from unidecode import unidecode\n",
    "\n",
    "def cleaning(string):\n",
    "    string = unidecode(string).replace('.', '. ').replace(',', ' , ')\n",
    "    string = re.sub('[^\\'\"A-Za-z\\-/ ]+', ' ', string)\n",
    "    string = re.sub(r'[ ]+', ' ', string.lower()).strip()\n",
    "    return string"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "417"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "words = []\n",
    "for line in additional.split('\\n'):\n",
    "    if not len(line):\n",
    "        continue\n",
    "    c = cleaning(unidecode(line).replace('=', '-').split('-')[0]).split('/')\n",
    "    \n",
    "    words.extend([cleaning(i) for i in c])\n",
    "    \n",
    "len(words)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "286"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "words = [i for i in words if len(i) > 3]\n",
    "    \n",
    "words = set(words) - malays\n",
    "len(words)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "\n",
    "with open('melaka-words.json', 'w') as fopen:\n",
    "    json.dump(list(words), fopen)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
