Drop the vocabulary[] structure.
This commit is contained in:
parent
b9bfa744e1
commit
205b152301
1 changed files with 0 additions and 30 deletions
|
@ -88,12 +88,6 @@ typedef struct {{
|
||||||
const char* hint;
|
const char* hint;
|
||||||
}} hint_t;
|
}} hint_t;
|
||||||
|
|
||||||
typedef struct {{
|
|
||||||
const char* word;
|
|
||||||
const int type;
|
|
||||||
const int value;
|
|
||||||
}} vocabulary_t;
|
|
||||||
|
|
||||||
typedef struct {{
|
typedef struct {{
|
||||||
const char** words;
|
const char** words;
|
||||||
}} motion_t;
|
}} motion_t;
|
||||||
|
@ -106,7 +100,6 @@ extern const turn_threshold_t turn_thresholds[];
|
||||||
extern const obituary_t obituaries[];
|
extern const obituary_t obituaries[];
|
||||||
extern const hint_t hints[];
|
extern const hint_t hints[];
|
||||||
extern long conditions[];
|
extern long conditions[];
|
||||||
extern const vocabulary_t vocabulary[];
|
|
||||||
extern const long actspk[];
|
extern const long actspk[];
|
||||||
extern const motion_t motions[];
|
extern const motion_t motions[];
|
||||||
|
|
||||||
|
@ -117,7 +110,6 @@ extern const motion_t motions[];
|
||||||
#define NDEATHS {}
|
#define NDEATHS {}
|
||||||
#define NTHRESHOLDS {}
|
#define NTHRESHOLDS {}
|
||||||
#define NVERBS {}
|
#define NVERBS {}
|
||||||
#define NVOCAB {}
|
|
||||||
|
|
||||||
enum arbitrary_messages_refs {{
|
enum arbitrary_messages_refs {{
|
||||||
{}
|
{}
|
||||||
|
@ -178,10 +170,6 @@ long conditions[] = {{
|
||||||
{}
|
{}
|
||||||
}};
|
}};
|
||||||
|
|
||||||
const vocabulary_t vocabulary[] = {{
|
|
||||||
{}
|
|
||||||
}};
|
|
||||||
|
|
||||||
const long actspk[] = {{
|
const long actspk[] = {{
|
||||||
NO_MESSAGE,
|
NO_MESSAGE,
|
||||||
{}
|
{}
|
||||||
|
@ -409,22 +397,6 @@ def recompose(type_word, value):
|
||||||
sys.stderr.write("%s is not a known word classifier" % attrs["type"])
|
sys.stderr.write("%s is not a known word classifier" % attrs["type"])
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def get_vocabulary(vocabulary):
|
|
||||||
template = """ {{
|
|
||||||
.word = {},
|
|
||||||
.type = {},
|
|
||||||
.value = {},
|
|
||||||
}},
|
|
||||||
"""
|
|
||||||
voc_str = ""
|
|
||||||
for vocab in vocabulary:
|
|
||||||
word = make_c_string(vocab["word"])
|
|
||||||
type_code = recompose(vocab["type"], vocab["value"])
|
|
||||||
value = vocab["value"]
|
|
||||||
voc_str += template.format(word, type_code, value)
|
|
||||||
voc_str = voc_str[:-1] # trim trailing newline
|
|
||||||
return voc_str
|
|
||||||
|
|
||||||
def get_actspk(actspk):
|
def get_actspk(actspk):
|
||||||
res = ""
|
res = ""
|
||||||
for (i, word) in actspk.items():
|
for (i, word) in actspk.items():
|
||||||
|
@ -460,7 +432,6 @@ if __name__ == "__main__":
|
||||||
get_obituaries(db["obituaries"]),
|
get_obituaries(db["obituaries"]),
|
||||||
get_hints(db["hints"], db["arbitrary_messages"]),
|
get_hints(db["hints"], db["arbitrary_messages"]),
|
||||||
get_condbits(db["locations"]),
|
get_condbits(db["locations"]),
|
||||||
get_vocabulary(db["vocabulary"]),
|
|
||||||
get_actspk(db["actspk"]),
|
get_actspk(db["actspk"]),
|
||||||
get_motions(db["motions"]),
|
get_motions(db["motions"]),
|
||||||
)
|
)
|
||||||
|
@ -473,7 +444,6 @@ if __name__ == "__main__":
|
||||||
len(db["obituaries"]),
|
len(db["obituaries"]),
|
||||||
len(db["turn_thresholds"]),
|
len(db["turn_thresholds"]),
|
||||||
len(db["actspk"]),
|
len(db["actspk"]),
|
||||||
len(db["vocabulary"]),
|
|
||||||
get_refs(db["arbitrary_messages"]),
|
get_refs(db["arbitrary_messages"]),
|
||||||
get_refs(db["locations"]),
|
get_refs(db["locations"]),
|
||||||
get_refs(db["objects"]),
|
get_refs(db["objects"]),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue