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

Show some more examples #794

Draft
wants to merge 63 commits into
base: odin-debugger
Choose a base branch
from
Draft

Conversation

kwalcock
Copy link
Member

No description provided.

type InstToDebuggerRecords = Map[Inst, Seq[DebuggerRecord]]

def visualize(extractor: Extractor, sentence: Sentence): Unit = {
val transcript = instance.transcript.toSeq.filter { debuggerRecord =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly interesting changes here

nextInst == null || (nextInst.getPosId <= inst.getPosId && nextInst.getPosId != 0)
}

val matchVisualization = debuggerRecords.map {debuggerRecord =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly interesting changes here

@kwalcock
Copy link
Member Author

@NickAvalani , this partially overlaps with your matchTokens, but you might find it useful. Example output:

There was an extractor: food-followed-by-person
1. SaveStart(--GLOBAL--), which matches(0: pain, 3: John)
2. MatchToken(B-FOOD matches pain) -> 3, which matches(0: pain)
3. Split.  Check out my LHS and RHS!, which matches(1: au, 2: chocolat, 3: John)
   (LHS) 4. MatchToken(I-FOOD matches chocolat) -> 3, which matches(1: au, 2: chocolat)
   (RHS) 5. Pass, which matches(1: au, 2: chocolat, 3: John)
   (RHS) 6. MatchLookAhead.  Check out my start., which matches(3: John)
      (Start) 7. MatchToken(B-PER matches John) -> 0, which matches(3: John)
      (Start) 0. Done, which matches(4: <EOS>, 3: John)
   (RHS) 8. SaveEnd(--GLOBAL--), which matches(3: John)
   (RHS) 0. Done, which matches(4: <EOS>, 3: John)

@navalani
Copy link
Collaborator

Thanks @kwalcock, that helps alot!

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

Successfully merging this pull request may close these issues.

3 participants