#include <stdint.h>
#include <stdlib.h>
#include "el_runtime.h"

el_val_t lex_word(el_val_t entry);
el_val_t lex_pos(el_val_t entry);
el_val_t lex_form(el_val_t entry, el_val_t idx);
el_val_t lex_class(el_val_t entry);
el_val_t make_entry(el_val_t word, el_val_t pos, el_val_t f0, el_val_t f1, el_val_t f2, el_val_t f3, el_val_t f4, el_val_t cls);
el_val_t make_entry2(el_val_t word, el_val_t pos, el_val_t f0, el_val_t f1, el_val_t cls);
el_val_t make_entry3(el_val_t word, el_val_t pos, el_val_t f0, el_val_t f1, el_val_t f2, el_val_t cls);
el_val_t make_entry1(el_val_t word, el_val_t pos, el_val_t f0, el_val_t cls);
el_val_t build_vocab(void);
el_val_t get_vocab(void);
el_val_t vocab_lookup(el_val_t word, el_val_t lang_code);
el_val_t vocab_lookup_en(el_val_t word);
el_val_t vocab_synonym(el_val_t word, el_val_t lang_register, el_val_t lang_code);
el_val_t vocab_by_pos(el_val_t pos);
el_val_t vocab_by_class(el_val_t cls);
el_val_t entry_found(el_val_t entry);
el_val_t entry_word(el_val_t entry);
el_val_t entry_pos(el_val_t entry);
el_val_t entry_form(el_val_t entry, el_val_t n);

el_val_t lex_word(el_val_t entry) {
  return native_list_get(entry, 0);
  return 0;
}

el_val_t lex_pos(el_val_t entry) {
  return native_list_get(entry, 1);
  return 0;
}

el_val_t lex_form(el_val_t entry, el_val_t idx) {
  el_val_t n = native_list_len(entry);
  el_val_t real_idx = (idx + 2);
  if (real_idx >= n) {
    return native_list_get(entry, 0);
  }
  return native_list_get(entry, real_idx);
  return 0;
}

el_val_t lex_class(el_val_t entry) {
  el_val_t n = native_list_len(entry);
  el_val_t last = (n - 1);
  return native_list_get(entry, last);
  return 0;
}

el_val_t make_entry(el_val_t word, el_val_t pos, el_val_t f0, el_val_t f1, el_val_t f2, el_val_t f3, el_val_t f4, el_val_t cls) {
  el_val_t r = native_list_empty();
  r = native_list_append(r, word);
  r = native_list_append(r, pos);
  r = native_list_append(r, f0);
  r = native_list_append(r, f1);
  r = native_list_append(r, f2);
  r = native_list_append(r, f3);
  r = native_list_append(r, f4);
  r = native_list_append(r, cls);
  return r;
  return 0;
}

el_val_t make_entry2(el_val_t word, el_val_t pos, el_val_t f0, el_val_t f1, el_val_t cls) {
  el_val_t r = native_list_empty();
  r = native_list_append(r, word);
  r = native_list_append(r, pos);
  r = native_list_append(r, f0);
  r = native_list_append(r, f1);
  r = native_list_append(r, cls);
  return r;
  return 0;
}

el_val_t make_entry3(el_val_t word, el_val_t pos, el_val_t f0, el_val_t f1, el_val_t f2, el_val_t cls) {
  el_val_t r = native_list_empty();
  r = native_list_append(r, word);
  r = native_list_append(r, pos);
  r = native_list_append(r, f0);
  r = native_list_append(r, f1);
  r = native_list_append(r, f2);
  r = native_list_append(r, cls);
  return r;
  return 0;
}

el_val_t make_entry1(el_val_t word, el_val_t pos, el_val_t f0, el_val_t cls) {
  el_val_t r = native_list_empty();
  r = native_list_append(r, word);
  r = native_list_append(r, pos);
  r = native_list_append(r, f0);
  r = native_list_append(r, cls);
  return r;
  return 0;
}

