digling / edictor

JavaScript program for interactive viewing, manipulating, and editing of wordlists, represented in form of TSV files.
MIT License
6 stars 2 forks source link

allow to edit patterns via custom identifiers when editing alignments #128

Closed LinguList closed 6 years ago

LinguList commented 6 years ago

Patterns, i.e., correspondence patterns, can either be inferred automatically from alignments, or assigned as such by the users. I imagine a simple straightforward system in which the user adds or corrects a given pattern attached to an alignment. At the same time, a pattern browser would allow users to search through all patterns which are assigned the same ID for a given alignment site.

so, two alignments (cogid 1 and 2) like the following ones:

language s1 s2 s3
languageA p a t
languageB f a t
languageC h a -
pattern p1 a1 t1
language s1 s2 s3
languageA p a t
languageB f a t
languageD pf a d
pattern p1 a1 t1

will then be rendered ihn the patterns as:

pattern cogid position languageA languageB languageC languageD
p1 1 0 p f h Ø
p1 2 0 p f Ø pf
a1 1 1 a a a Ø
a1 2 1 a a Ø a
t1 1 2 t t - Ø
t1 2 2 t t Ø d

This means, a new panel has to be added, namely the pattern-panel, which also allows users to edit patterns directly (re-assigning the cognate-ID to another pattern). The pattern is similar to an active reconstruction, but it maintains the awareness of the user that there may be conflicts, while the automatic pattern-detection algorithm could be used to make a preliminary parse.

LinguList commented 6 years ago

The pattern should be stored for each alignment in the column "pattern" or "correspondences" in the first entry in the list (following the ID of the word). This will allow for sparse data, and in formats like CLDF, it would be placed in another table.

LinguList commented 6 years ago

the pattern browser, which I just added, should be sufficient, we don't even need to edit patterns. It is enough to just display them for the time being.