Skip to content

Commit

Permalink
Don't generate imperatives for now. Generate "UNK-" terms for training.
Browse files Browse the repository at this point in the history
  • Loading branch information
apease committed Dec 27, 2024
1 parent 6b16669 commit 4c43da5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/articulate/nlp/GenSimpTestData.java
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,8 @@ public AVPair getQuantity(String term) {
*/
public String nounFormFromTerm(String term, AVPair avp, String other) {

if (term.startsWith("UNK"))
return term;
String word = kb.getTermFormat("EnglishLanguage",term);
if (word == null) {
System.out.println("nounFormFromTerm(): no term format for " + term);
Expand Down Expand Up @@ -2225,7 +2227,7 @@ public void genProc(StringBuilder english,
LFeatures lfeat) {

progressPrint();
lfeat.tense = rand.nextInt(IMPERATIVE+1) - 1;
lfeat.tense = rand.nextInt(FUTUREPROG+1) - 1;
if (lfeat.tense == IMPERATIVE && rand.nextBoolean()) {
lfeat.polite = true;
if (rand.nextBoolean())
Expand Down

0 comments on commit 4c43da5

Please sign in to comment.