el_val_t build_vocab(void) {
  el_val_t v = native_list_empty();
  v = native_list_append(v, make_entry3(EL_STR("I"), EL_STR("pronoun"), EL_STR("I"), EL_STR("me"), EL_STR("my"), EL_STR("person-first-sg")));
  v = native_list_append(v, make_entry3(EL_STR("you"), EL_STR("pronoun"), EL_STR("you"), EL_STR("you"), EL_STR("your"), EL_STR("person-second")));
  v = native_list_append(v, make_entry3(EL_STR("he"), EL_STR("pronoun"), EL_STR("he"), EL_STR("him"), EL_STR("his"), EL_STR("person-third-sg-m")));
  v = native_list_append(v, make_entry3(EL_STR("she"), EL_STR("pronoun"), EL_STR("she"), EL_STR("her"), EL_STR("her"), EL_STR("person-third-sg-f")));
  v = native_list_append(v, make_entry3(EL_STR("it"), EL_STR("pronoun"), EL_STR("it"), EL_STR("it"), EL_STR("its"), EL_STR("person-third-sg-n")));
  v = native_list_append(v, make_entry3(EL_STR("we"), EL_STR("pronoun"), EL_STR("we"), EL_STR("us"), EL_STR("our"), EL_STR("person-first-pl")));
  v = native_list_append(v, make_entry3(EL_STR("they"), EL_STR("pronoun"), EL_STR("they"), EL_STR("them"), EL_STR("their"), EL_STR("person-third-pl")));
  v = native_list_append(v, make_entry1(EL_STR("a"), EL_STR("determiner"), EL_STR("a"), EL_STR("indefinite")));
  v = native_list_append(v, make_entry1(EL_STR("an"), EL_STR("determiner"), EL_STR("an"), EL_STR("indefinite")));
  v = native_list_append(v, make_entry1(EL_STR("the"), EL_STR("determiner"), EL_STR("the"), EL_STR("definite")));
  v = native_list_append(v, make_entry1(EL_STR("some"), EL_STR("determiner"), EL_STR("some"), EL_STR("indefinite-pl")));
  v = native_list_append(v, make_entry1(EL_STR("this"), EL_STR("determiner"), EL_STR("this"), EL_STR("demonstrative-sg")));
  v = native_list_append(v, make_entry1(EL_STR("that"), EL_STR("determiner"), EL_STR("that"), EL_STR("demonstrative-sg")));
  v = native_list_append(v, make_entry1(EL_STR("these"), EL_STR("determiner"), EL_STR("these"), EL_STR("demonstrative-pl")));
  v = native_list_append(v, make_entry1(EL_STR("those"), EL_STR("determiner"), EL_STR("those"), EL_STR("demonstrative-pl")));
  v = native_list_append(v, make_entry1(EL_STR("in"), EL_STR("preposition"), EL_STR("in"), EL_STR("location")));
  v = native_list_append(v, make_entry1(EL_STR("on"), EL_STR("preposition"), EL_STR("on"), EL_STR("location")));
  v = native_list_append(v, make_entry1(EL_STR("at"), EL_STR("preposition"), EL_STR("at"), EL_STR("location")));
  v = native_list_append(v, make_entry1(EL_STR("to"), EL_STR("preposition"), EL_STR("to"), EL_STR("direction")));
  v = native_list_append(v, make_entry1(EL_STR("for"), EL_STR("preposition"), EL_STR("for"), EL_STR("purpose")));
  v = native_list_append(v, make_entry1(EL_STR("of"), EL_STR("preposition"), EL_STR("of"), EL_STR("relation")));
  v = native_list_append(v, make_entry1(EL_STR("with"), EL_STR("preposition"), EL_STR("with"), EL_STR("accompaniment")));
  v = native_list_append(v, make_entry1(EL_STR("from"), EL_STR("preposition"), EL_STR("from"), EL_STR("source")));
  v = native_list_append(v, make_entry1(EL_STR("by"), EL_STR("preposition"), EL_STR("by"), EL_STR("agent")));
  v = native_list_append(v, make_entry1(EL_STR("into"), EL_STR("preposition"), EL_STR("into"), EL_STR("direction")));
  v = native_list_append(v, make_entry(EL_STR("is"), EL_STR("auxiliary"), EL_STR("be"), EL_STR("is"), EL_STR("was"), EL_STR("been"), EL_STR("being"), EL_STR("copula")));
  v = native_list_append(v, make_entry(EL_STR("are"), EL_STR("auxiliary"), EL_STR("be"), EL_STR("is"), EL_STR("was"), EL_STR("been"), EL_STR("being"), EL_STR("copula")));
  v = native_list_append(v, make_entry(EL_STR("was"), EL_STR("auxiliary"), EL_STR("be"), EL_STR("is"), EL_STR("was"), EL_STR("been"), EL_STR("being"), EL_STR("copula-past")));
  v = native_list_append(v, make_entry(EL_STR("were"), EL_STR("auxiliary"), EL_STR("be"), EL_STR("is"), EL_STR("were"), EL_STR("been"), EL_STR("being"), EL_STR("copula-past")));
  v = native_list_append(v, make_entry(EL_STR("has"), EL_STR("auxiliary"), EL_STR("have"), EL_STR("has"), EL_STR("had"), EL_STR("had"), EL_STR("having"), EL_STR("perfect")));
  v = native_list_append(v, make_entry(EL_STR("have"), EL_STR("auxiliary"), EL_STR("have"), EL_STR("has"), EL_STR("had"), EL_STR("had"), EL_STR("having"), EL_STR("perfect")));
  v = native_list_append(v, make_entry(EL_STR("had"), EL_STR("auxiliary"), EL_STR("have"), EL_STR("has"), EL_STR("had"), EL_STR("had"), EL_STR("having"), EL_STR("perfect-past")));
  v = native_list_append(v, make_entry(EL_STR("will"), EL_STR("auxiliary"), EL_STR("will"), EL_STR("will"), EL_STR("would"), EL_STR("would"), EL_STR("willing"), EL_STR("future")));
  v = native_list_append(v, make_entry(EL_STR("can"), EL_STR("auxiliary"), EL_STR("can"), EL_STR("can"), EL_STR("could"), EL_STR("could"), EL_STR("canning"), EL_STR("modal")));
  v = native_list_append(v, make_entry(EL_STR("could"), EL_STR("auxiliary"), EL_STR("can"), EL_STR("can"), EL_STR("could"), EL_STR("could"), EL_STR("canning"), EL_STR("modal-past")));
  v = native_list_append(v, make_entry(EL_STR("would"), EL_STR("auxiliary"), EL_STR("will"), EL_STR("will"), EL_STR("would"), EL_STR("would"), EL_STR("willing"), EL_STR("modal-cond")));
  v = native_list_append(v, make_entry(EL_STR("do"), EL_STR("auxiliary"), EL_STR("do"), EL_STR("does"), EL_STR("did"), EL_STR("done"), EL_STR("doing"), EL_STR("do-support")));
  v = native_list_append(v, make_entry(EL_STR("does"), EL_STR("auxiliary"), EL_STR("do"), EL_STR("does"), EL_STR("did"), EL_STR("done"), EL_STR("doing"), EL_STR("do-support")));
  v = native_list_append(v, make_entry(EL_STR("did"), EL_STR("auxiliary"), EL_STR("do"), EL_STR("does"), EL_STR("did"), EL_STR("done"), EL_STR("doing"), EL_STR("do-support-past")));
  v = native_list_append(v, make_entry2(EL_STR("cat"), EL_STR("noun"), EL_STR("cat"), EL_STR("cats"), EL_STR("animal")));
  v = native_list_append(v, make_entry2(EL_STR("dog"), EL_STR("noun"), EL_STR("dog"), EL_STR("dogs"), EL_STR("animal")));
  v = native_list_append(v, make_entry2(EL_STR("bird"), EL_STR("noun"), EL_STR("bird"), EL_STR("birds"), EL_STR("animal")));
  v = native_list_append(v, make_entry2(EL_STR("fish"), EL_STR("noun"), EL_STR("fish"), EL_STR("fish"), EL_STR("animal")));
  v = native_list_append(v, make_entry2(EL_STR("horse"), EL_STR("noun"), EL_STR("horse"), EL_STR("horses"), EL_STR("animal")));
  v = native_list_append(v, make_entry2(EL_STR("house"), EL_STR("noun"), EL_STR("house"), EL_STR("houses"), EL_STR("building")));
  v = native_list_append(v, make_entry2(EL_STR("book"), EL_STR("noun"), EL_STR("book"), EL_STR("books"), EL_STR("object")));
  v = native_list_append(v, make_entry2(EL_STR("table"), EL_STR("noun"), EL_STR("table"), EL_STR("tables"), EL_STR("furniture")));
  v = native_list_append(v, make_entry2(EL_STR("chair"), EL_STR("noun"), EL_STR("chair"), EL_STR("chairs"), EL_STR("furniture")));
  v = native_list_append(v, make_entry2(EL_STR("door"), EL_STR("noun"), EL_STR("door"), EL_STR("doors"), EL_STR("structure")));
  v = native_list_append(v, make_entry2(EL_STR("window"), EL_STR("noun"), EL_STR("window"), EL_STR("windows"), EL_STR("structure")));
  v = native_list_append(v, make_entry2(EL_STR("city"), EL_STR("noun"), EL_STR("city"), EL_STR("cities"), EL_STR("place")));
  v = native_list_append(v, make_entry2(EL_STR("park"), EL_STR("noun"), EL_STR("park"), EL_STR("parks"), EL_STR("place")));
  v = native_list_append(v, make_entry2(EL_STR("school"), EL_STR("noun"), EL_STR("school"), EL_STR("schools"), EL_STR("place")));
  v = native_list_append(v, make_entry2(EL_STR("store"), EL_STR("noun"), EL_STR("store"), EL_STR("stores"), EL_STR("place")));
  v = native_list_append(v, make_entry2(EL_STR("road"), EL_STR("noun"), EL_STR("road"), EL_STR("roads"), EL_STR("place")));
  v = native_list_append(v, make_entry2(EL_STR("box"), EL_STR("noun"), EL_STR("box"), EL_STR("boxes"), EL_STR("container")));
  v = native_list_append(v, make_entry2(EL_STR("child"), EL_STR("noun"), EL_STR("child"), EL_STR("children"), EL_STR("person")));
  v = native_list_append(v, make_entry2(EL_STR("person"), EL_STR("noun"), EL_STR("person"), EL_STR("people"), EL_STR("person")));
  v = native_list_append(v, make_entry2(EL_STR("man"), EL_STR("noun"), EL_STR("man"), EL_STR("men"), EL_STR("person")));
  v = native_list_append(v, make_entry2(EL_STR("woman"), EL_STR("noun"), EL_STR("woman"), EL_STR("women"), EL_STR("person")));
  v = native_list_append(v, make_entry2(EL_STR("tree"), EL_STR("noun"), EL_STR("tree"), EL_STR("trees"), EL_STR("plant")));
  v = native_list_append(v, make_entry2(EL_STR("flower"), EL_STR("noun"), EL_STR("flower"), EL_STR("flowers"), EL_STR("plant")));
  v = native_list_append(v, make_entry2(EL_STR("water"), EL_STR("noun"), EL_STR("water"), EL_STR("waters"), EL_STR("substance")));
  v = native_list_append(v, make_entry2(EL_STR("food"), EL_STR("noun"), EL_STR("food"), EL_STR("foods"), EL_STR("substance")));
  v = native_list_append(v, make_entry2(EL_STR("time"), EL_STR("noun"), EL_STR("time"), EL_STR("times"), EL_STR("abstract")));
  v = native_list_append(v, make_entry2(EL_STR("day"), EL_STR("noun"), EL_STR("day"), EL_STR("days"), EL_STR("time")));
  v = native_list_append(v, make_entry2(EL_STR("night"), EL_STR("noun"), EL_STR("night"), EL_STR("nights"), EL_STR("time")));
  v = native_list_append(v, make_entry2(EL_STR("home"), EL_STR("noun"), EL_STR("home"), EL_STR("homes"), EL_STR("place")));
  v = native_list_append(v, make_entry(EL_STR("run"), EL_STR("verb"), EL_STR("run"), EL_STR("runs"), EL_STR("ran"), EL_STR("run"), EL_STR("running"), EL_STR("motion")));
  v = native_list_append(v, make_entry(EL_STR("walk"), EL_STR("verb"), EL_STR("walk"), EL_STR("walks"), EL_STR("walked"), EL_STR("walked"), EL_STR("walking"), EL_STR("motion")));
  v = native_list_append(v, make_entry(EL_STR("go"), EL_STR("verb"), EL_STR("go"), EL_STR("goes"), EL_STR("went"), EL_STR("gone"), EL_STR("going"), EL_STR("motion")));
  v = native_list_append(v, make_entry(EL_STR("come"), EL_STR("verb"), EL_STR("come"), EL_STR("comes"), EL_STR("came"), EL_STR("come"), EL_STR("coming"), EL_STR("motion")));
  v = native_list_append(v, make_entry(EL_STR("see"), EL_STR("verb"), EL_STR("see"), EL_STR("sees"), EL_STR("saw"), EL_STR("seen"), EL_STR("seeing"), EL_STR("perception")));
  v = native_list_append(v, make_entry(EL_STR("hear"), EL_STR("verb"), EL_STR("hear"), EL_STR("hears"), EL_STR("heard"), EL_STR("heard"), EL_STR("hearing"), EL_STR("perception")));
  v = native_list_append(v, make_entry(EL_STR("look"), EL_STR("verb"), EL_STR("look"), EL_STR("looks"), EL_STR("looked"), EL_STR("looked"), EL_STR("looking"), EL_STR("perception")));
  v = native_list_append(v, make_entry(EL_STR("eat"), EL_STR("verb"), EL_STR("eat"), EL_STR("eats"), EL_STR("ate"), EL_STR("eaten"), EL_STR("eating"), EL_STR("action")));
  v = native_list_append(v, make_entry(EL_STR("drink"), EL_STR("verb"), EL_STR("drink"), EL_STR("drinks"), EL_STR("drank"), EL_STR("drunk"), EL_STR("drinking"), EL_STR("action")));
  v = native_list_append(v, make_entry(EL_STR("sleep"), EL_STR("verb"), EL_STR("sleep"), EL_STR("sleeps"), EL_STR("slept"), EL_STR("slept"), EL_STR("sleeping"), EL_STR("state")));
  v = native_list_append(v, make_entry(EL_STR("sit"), EL_STR("verb"), EL_STR("sit"), EL_STR("sits"), EL_STR("sat"), EL_STR("sat"), EL_STR("sitting"), EL_STR("posture")));
  v = native_list_append(v, make_entry(EL_STR("stand"), EL_STR("verb"), EL_STR("stand"), EL_STR("stands"), EL_STR("stood"), EL_STR("stood"), EL_STR("standing"), EL_STR("posture")));
  v = native_list_append(v, make_entry(EL_STR("give"), EL_STR("verb"), EL_STR("give"), EL_STR("gives"), EL_STR("gave"), EL_STR("given"), EL_STR("giving"), EL_STR("transfer")));
  v = native_list_append(v, make_entry(EL_STR("take"), EL_STR("verb"), EL_STR("take"), EL_STR("takes"), EL_STR("took"), EL_STR("taken"), EL_STR("taking"), EL_STR("transfer")));
  v = native_list_append(v, make_entry(EL_STR("make"), EL_STR("verb"), EL_STR("make"), EL_STR("makes"), EL_STR("made"), EL_STR("made"), EL_STR("making"), EL_STR("creation")));
  v = native_list_append(v, make_entry(EL_STR("put"), EL_STR("verb"), EL_STR("put"), EL_STR("puts"), EL_STR("put"), EL_STR("put"), EL_STR("putting"), EL_STR("placement")));
  v = native_list_append(v, make_entry(EL_STR("find"), EL_STR("verb"), EL_STR("find"), EL_STR("finds"), EL_STR("found"), EL_STR("found"), EL_STR("finding"), EL_STR("discovery")));
  v = native_list_append(v, make_entry(EL_STR("know"), EL_STR("verb"), EL_STR("know"), EL_STR("knows"), EL_STR("knew"), EL_STR("known"), EL_STR("knowing"), EL_STR("cognition")));
  v = native_list_append(v, make_entry(EL_STR("think"), EL_STR("verb"), EL_STR("think"), EL_STR("thinks"), EL_STR("thought"), EL_STR("thought"), EL_STR("thinking"), EL_STR("cognition")));
  v = native_list_append(v, make_entry(EL_STR("say"), EL_STR("verb"), EL_STR("say"), EL_STR("says"), EL_STR("said"), EL_STR("said"), EL_STR("saying"), EL_STR("communication")));
  v = native_list_append(v, make_entry(EL_STR("tell"), EL_STR("verb"), EL_STR("tell"), EL_STR("tells"), EL_STR("told"), EL_STR("told"), EL_STR("telling"), EL_STR("communication")));
  v = native_list_append(v, make_entry(EL_STR("ask"), EL_STR("verb"), EL_STR("ask"), EL_STR("asks"), EL_STR("asked"), EL_STR("asked"), EL_STR("asking"), EL_STR("communication")));
  v = native_list_append(v, make_entry(EL_STR("like"), EL_STR("verb"), EL_STR("like"), EL_STR("likes"), EL_STR("liked"), EL_STR("liked"), EL_STR("liking"), EL_STR("emotion")));
  v = native_list_append(v, make_entry(EL_STR("love"), EL_STR("verb"), EL_STR("love"), EL_STR("loves"), EL_STR("loved"), EL_STR("loved"), EL_STR("loving"), EL_STR("emotion")));
  v = native_list_append(v, make_entry(EL_STR("want"), EL_STR("verb"), EL_STR("want"), EL_STR("wants"), EL_STR("wanted"), EL_STR("wanted"), EL_STR("wanting"), EL_STR("desire")));
  v = native_list_append(v, make_entry(EL_STR("need"), EL_STR("verb"), EL_STR("need"), EL_STR("needs"), EL_STR("needed"), EL_STR("needed"), EL_STR("needing"), EL_STR("desire")));
  v = native_list_append(v, make_entry(EL_STR("have"), EL_STR("verb"), EL_STR("have"), EL_STR("has"), EL_STR("had"), EL_STR("had"), EL_STR("having"), EL_STR("possession")));
  v = native_list_append(v, make_entry(EL_STR("hold"), EL_STR("verb"), EL_STR("hold"), EL_STR("holds"), EL_STR("held"), EL_STR("held"), EL_STR("holding"), EL_STR("possession")));
  v = native_list_append(v, make_entry(EL_STR("open"), EL_STR("verb"), EL_STR("open"), EL_STR("opens"), EL_STR("opened"), EL_STR("opened"), EL_STR("opening"), EL_STR("action")));
  v = native_list_append(v, make_entry(EL_STR("close"), EL_STR("verb"), EL_STR("close"), EL_STR("closes"), EL_STR("closed"), EL_STR("closed"), EL_STR("closing"), EL_STR("action")));
  v = native_list_append(v, make_entry(EL_STR("write"), EL_STR("verb"), EL_STR("write"), EL_STR("writes"), EL_STR("wrote"), EL_STR("written"), EL_STR("writing"), EL_STR("action")));
  v = native_list_append(v, make_entry(EL_STR("read"), EL_STR("verb"), EL_STR("read"), EL_STR("reads"), EL_STR("read"), EL_STR("read"), EL_STR("reading"), EL_STR("action")));
  v = native_list_append(v, make_entry(EL_STR("build"), EL_STR("verb"), EL_STR("build"), EL_STR("builds"), EL_STR("built"), EL_STR("built"), EL_STR("building"), EL_STR("creation")));
  v = native_list_append(v, make_entry(EL_STR("live"), EL_STR("verb"), EL_STR("live"), EL_STR("lives"), EL_STR("lived"), EL_STR("lived"), EL_STR("living"), EL_STR("state")));
  v = native_list_append(v, make_entry(EL_STR("work"), EL_STR("verb"), EL_STR("work"), EL_STR("works"), EL_STR("worked"), EL_STR("worked"), EL_STR("working"), EL_STR("activity")));
  v = native_list_append(v, make_entry(EL_STR("play"), EL_STR("verb"), EL_STR("play"), EL_STR("plays"), EL_STR("played"), EL_STR("played"), EL_STR("playing"), EL_STR("activity")));
  v = native_list_append(v, make_entry(EL_STR("help"), EL_STR("verb"), EL_STR("help"), EL_STR("helps"), EL_STR("helped"), EL_STR("helped"), EL_STR("helping"), EL_STR("activity")));
  v = native_list_append(v, make_entry1(EL_STR("big"), EL_STR("adjective"), EL_STR("big"), EL_STR("size")));
  v = native_list_append(v, make_entry1(EL_STR("small"), EL_STR("adjective"), EL_STR("small"), EL_STR("size")));
  v = native_list_append(v, make_entry1(EL_STR("large"), EL_STR("adjective"), EL_STR("large"), EL_STR("size")));
  v = native_list_append(v, make_entry1(EL_STR("little"), EL_STR("adjective"), EL_STR("little"), EL_STR("size")));
  v = native_list_append(v, make_entry1(EL_STR("old"), EL_STR("adjective"), EL_STR("old"), EL_STR("age")));
  v = native_list_append(v, make_entry1(EL_STR("new"), EL_STR("adjective"), EL_STR("new"), EL_STR("age")));
  v = native_list_append(v, make_entry1(EL_STR("young"), EL_STR("adjective"), EL_STR("young"), EL_STR("age")));
  v = native_list_append(v, make_entry1(EL_STR("good"), EL_STR("adjective"), EL_STR("good"), EL_STR("quality")));
  v = native_list_append(v, make_entry1(EL_STR("bad"), EL_STR("adjective"), EL_STR("bad"), EL_STR("quality")));
  v = native_list_append(v, make_entry1(EL_STR("fast"), EL_STR("adjective"), EL_STR("fast"), EL_STR("speed")));
  v = native_list_append(v, make_entry1(EL_STR("slow"), EL_STR("adjective"), EL_STR("slow"), EL_STR("speed")));
  v = native_list_append(v, make_entry1(EL_STR("hot"), EL_STR("adjective"), EL_STR("hot"), EL_STR("temperature")));
  v = native_list_append(v, make_entry1(EL_STR("cold"), EL_STR("adjective"), EL_STR("cold"), EL_STR("temperature")));
  v = native_list_append(v, make_entry1(EL_STR("happy"), EL_STR("adjective"), EL_STR("happy"), EL_STR("emotion")));
  v = native_list_append(v, make_entry1(EL_STR("sad"), EL_STR("adjective"), EL_STR("sad"), EL_STR("emotion")));
  v = native_list_append(v, make_entry1(EL_STR("red"), EL_STR("adjective"), EL_STR("red"), EL_STR("color")));
  v = native_list_append(v, make_entry1(EL_STR("blue"), EL_STR("adjective"), EL_STR("blue"), EL_STR("color")));
  v = native_list_append(v, make_entry1(EL_STR("green"), EL_STR("adjective"), EL_STR("green"), EL_STR("color")));
  v = native_list_append(v, make_entry1(EL_STR("white"), EL_STR("adjective"), EL_STR("white"), EL_STR("color")));
  v = native_list_append(v, make_entry1(EL_STR("black"), EL_STR("adjective"), EL_STR("black"), EL_STR("color")));
  v = native_list_append(v, make_entry1(EL_STR("long"), EL_STR("adjective"), EL_STR("long"), EL_STR("dimension")));
  v = native_list_append(v, make_entry1(EL_STR("short"), EL_STR("adjective"), EL_STR("short"), EL_STR("dimension")));
  v = native_list_append(v, make_entry1(EL_STR("beautiful"), EL_STR("adjective"), EL_STR("beautiful"), EL_STR("appearance")));
  v = native_list_append(v, make_entry1(EL_STR("bright"), EL_STR("adjective"), EL_STR("bright"), EL_STR("appearance")));
  v = native_list_append(v, make_entry1(EL_STR("dark"), EL_STR("adjective"), EL_STR("dark"), EL_STR("appearance")));
  return v;
  return 0;
}

