Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G grew
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • grewgrew
  • grew
  • Issues
  • #13
Closed
Open
Issue created Oct 19, 2019 by Ghost User@ghost

Dropping relation information

We are trying to convert a treebank.

Input:


# sent_id = DW-s2
# text[seg] = Wiñarqu -y -manta -wan miryukuna -manta -wan 
1	Wiñarqu	_	VERB	Root	_	3	s.arg	_	Gloss=desarollar,crecer
2	-y	_	NS	NS	VerbForm=Inf	1	ns	_	_
3	-manta	_	Cas	Cas	Case=Abl	6	@conj	_	_
4	-wan	_	Cas	Cas	Case=Ins	3	s.co	_	_
5	miryukuna	_	NUM	Root	Number=Plur	6	s.arg	_	_
6	-manta	_	Cas	Cas	Case=Abl	0	sntc	_	_
7	-wan	_	Cas	Cas	Case=Ins	6	s.co	_	_

grs:


rule mergens {
  pattern {
    V [xpos=Root];
    NS [upos=NS];
    V -[ns]-> NS;
  }

  commands {
    V.form = V.form + NS.form;
    V.VerbForm = NS.VerbForm;

    del_node NS;
  }
}

rule cas { 
  pattern {
    R [xpos=Root];
    C [upos=Cas];
    C -[s.arg]-> R;
  }
  commands{
    R.form = R.form + C.form;
    R.Case = C.Case;
    
    del_node C
  }
}

strat main { Seq (Onf(mergens), Onf(cas)) }

Output:

# sent_id = DW-s2
# text[seg] = Wiñarqu -y -manta -wan miryukuna -manta -wan 
1	Wiñarqu-y-manta	_	VERB	Root	Case=Abl|VerbForm=Inf	_	_	_	Gloss=desarollar,crecer
2	-wan	_	Cas	Cas	Case=Ins	_	_	_	_
3	miryukuna-manta	_	NUM	Root	Case=Abl|Number=Plur	_	_	_	_
4	-wan	_	Cas	Cas	Case=Ins	_	_	_	_

As you can see, the head and relation information is lost. Is there a way to preserve or update this information in my commands?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking