Share your repls and programming experiences

← Back to all posts
Textual Unit Grouper
xXGoziXx

Groups a nested array of Textual Units(Sentences) and its properties by their Text Unit ID

Voters
DynamicSquid
xXGoziXx
Comments
hotnewtop
DynamicSquid

What does the output represent?

xXGoziXx

@DynamicSquid Hey, sorry I'm only seeing this now.
The output represents the data in the csv as json except in an 'unflattened' manner. Meaning the script groups the rows by their Textual Unit ID and creates a nested json object from those rows.
E.g
If these are the columns headers and data:

IDText_Unit_IDStressed_UnitMorphLemmaAnalysisRelTransMeaningPart_Of_SpeechTextual_UnitTranslation
117892S0023-1is húarisis 13sg.pres.ind.Nointrans."to be the copula"verbishúar allaa nísiu deithbirsón gaimredThis day is cold. That [is] clear. [It is] Winter.
117893S0023-1is húarhúarúar 1nom.sg.neut."cold cool "adjectiveishúar allaa nísiu deithbirsón gaimredThis day is cold. That [is] clear. [It is] Winter.
117903S0023-2ní sorchení 3notparticle_negative_mainnísorche suilse indítharniThe light of the candle is not bright.

The table of data will converted into a json object grouped by the Text_Unit_ID column:

EDIT: I'll add this to the description

DynamicSquid

@xXGoziXx Ah, cool!