though this becomes a problem if this is to be crowd-funded with data, as implied by #1 and #2. So some type of format should be considered.
i propose some super-light-weight text based system. right now i found both a prototype-based format in clauses.js and var patterns = [[Subject, Predicate],[Subject, Predicate, Adverbial, null]] in generate.js. by assuming the latter, we can encode the following...
...using the strings P, PAN and SPAN. this could be stored in a text file clauses.txt:
P # comment
PAN # here
SPAN # also
of course, this requires unique identifiers for all clauses; but the format makes authoring rules a very fast job. having comments in this format seems reasonable, so that an example sentence can be put next to a clause.
for words, we have more of a tabular layout. we could use csv here or simply json. i think json fits better, as we can add new properties and avoid affecting old records.
new Noun({ base: 'star' });
new Noun({ base: 'Donald Trump', proper: true });
new Noun({ base: 'index', plural: 'indices'});
as of now, JSON.stringify(words) simply works. adding new words could be done in a web-based interface or by editing the json file directly.
as of now, the data is defined directly in the source files
generate.js
andclauses.js
. it's not necessarily a problem if the data is provided solely from official sources. pokemon showdown for example keeps all their data in their sources.though this becomes a problem if this is to be crowd-funded with data, as implied by #1 and #2. So some type of format should be considered.
i propose some super-light-weight text based system. right now i found both a prototype-based format in
clauses.js
andvar patterns = [[Subject, Predicate],[Subject, Predicate, Adverbial, null]]
ingenerate.js
. by assuming the latter, we can encode the following......using the strings
P
,PAN
andSPAN
. this could be stored in a text fileclauses.txt
:of course, this requires unique identifiers for all clauses; but the format makes authoring rules a very fast job. having comments in this format seems reasonable, so that an example sentence can be put next to a clause.
for words, we have more of a tabular layout. we could use csv here or simply json. i think json fits better, as we can add new properties and avoid affecting old records.
as of now,
JSON.stringify(words)
simply works. adding new words could be done in a web-based interface or by editing the json file directly.of course, when reading the files we should call the respective constructor on each record.