mirror of
https://github.com/ganelson/inform.git
synced 2024-07-01 06:24:58 +03:00
Removed vestigial verb_id_ANNOT annotation
This commit is contained in:
parent
fd943d1f38
commit
2c10aeda6a
|
@ -1,36 +1,44 @@
|
||||||
100.0% in inform7 run
|
100.0% in inform7 run
|
||||||
66.8% in compilation to Inter
|
66.5% in compilation to Inter
|
||||||
25.3% in //Phrases::Manager::compile_first_block//
|
24.9% in //Phrases::Manager::compile_first_block//
|
||||||
9.1% in //Phrases::Manager::compile_as_needed//
|
8.8% in //Phrases::Manager::compile_as_needed//
|
||||||
6.8% in //Strings::compile_responses//
|
7.2% in //Strings::compile_responses//
|
||||||
5.9% in //World::Compile::compile//
|
6.5% in //World::Compile::compile//
|
||||||
3.6% in //Sentences::VPs::traverse//
|
3.3% in //Assertions::Traverse::traverse1//
|
||||||
3.4% in //Assertions::Traverse::traverse1//
|
3.3% in //Sentences::VPs::traverse//
|
||||||
2.0% in //Phrases::Manager::RulePrintingRule_routine//
|
2.1% in //Phrases::Manager::RulePrintingRule_routine//
|
||||||
1.9% in //Phrases::Manager::rulebooks_array//
|
1.9% in //Phrases::Manager::rulebooks_array//
|
||||||
1.1% in //NewVerbs::ConjugateVerb//
|
0.9% in //NewVerbs::ConjugateVerb//
|
||||||
0.7% in //Phrases::Manager::traverse//
|
0.8% in //Phrases::Manager::traverse//
|
||||||
0.5% in //Phrases::Manager::parse_rule_parameters//
|
0.5% in //Phrases::Manager::parse_rule_parameters//
|
||||||
0.3% in //Phrases::Manager::compile_rulebooks//
|
0.4% in //Phrases::Manager::compile_rulebooks//
|
||||||
|
0.3% in //Assertions::Traverse::traverse2//
|
||||||
0.3% in //Phrases::Manager::traverse_for_names//
|
0.3% in //Phrases::Manager::traverse_for_names//
|
||||||
0.1% in //Assertions::Traverse::traverse2//
|
0.3% in //Relations::compile_defined_relations//
|
||||||
|
0.2% in //Task::load_types//
|
||||||
|
0.2% in //World::complete//
|
||||||
|
0.1% in //Emit::begin//
|
||||||
|
0.1% in //Index::DocReferences::read_xrefs//
|
||||||
|
0.1% in //Kinds::Knowledge::include_templates_for_kinds//
|
||||||
0.1% in //PL::Parsing::Verbs::compile_all//
|
0.1% in //PL::Parsing::Verbs::compile_all//
|
||||||
0.1% in //Relations::compile_defined_relations//
|
0.1% in //Phrases::Manager::add_rules_to_rulebooks//
|
||||||
|
0.1% in //Sentences::Rearrangement::tidy_up_ofs_and_froms//
|
||||||
0.1% in //Sentences::RuleSubtrees::register_recently_lexed_phrases//
|
0.1% in //Sentences::RuleSubtrees::register_recently_lexed_phrases//
|
||||||
0.1% in //Task::load_types//
|
0.1% in //World::complete_additions//
|
||||||
0.1% in //World::complete//
|
3.0% not specifically accounted for
|
||||||
4.2% not specifically accounted for
|
|
||||||
31.0% in running Inter pipeline
|
31.0% in running Inter pipeline
|
||||||
10.0% in step preparation
|
10.6% in step preparation
|
||||||
9.7% in inter step 2/12: link
|
10.3% in inter step 2/12: link
|
||||||
7.4% in inter step 12/12: generate inform6 -> auto.inf
|
7.2% in inter step 12/12: generate inform6 -> auto.inf
|
||||||
|
0.3% in inter step 10/12: reconcile-verbs
|
||||||
0.3% in inter step 9/12: make-identifiers-unique
|
0.3% in inter step 9/12: make-identifiers-unique
|
||||||
0.1% in inter step 10/12: reconcile-verbs
|
0.2% in inter step 11/12: eliminate-redundant-labels
|
||||||
0.1% in inter step 11/12: eliminate-redundant-labels
|
0.2% in inter step 6/12: assimilate
|
||||||
|
0.2% in inter step 7/12: resolve-external-symbols
|
||||||
|
0.1% in inter step 3/12: merge-template <- none
|
||||||
|
0.1% in inter step 4/12: parse-linked-matter
|
||||||
0.1% in inter step 5/12: resolve-conditional-compilation
|
0.1% in inter step 5/12: resolve-conditional-compilation
|
||||||
0.1% in inter step 6/12: assimilate
|
|
||||||
0.1% in inter step 7/12: resolve-external-symbols
|
|
||||||
0.1% in inter step 8/12: inspect-plugs
|
0.1% in inter step 8/12: inspect-plugs
|
||||||
2.3% not specifically accounted for
|
1.1% not specifically accounted for
|
||||||
1.9% in supervisor
|
2.1% in supervisor
|
||||||
0.2% not specifically accounted for
|
0.3% not specifically accounted for
|
||||||
|
|
|
@ -504,7 +504,6 @@ tree; though it's a little like itemising the baubles on a Christmas tree.
|
||||||
@e token_to_be_parsed_against_ANNOT /* |parse_node|: what if anything is returned */
|
@e token_to_be_parsed_against_ANNOT /* |parse_node|: what if anything is returned */
|
||||||
@e turned_already_ANNOT /* |int|: aliasing like "player" to "yourself" performed already */
|
@e turned_already_ANNOT /* |int|: aliasing like "player" to "yourself" performed already */
|
||||||
@e unproven_ANNOT /* |int|: this invocation needs run-time typechecking */
|
@e unproven_ANNOT /* |int|: this invocation needs run-time typechecking */
|
||||||
@e verb_id_ANNOT /* int: identifying what kind of VERB node */
|
|
||||||
@e verb_problem_issued_ANNOT /* |int|: has a problem message about the primary verb been issued already? */
|
@e verb_problem_issued_ANNOT /* |int|: has a problem message about the primary verb been issued already? */
|
||||||
@e vu_ANNOT /* |verb_usage|: for e.g. "does not carry" */
|
@e vu_ANNOT /* |verb_usage|: for e.g. "does not carry" */
|
||||||
@e you_can_ignore_ANNOT /* |int|: for assertions now drained of meaning */
|
@e you_can_ignore_ANNOT /* |int|: for assertions now drained of meaning */
|
||||||
|
|
|
@ -97,7 +97,6 @@ int Tables::Defining::defined_by_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "The colours are defined by Table 1." */
|
switch (task) { /* "The colours are defined by Table 1." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<defined-by-sentence-object>(OW)) {
|
if (<defined-by-sentence-object>(OW)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
Annotations::write_int(V, examine_for_ofs_ANNOT, TRUE);
|
Annotations::write_int(V, examine_for_ofs_ANNOT, TRUE);
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
|
|
|
@ -95,7 +95,6 @@ int Activities::new_activity_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "Description is an activity." */
|
switch (task) { /* "Description is an activity." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<bare-activity-sentence-object>(OW)) {
|
if (<bare-activity-sentence-object>(OW)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-unparsed>(OW);
|
<np-unparsed>(OW);
|
||||||
|
|
|
@ -57,7 +57,6 @@ int Rules::Placement::listed_in_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "The time passes rule is listed in the turn sequence rulebook." */
|
switch (task) { /* "The time passes rule is listed in the turn sequence rulebook." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if ((<nounphrase-rule-list>(SW)) && (<listed-in-sentence-object>(OW))) {
|
if ((<nounphrase-rule-list>(SW)) && (<listed-in-sentence-object>(OW))) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
Annotations::write_int(V, listing_sense_ANNOT, <<r>>);
|
Annotations::write_int(V, listing_sense_ANNOT, <<r>>);
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
|
@ -108,7 +107,6 @@ int Rules::Placement::substitutes_for_SMF(int task, parse_node *V, wording *NPs)
|
||||||
switch (task) { /* "The time passes slowly rule substitutes for the time passes rule." */
|
switch (task) { /* "The time passes slowly rule substitutes for the time passes rule." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if ((<nounphrase-rule-list>(SW)) && (<substitutes-for-sentence-object>(OW))) {
|
if ((<nounphrase-rule-list>(SW)) && (<substitutes-for-sentence-object>(OW))) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
Annotations::write_int(V, listing_sense_ANNOT, <<r>>);
|
Annotations::write_int(V, listing_sense_ANNOT, <<r>>);
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
|
@ -193,7 +191,6 @@ int Rules::Placement::does_nothing_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "The time passes rule does nothing." */
|
switch (task) { /* "The time passes rule does nothing." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if ((<nounphrase-rule-list>(SW)) && (<does-nothing-sentence-object>(OW))) {
|
if ((<nounphrase-rule-list>(SW)) && (<does-nothing-sentence-object>(OW))) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
|
@ -216,7 +213,6 @@ int Rules::Placement::does_nothing_if_SMF(int task, parse_node *V, wording *NPs)
|
||||||
switch (task) { /* "The time passes rule does nothing if ..." */
|
switch (task) { /* "The time passes rule does nothing if ..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if ((<nounphrase-rule-list>(SW)) && (<does-nothing-sentence-object>(OW))) {
|
if ((<nounphrase-rule-list>(SW)) && (<does-nothing-sentence-object>(OW))) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-unparsed>(CW);
|
<np-unparsed>(CW);
|
||||||
|
@ -240,7 +236,6 @@ int Rules::Placement::does_nothing_unless_SMF(int task, parse_node *V, wording *
|
||||||
switch (task) { /* "The time passes rule does nothing unless ..." */
|
switch (task) { /* "The time passes rule does nothing unless ..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if ((<nounphrase-rule-list>(SW)) && (<does-nothing-sentence-object>(OW))) {
|
if ((<nounphrase-rule-list>(SW)) && (<does-nothing-sentence-object>(OW))) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-unparsed>(CW);
|
<np-unparsed>(CW);
|
||||||
|
|
|
@ -238,7 +238,7 @@ void Phrases::Manager::visit_to_parse_placements(parse_node *p) {
|
||||||
(Node::get_type(p->down) == VERB_NT)) {
|
(Node::get_type(p->down) == VERB_NT)) {
|
||||||
prevailing_mood =
|
prevailing_mood =
|
||||||
Annotations::read_int(p->down, verbal_certainty_ANNOT);
|
Annotations::read_int(p->down, verbal_certainty_ANNOT);
|
||||||
if (Annotations::read_int(p->down, verb_id_ANNOT) == SPECIAL_MEANING_VB)
|
if (Sentences::VPs::special(p->down))
|
||||||
Assertions::Traverse::try_special_meaning(TRAVERSE_FOR_RULE_FILING_SMFT, p->down);
|
Assertions::Traverse::try_special_meaning(TRAVERSE_FOR_RULE_FILING_SMFT, p->down);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,6 @@ int PL::Parsing::TestScripts::test_with_SMF(int task, parse_node *V, wording *NP
|
||||||
wording O2W = (NPs)?(NPs[2]):EMPTY_WORDING;
|
wording O2W = (NPs)?(NPs[2]):EMPTY_WORDING;
|
||||||
switch (task) { /* "Test me with..." */
|
switch (task) { /* "Test me with..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-unparsed>(O2W);
|
<np-unparsed>(O2W);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-unparsed>(OW);
|
<np-unparsed>(OW);
|
||||||
|
|
|
@ -71,7 +71,6 @@ int UseOptions::use_translates_as_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "Use American dialect means ..." */
|
switch (task) { /* "Use American dialect means ..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<use-translates-as-sentence-subject>(SW)) {
|
if (<use-translates-as-sentence-subject>(SW)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-unparsed>(OW);
|
<np-unparsed>(OW);
|
||||||
V->next->next = <<rp>>;
|
V->next->next = <<rp>>;
|
||||||
|
@ -208,7 +207,6 @@ int UseOptions::use_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
||||||
switch (task) { /* "Use American dialect." */
|
switch (task) { /* "Use American dialect." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-articled-list>(OW);
|
<np-articled-list>(OW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -25,7 +25,6 @@ int Plurals::plural_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
FSW = SW; FOW = OW;
|
FSW = SW; FOW = OW;
|
||||||
if (<plural-sentence-subject>(SW)) {
|
if (<plural-sentence-subject>(SW)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-unparsed>(OW);
|
<np-unparsed>(OW);
|
||||||
V->next->next = <<rp>>;
|
V->next->next = <<rp>>;
|
||||||
|
|
|
@ -2340,7 +2340,6 @@ int LiteralPatterns::specifies_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
if (<np-unparsed>(OW)) {
|
if (<np-unparsed>(OW)) {
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
V->next = S; V->next->next = O;
|
V->next = S; V->next->next = O;
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -247,7 +247,6 @@ int NewVerbs::new_verb_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<new-verb-sentence-object>(OW)) {
|
if (<new-verb-sentence-object>(OW)) {
|
||||||
if (<<r>> == FALSE) return FALSE;
|
if (<<r>> == FALSE) return FALSE;
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
|
@ -280,7 +279,6 @@ int NewVerbs::verb_means_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<verb-means-sentence-subject>(SW)) {
|
if (<verb-means-sentence-subject>(SW)) {
|
||||||
int imperative_flag = <<r>>;
|
int imperative_flag = <<r>>;
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-articled>(OW);
|
<np-articled>(OW);
|
||||||
V->next->next = <<rp>>;
|
V->next->next = <<rp>>;
|
||||||
|
@ -1134,7 +1132,6 @@ int NewVerbs::new_adjective_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "In French petit is an adjective meaning..." */
|
switch (task) { /* "In French petit is an adjective meaning..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<new-adjective-sentence-object>(OW)) {
|
if (<new-adjective-sentence-object>(OW)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
if (O == NULL) { <np-unparsed>(OW); O = <<rp>>; }
|
if (O == NULL) { <np-unparsed>(OW); O = <<rp>>; }
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
|
|
|
@ -106,7 +106,6 @@ int Relations::new_relation_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "Knowledge relates various people to various things." */
|
switch (task) { /* "Knowledge relates various people to various things." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<new-relation-sentence-object>(OW)) {
|
if (<new-relation-sentence-object>(OW)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
|
|
|
@ -130,6 +130,12 @@ void Sentences::VPs::visit(parse_node *p) {
|
||||||
"instructions.");
|
"instructions.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ =
|
||||||
|
int Sentences::VPs::special(parse_node *p) {
|
||||||
|
if (Node::get_special_meaning(p)) return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
@ To break up an individual sentence into noun phrases and a verb phrase
|
@ To break up an individual sentence into noun phrases and a verb phrase
|
||||||
is quite simple: we feed it to the <nonstructural-sentence> grammar,
|
is quite simple: we feed it to the <nonstructural-sentence> grammar,
|
||||||
and if that doesn't work, we feed it to <bad-nonstructural-sentence-diagnosis>
|
and if that doesn't work, we feed it to <bad-nonstructural-sentence-diagnosis>
|
||||||
|
@ -161,7 +167,6 @@ int Sentences::VPs::include_in_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "Index map with ..." */
|
switch (task) { /* "Index map with ..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<the-debugging-log>(OW)) {
|
if (<the-debugging-log>(OW)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-articled-list>(O2W);
|
<np-articled-list>(O2W);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
Sentences::VPs::switch_dl_mode(V->next, TRUE);
|
Sentences::VPs::switch_dl_mode(V->next, TRUE);
|
||||||
|
@ -178,7 +183,6 @@ int Sentences::VPs::omit_from_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "Index map with ..." */
|
switch (task) { /* "Index map with ..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<the-debugging-log>(OW)) {
|
if (<the-debugging-log>(OW)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-articled-list>(O2W);
|
<np-articled-list>(O2W);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
Sentences::VPs::switch_dl_mode(V->next, FALSE);
|
Sentences::VPs::switch_dl_mode(V->next, FALSE);
|
||||||
|
@ -324,8 +328,6 @@ action declarations continue with usually extensive further text:
|
||||||
parse_node *VP_PN = RP[1];
|
parse_node *VP_PN = RP[1];
|
||||||
if (Annotations::read_int(VP_PN, linguistic_error_here_ANNOT) == TwoLikelihoods_LINERROR)
|
if (Annotations::read_int(VP_PN, linguistic_error_here_ANNOT) == TwoLikelihoods_LINERROR)
|
||||||
@<Issue two likelihoods problem@>;
|
@<Issue two likelihoods problem@>;
|
||||||
if (Annotations::read_int(VP_PN, verb_id_ANNOT) == 0)
|
|
||||||
Annotations::write_int(VP_PN, verb_id_ANNOT, ASSERT_VB);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), VP_PN, nss_tree_head);
|
SyntaxTree::graft(Task::syntax_tree(), VP_PN, nss_tree_head);
|
||||||
|
|
||||||
if (SyntaxTree::is_trace_set(Task::syntax_tree())) {
|
if (SyntaxTree::is_trace_set(Task::syntax_tree())) {
|
||||||
|
@ -352,38 +354,6 @@ object noun phrase.
|
||||||
PROPER_NOUN_NT "Railway Departure"
|
PROPER_NOUN_NT "Railway Departure"
|
||||||
PROPER_NOUN_NT "the player is in the train"
|
PROPER_NOUN_NT "the player is in the train"
|
||||||
=
|
=
|
||||||
This is made by |Sentences::VPs::nss_tree2|, but there are variants for one noun phrase or three.
|
|
||||||
|
|
||||||
=
|
|
||||||
int Sentences::VPs::nss_tree1(int t, wording VW, parse_node *np1) {
|
|
||||||
parse_node *VP_PN = Node::new(VERB_NT);
|
|
||||||
Node::set_text(VP_PN, VW);
|
|
||||||
Annotations::write_int(VP_PN, verb_id_ANNOT, t);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), VP_PN, nss_tree_head);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), np1, nss_tree_head);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Sentences::VPs::nss_tree2(int t, wording VW, parse_node *np1, parse_node *np2) {
|
|
||||||
parse_node *VP_PN = Node::new(VERB_NT);
|
|
||||||
Node::set_text(VP_PN, VW);
|
|
||||||
Annotations::write_int(VP_PN, verb_id_ANNOT, t);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), VP_PN, nss_tree_head);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), np1, nss_tree_head);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), np2, nss_tree_head);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Sentences::VPs::nss_tree3(int t, wording VW, parse_node *np1, parse_node *np2, parse_node *np3) {
|
|
||||||
parse_node *VP_PN = Node::new(VERB_NT);
|
|
||||||
Node::set_text(VP_PN, VW);
|
|
||||||
Annotations::write_int(VP_PN, verb_id_ANNOT, t);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), VP_PN, nss_tree_head);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), np1, nss_tree_head);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), np2, nss_tree_head);
|
|
||||||
SyntaxTree::graft(Task::syntax_tree(), np3, nss_tree_head);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ In the assertion parser, any text at all can be a noun phrase. However,
|
@ In the assertion parser, any text at all can be a noun phrase. However,
|
||||||
to disambiguate sentences we sometimes want to insist that it takes a
|
to disambiguate sentences we sometimes want to insist that it takes a
|
||||||
|
@ -436,7 +406,6 @@ int Sentences::VPs::translates_into_unicode_as_SMF(int task, parse_node *V, word
|
||||||
switch (task) { /* "Black king chess piece translates into Unicode as 9818" */
|
switch (task) { /* "Black king chess piece translates into Unicode as 9818" */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<translation-target-unicode>(O2W)) {
|
if (<translation-target-unicode>(O2W)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-articled>(SW);
|
<np-articled>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-articled>(OW);
|
<np-articled>(OW);
|
||||||
|
@ -458,7 +427,6 @@ int Sentences::VPs::translates_into_I6_as_SMF(int task, parse_node *V, wording *
|
||||||
switch (task) { /* "Black king chess piece translates into Unicode as 9818" */
|
switch (task) { /* "Black king chess piece translates into Unicode as 9818" */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<translation-target-i6>(O2W)) {
|
if (<translation-target-i6>(O2W)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-articled>(SW);
|
<np-articled>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-articled>(OW);
|
<np-articled>(OW);
|
||||||
|
@ -481,7 +449,6 @@ int Sentences::VPs::translates_into_language_as_SMF(int task, parse_node *V, wor
|
||||||
switch (task) { /* "Black king chess piece translates into Unicode as 9818" */
|
switch (task) { /* "Black king chess piece translates into Unicode as 9818" */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<translation-target-language>(O2W)) {
|
if (<translation-target-language>(O2W)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
inform_language *nl = (inform_language *) (<<rp>>);
|
inform_language *nl = (inform_language *) (<<rp>>);
|
||||||
<np-articled>(SW);
|
<np-articled>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
|
|
|
@ -141,7 +141,7 @@ We therefore look for this subtree structure:
|
||||||
the new property.
|
the new property.
|
||||||
|
|
||||||
@<See if this assertion creates property names with "... has ... called ..."@> =
|
@<See if this assertion creates property names with "... has ... called ..."@> =
|
||||||
if ((Annotations::read_int(pn, verb_id_ANNOT) == ASSERT_VB)
|
if ((Sentences::VPs::special(pn) == FALSE)
|
||||||
&& (pn->next)
|
&& (pn->next)
|
||||||
&& (pn->next->next)
|
&& (pn->next->next)
|
||||||
&& (Assertions::Copular::possessive(pn->next->next))
|
&& (Assertions::Copular::possessive(pn->next->next))
|
||||||
|
@ -279,8 +279,8 @@ wastes only a negligible amount of memory.
|
||||||
void Sentences::Rearrangement::traverse_for_nonbreaking_ofs(parse_node *pn) {
|
void Sentences::Rearrangement::traverse_for_nonbreaking_ofs(parse_node *pn) {
|
||||||
if ((Node::get_type(pn) == SENTENCE_NT) &&
|
if ((Node::get_type(pn) == SENTENCE_NT) &&
|
||||||
(pn->down) && (Node::get_type(pn->down) == VERB_NT)) {
|
(pn->down) && (Node::get_type(pn->down) == VERB_NT)) {
|
||||||
int vn = Annotations::read_int(pn->down, verb_id_ANNOT);
|
int vn = Sentences::VPs::special(pn->down);
|
||||||
if (((vn == ASSERT_VB) || (Annotations::read_int(pn->down, examine_for_ofs_ANNOT))) &&
|
if (((vn == FALSE) || (Annotations::read_int(pn->down, examine_for_ofs_ANNOT))) &&
|
||||||
(<sentence-needing-second-look>(Node::get_text(pn)))) {
|
(<sentence-needing-second-look>(Node::get_text(pn)))) {
|
||||||
current_sentence = pn; /* (just in case any problem messages are issued) */
|
current_sentence = pn; /* (just in case any problem messages are issued) */
|
||||||
pn->down = NULL; /* thus cutting off and forgetting its former subtree */
|
pn->down = NULL; /* thus cutting off and forgetting its former subtree */
|
||||||
|
|
|
@ -203,7 +203,6 @@ void ParseTreeUsage::write_permissions(void) {
|
||||||
Annotations::allow(ADJECTIVE_NT, negated_boolean_ANNOT);
|
Annotations::allow(ADJECTIVE_NT, negated_boolean_ANNOT);
|
||||||
Annotations::allow(ADJECTIVE_NT, article_ANNOT);
|
Annotations::allow(ADJECTIVE_NT, article_ANNOT);
|
||||||
Annotations::allow(VERB_NT, log_inclusion_sense_ANNOT);
|
Annotations::allow(VERB_NT, log_inclusion_sense_ANNOT);
|
||||||
Annotations::allow(VERB_NT, verb_id_ANNOT);
|
|
||||||
Annotations::allow(VERB_NT, imperative_ANNOT);
|
Annotations::allow(VERB_NT, imperative_ANNOT);
|
||||||
Annotations::allow(VERB_NT, examine_for_ofs_ANNOT);
|
Annotations::allow(VERB_NT, examine_for_ofs_ANNOT);
|
||||||
Annotations::allow(VERB_NT, listing_sense_ANNOT);
|
Annotations::allow(VERB_NT, listing_sense_ANNOT);
|
||||||
|
@ -455,9 +454,6 @@ void ParseTreeUsage::log_node(OUTPUT_STREAM, parse_node *pn) {
|
||||||
WRITE(" (x%d)", Annotations::read_int(pn, multiplicity_ANNOT));
|
WRITE(" (x%d)", Annotations::read_int(pn, multiplicity_ANNOT));
|
||||||
show_refers = TRUE;
|
show_refers = TRUE;
|
||||||
break;
|
break;
|
||||||
case VERB_NT:
|
|
||||||
WRITE(" ($V)", Annotations::read_int(pn, verb_id_ANNOT));
|
|
||||||
break;
|
|
||||||
case TOKEN_NT: WRITE(" [%d/%d]", Annotations::read_int(pn, slash_class_ANNOT),
|
case TOKEN_NT: WRITE(" [%d/%d]", Annotations::read_int(pn, slash_class_ANNOT),
|
||||||
Annotations::read_int(pn, slash_dash_dash_ANNOT)); break;
|
Annotations::read_int(pn, slash_dash_dash_ANNOT)); break;
|
||||||
case INVOCATION_LIST_NT:
|
case INVOCATION_LIST_NT:
|
||||||
|
|
|
@ -317,7 +317,6 @@ void Assertions::Assemblies::satisfies_generalisation(inference_subject *infs, g
|
||||||
|
|
||||||
/* make the new sentence an assertion: */
|
/* make the new sentence an assertion: */
|
||||||
new_sentence->down = Node::new(VERB_NT);
|
new_sentence->down = Node::new(VERB_NT);
|
||||||
Annotations::write_int(new_sentence->down, verb_id_ANNOT, ASSERT_VB);
|
|
||||||
new_sentence->down->next = Node::new(CREATED_NT);
|
new_sentence->down->next = Node::new(CREATED_NT);
|
||||||
Node::copy_subtree(g->look_for, new_sentence->down->next, 0);
|
Node::copy_subtree(g->look_for, new_sentence->down->next, 0);
|
||||||
new_sentence->down->next->next = Node::new(CREATED_NT);
|
new_sentence->down->next->next = Node::new(CREATED_NT);
|
||||||
|
|
|
@ -21,7 +21,6 @@ int Assertions::Property::either_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "A room is either dark or lighted." */
|
switch (task) { /* "A room is either dark or lighted." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<either-sentence-object>(OW)) {
|
if (<either-sentence-object>(OW)) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
|
@ -42,7 +41,6 @@ int Assertions::Property::optional_either_SMF(int task, parse_node *V, wording *
|
||||||
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
||||||
switch (task) { /* "A room can be dark or lighted." */
|
switch (task) { /* "A room can be dark or lighted." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-unparsed>(OW);
|
<np-unparsed>(OW);
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
|
|
|
@ -295,9 +295,11 @@ a valid verb number to have no handler: if so, we handle the verb by doing
|
||||||
nothing on either traverse, of course.
|
nothing on either traverse, of course.
|
||||||
|
|
||||||
@<Act on the primary verb in the sentence@> =
|
@<Act on the primary verb in the sentence@> =
|
||||||
int vn = Annotations::read_int(p->down, verb_id_ANNOT);
|
int vn = ASSERT_VB;
|
||||||
|
if (Sentences::VPs::special(p->down)) vn = SPECIAL_MEANING_VB;
|
||||||
|
|
||||||
if ((vn < 0) || (vn >= MAX_OF_NTS_AND_VBS)) {
|
if ((vn < 0) || (vn >= MAX_OF_NTS_AND_VBS)) {
|
||||||
LOG("Unimplemented verb %d\n", Annotations::read_int(p->down, verb_id_ANNOT));
|
LOG("Unimplemented verb\n");
|
||||||
internal_error_on_node_type(p->down);
|
internal_error_on_node_type(p->down);
|
||||||
}
|
}
|
||||||
if (how_to_handle_sentences[vn]) {
|
if (how_to_handle_sentences[vn]) {
|
||||||
|
@ -544,7 +546,7 @@ void Assertions::Traverse::special_meaning(parse_node *pn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Assertions::Traverse::try_special_meaning(int task, parse_node *pn) {
|
void Assertions::Traverse::try_special_meaning(int task, parse_node *pn) {
|
||||||
if (Annotations::read_int(pn, verb_id_ANNOT) == SPECIAL_MEANING_VB) {
|
if (Sentences::VPs::special(pn)) {
|
||||||
special_meaning_holder *sm = Node::get_special_meaning(pn);
|
special_meaning_holder *sm = Node::get_special_meaning(pn);
|
||||||
if (sm) SpecialMeanings::call(sm, task, pn, NULL);
|
if (sm) SpecialMeanings::call(sm, task, pn, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,6 @@ int PL::Bibliographic::episode_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "The story is episode 2 of ..." */
|
switch (task) { /* "The story is episode 2 of ..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if ((<episode-sentence-subject>(SW)) && (<episode-sentence-object>(OW))) {
|
if ((<episode-sentence-subject>(SW)) && (<episode-sentence-object>(OW))) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
if (<<r>> >= 0) {
|
if (<<r>> >= 0) {
|
||||||
episode_number = <<r>>;
|
episode_number = <<r>>;
|
||||||
Word::dequote(<<series>>);
|
Word::dequote(<<series>>);
|
||||||
|
|
|
@ -108,7 +108,6 @@ int PL::Bibliographic::Release::release_along_with_SMF(int task, parse_node *V,
|
||||||
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
||||||
switch (task) { /* "Use American dialect." */
|
switch (task) { /* "Use American dialect." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-articled-list>(OW);
|
<np-articled-list>(OW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -308,7 +308,6 @@ int PL::EPSMap::index_map_with_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
||||||
switch (task) { /* "Index map with ..." */
|
switch (task) { /* "Index map with ..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-articled-list>(OW);
|
<np-articled-list>(OW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -298,7 +298,6 @@ int PL::Scenes::begins_when_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
|
||||||
switch (task) { /* "The Ballroom Scene begins when..." */
|
switch (task) { /* "The Ballroom Scene begins when..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-unparsed>(OW);
|
<np-unparsed>(OW);
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
|
@ -325,7 +324,6 @@ int PL::Scenes::ends_when_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
wording O2W = (NPs)?(NPs[2]):EMPTY_WORDING;
|
wording O2W = (NPs)?(NPs[2]):EMPTY_WORDING;
|
||||||
switch (task) { /* "The Ballroom Scene ends when..." */
|
switch (task) { /* "The Ballroom Scene ends when..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-unparsed>(OW);
|
<np-unparsed>(OW);
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
|
|
|
@ -730,7 +730,6 @@ int PL::Actions::new_action_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if (<new-action-sentence-object>(OW)) {
|
if (<new-action-sentence-object>(OW)) {
|
||||||
if (<<r>> == FALSE) return FALSE;
|
if (<<r>> == FALSE) return FALSE;
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
|
|
|
@ -57,7 +57,6 @@ int PL::Parsing::understand_as_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
wording O2W = (NPs)?(NPs[2]):EMPTY_WORDING;
|
wording O2W = (NPs)?(NPs[2]):EMPTY_WORDING;
|
||||||
switch (task) { /* "Understand... as..." */
|
switch (task) { /* "Understand... as..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
<np-unparsed>(O2W);
|
<np-unparsed>(O2W);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
<np-unparsed>(OW);
|
<np-unparsed>(OW);
|
||||||
|
|
|
@ -136,7 +136,6 @@ int PL::Files::new_file_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "File... is the file..." */
|
switch (task) { /* "File... is the file..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if ((<nounphrase-external-file>(SW)) && (<new-file-sentence-object>(OW))) {
|
if ((<nounphrase-external-file>(SW)) && (<new-file-sentence-object>(OW))) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
|
|
|
@ -89,7 +89,6 @@ int PL::Figures::new_figure_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "Figure... is the file..." */
|
switch (task) { /* "Figure... is the file..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if ((<nounphrase-figure>(SW)) && (<new-figure-sentence-object>(OW))) {
|
if ((<nounphrase-figure>(SW)) && (<new-figure-sentence-object>(OW))) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
|
|
|
@ -81,7 +81,6 @@ int PL::Sounds::new_sound_SMF(int task, parse_node *V, wording *NPs) {
|
||||||
switch (task) { /* "Sound... is the file..." */
|
switch (task) { /* "Sound... is the file..." */
|
||||||
case ACCEPT_SMFT:
|
case ACCEPT_SMFT:
|
||||||
if ((<nounphrase-sound>(SW)) && (<new-sound-sentence-object>(OW))) {
|
if ((<nounphrase-sound>(SW)) && (<new-sound-sentence-object>(OW))) {
|
||||||
Annotations::write_int(V, verb_id_ANNOT, SPECIAL_MEANING_VB);
|
|
||||||
parse_node *O = <<rp>>;
|
parse_node *O = <<rp>>;
|
||||||
<np-unparsed>(SW);
|
<np-unparsed>(SW);
|
||||||
V->next = <<rp>>;
|
V->next = <<rp>>;
|
||||||
|
|
Loading…
Reference in a new issue