el_val_t get_vocab(void) {
  return build_vocab();
  return 0;
}

el_val_t vocab_lookup(el_val_t word, el_val_t lang_code) {
  el_val_t vocab = get_vocab();
  el_val_t n = native_list_len(vocab);
  el_val_t i = 0;
  while (i < n) {
    el_val_t entry = native_list_get(vocab, i);
    el_val_t w = native_list_get(entry, 0);
    if (str_eq(w, word)) {
      if (!str_eq(lang_code, EL_STR(""))) {
        if (!str_eq(lang_code, EL_STR("en"))) {
          el_val_t empty = native_list_empty();
          return empty;
        }
      }
      return entry;
    }
    i = (i + 1);
  }
  el_val_t empty = native_list_empty();
  return empty;
  return 0;
}

el_val_t vocab_lookup_en(el_val_t word) {
  return vocab_lookup(word, EL_STR("en"));
  return 0;
}

el_val_t vocab_synonym(el_val_t word, el_val_t lang_register, el_val_t lang_code) {
  return word;
  return 0;
}

el_val_t vocab_by_pos(el_val_t pos) {
  el_val_t vocab = get_vocab();
  el_val_t n = native_list_len(vocab);
  el_val_t result = native_list_empty();
  el_val_t i = 0;
  while (i < n) {
    el_val_t entry = native_list_get(vocab, i);
    el_val_t p = native_list_get(entry, 1);
    if (str_eq(p, pos)) {
      result = native_list_append(result, entry);
    }
    i = (i + 1);
  }
  return result;
  return 0;
}

el_val_t vocab_by_class(el_val_t cls) {
  el_val_t vocab = get_vocab();
  el_val_t n = native_list_len(vocab);
  el_val_t result = native_list_empty();
  el_val_t i = 0;
  while (i < n) {
    el_val_t entry = native_list_get(vocab, i);
    el_val_t m = native_list_len(entry);
    el_val_t c = native_list_get(entry, (m - 1));
    if (str_eq(c, cls)) {
      result = native_list_append(result, entry);
    }
    i = (i + 1);
  }
  return result;
  return 0;
}

el_val_t entry_found(el_val_t entry) {
  el_val_t n = native_list_len(entry);
  if (n > 0) {
    return 1;
  }
  return 0;
  return 0;
}

el_val_t entry_word(el_val_t entry) {
  return native_list_get(entry, 0);
  return 0;
}

el_val_t entry_pos(el_val_t entry) {
  return native_list_get(entry, 1);
  return 0;
}

el_val_t entry_form(el_val_t entry, el_val_t n) {
  el_val_t real = (n + 2);
  el_val_t total = native_list_len(entry);
  if (real >= total) {
    return native_list_get(entry, 0);
  }
  return native_list_get(entry, real);
  return 0;
}

