Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistency check: syntax and morphology #15

Open
jonathanrobie opened this issue Apr 2, 2022 · 12 comments
Open

Consistency check: syntax and morphology #15

jonathanrobie opened this issue Apr 2, 2022 · 12 comments
Assignees

Comments

@jonathanrobie
Copy link
Contributor

This is more of an epic than an individual issue.

When merging existing syntax trees with morphology, we have probably created instances where the morphological interpretation does not agree with the syntactic interpretation. We need to do a survey of instances where the OSHB morphological interpretation disagrees with the interpretation used to build the original Groves trees by comparing the two morphologies. Most of these differences will probably fall into categories that we can enumerate. This will include both differences in interpretation and clear bugs.

This task involves:

  1. Comparing morphologies and creating a list of differences
  2. As far as possible, automatically categorizing these differences into categories
  3. Creating a representation of these differences that is easy for a Hebrew expert to assess efficiently and make decisions.
@jonathanrobie
Copy link
Contributor Author

We can also use the @rule attributes to identify possible discrepancies with the morphology.

@rkjtan
Copy link
Contributor

rkjtan commented Apr 2, 2022

Note that the categories used in the Westminster Hebrew Syntax are divided up differently than the Westminster Hebrew Morph. If you look at A Reference Guide to the Westminster Hebrew Morphology Database Document Release 4.20 (which is the version the Westminster Hebrew Syntax was built upon), there are only six categories: particle, pronoun, noun, adjective or numeral, verb, and suffixes. Definite article, object marker, conjunction, adverb, interjection, preposition, and relative particles belong within the category of particle. In the trees, these types have been separated out. Likewise, numerals have been separated out from adjectives. These differences account for the trees having 14 Cat vs. 6 categories in the Westminster morph originally.

Here's a list of the 14 Cat in the trees & how they correspond to the OSHB morph categories:
adj (maps directly to OSHB adj)
adv (maps directly to OSHB adv)
om (maps to OSHB ptcl & particle type direct object marker)
cj (maps directly to OSHB conj)
art (maps to OSHB ptcl & particle type definite article)
ij (maps to OSHB ptcl & particle type interjection)
rel (maps to OSHB ptcl & particle type relative)
noun (maps directly to OSHB noun)
ptcl (maps directly to OSHB ptcl)
prep (maps directly to OSHB prep)
pron (maps directly to OSHB pron)
verb (maps directly to OSHB verb)
num (maps to OSHB adj & 2 adjectives types of Cardinal & Ordinal numbers)
x (maps directly to OSHB sfx)

Be sure to look at my comments in https://github.com/Clear-Bible/macula-hebrew/tree/main/doc about the kind of systematic & frequent inconsistencies & mismatches I initially expect to see.

@klosoter klosoter self-assigned this Apr 5, 2022
@klosoter
Copy link
Contributor

klosoter commented Apr 5, 2022

Just checking, these are the mismatches/inconsistencies you are looking for?

Screenshot 2022-04-05 at 12 27 30

Or are we also looking at other attributes/features?

@klosoter
Copy link
Contributor

klosoter commented Apr 5, 2022

See here for a more insightful (but less readable) table. The index column consists of the OSHB "pos" and "type" attributed, joined by "_". It seems that there are a lot of exceptions and mismatches. Only "x" and "suffix" match perfectly.

Would it help if I:

  • created a list of word ids for each combination of OSHB & Trees?
  • find a way to categorize them further (using "rule", perhaps?)

cross_mapping.xlsx

@jonathanrobie
Copy link
Contributor Author

jonathanrobie commented Apr 5, 2022 via email

@jonathanrobie
Copy link
Contributor Author

jonathanrobie commented Apr 5, 2022 via email

@rkjtan
Copy link
Contributor

rkjtan commented Apr 5, 2022

Both of these are useful. Thank you, @klosoter. I agree with Jonathan's comments above. The volume of mismatches is higher than I'd like, but most of them don't surprise me at first glance. We'll want to curate these efficiently.

@klosoter
Copy link
Contributor

klosoter commented Apr 6, 2022

I categorized them further using the "Rule" attribute of the first parent node. Now, the differences are neatly categorized. Most combinations of "pos_rule_type" match exactly ONE "Cat". At first glance, the differences seem more logical now. See attached.

pos-rule-type.xlsx

@klosoter
Copy link
Contributor

klosoter commented Apr 6, 2022

I've also put all mismatches in an XML file. They are structured like this:

Cat --> oshb pos --> oshb type --> Tree Node --> oshb m element (or c in case of compounds)

<mismatches>
  <adj>
    <pronoun>
      <demonstrative>
        <Node n="370010020072" Cat="adj" morphId="370010020072" Unicode="זֶּה֙" nodeId="3700100200720010" Rule="Adj2Adjp">
          <m n="370010020072" morph="Pdxms" lang="H" lemma="2088" after=" " pos="pronoun" type="demonstrative" person="unknown: x" gender="masculine" number="singular">זֶּה֙</m>
        </Node>
        <Node>
          <c>
            <m/>
            <m/>
          </c>
        </Node>
      </demonstrative>
    </pronoun>
  </adj>
  <adv>
    <particle>
      <negative/>
    </particle>
  </adv>
</mismatches>

Does something like this help drill down to instances? The XML file is too large to attach here, but you get the idea.

@klosoter
Copy link
Contributor

klosoter commented Apr 6, 2022

The other features, such as number, gender, and person, are not present in the current trees. They are in the trees-groves-full under /trees-oshb but I can't seem to figure out an easy way to map these two trees to each other. The morphId's and the nodeId's are different.

Is there an easy way to map the full attributes to the OSHB attributes that I overlooked?

@jonathanrobie
Copy link
Contributor Author

The morphId's and the nodeId's are different.

Is there an easy way to map the full attributes to the OSHB attributes that I overlooked?

I think we need the mapping between Groves morphIds and our own added to the mapping file to do this comparison.

@klosoter
Copy link
Contributor

klosoter commented Apr 19, 2022

I've created new mappings, which can be found in trees-oshb/py/mappings. Please see that same folder for documentation of the mismatches in part of speech between the trees and OSHB along with an explaining note. (this might need to be moved to a different directory/repo).

The new mappings can now be used to compare the grammatical categories between the Full Trees and OSHB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants