Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified app/src/main/assets/data.db
Binary file not shown.
27 changes: 27 additions & 0 deletions dictionary-src/buildDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import sqlite3
import re
import sys
import json

def build_etymology(conn):
print('opening etymology.txt')
Expand Down Expand Up @@ -84,6 +85,29 @@ def build_espdic(conn):
c.close()
print('done')

def build_komputeko(conn):
print('opening komputeko_data.json')
komputeko_in = open('komputeko_data.json', 'r')

print('reading json...')
komputeko_json = json.load(komputeko_in)

c = conn.cursor()

for obj in komputeko_json["words"]:
if "eo" in obj:
eo = obj["eo"][0]["word"]
c.execute('''insert into eo values (?)''', (eo,))
eorow = c.lastrowid

if "en" in obj:
for word in obj["en"]:
enword = word["word"]
c.execute('''insert into en values (?,?,?,?)''', (eorow, enword, '', ''))

c.close()
komputeko_in.close()
print('done')

def build_transitive(conn):
print('opening transitiveco.txt')
Expand Down Expand Up @@ -136,8 +160,11 @@ def main():
create_tables(conn)

build_espdic(conn)
build_komputeko(conn)
build_etymology(conn)
build_transitive(conn)
move_files()

print("added", komputeko_counter, "komputeko words")

main()
1 change: 1 addition & 0 deletions dictionary-src/komputeko_data.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dictionary-src/resetdb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

rm data.db
touch data.db