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

Question about semantic graph feature #112

Closed
msobrevillac opened this issue Oct 30, 2019 · 6 comments
Closed

Question about semantic graph feature #112

msobrevillac opened this issue Oct 30, 2019 · 6 comments
Assignees

Comments

@msobrevillac
Copy link

Hi,

I would like to know if you plan to implement a feature for semantic graph annotation. The idea is to build a semantic graph for a specific text.

Thanks!

@deppp
Copy link
Collaborator

deppp commented Nov 22, 2019

Hey, @msobrevillac can you please provide more details about that? Some examples would be nice.

@pilipenok
Copy link

Hi @deppp !
Like @msobrevillac I also need such a tool for graph knowledge constructions.
It's almost similar to the "text annotation" feature but need to add relations between annotated entities.
Some web-based apps to clarify:

  1. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6942516/
  2. https://brat.nlplab.org/examples.html
  3. https://github.com/weitechen/anafora
  4. https://webanno.github.io/webanno/use-case-gallery/semreldata/

At the beginning entities can have only names and simple relations (properties). In future it would be nice to have some standard formats: i.e. https://developers.google.com/knowledge-graph/reference/rest/v1 (schema.org entities)

Configurable output would be a kill feature as well!

@deppp
Copy link
Collaborator

deppp commented Jan 29, 2020

Oleg, @pilipenok, thanks for the info. Can you try out the interface of the current implementation? Basically, when you label a piece of text and then in the right side menu, click the "Relation" button, you can select another labeled region. That creates a relation between the items. If something like that works, I think we can extend that to include more properties and make them configurable, or add-on-the-fly.

Also, what do you mean by configurable output? Can you provide a use-case?

Thanks for the links btw

@pilipenok
Copy link

pilipenok commented Jan 30, 2020

oh, nice! Didn't see it before. I think this is the right way for relations but unfortunately it seems almost unusable for now:

  1. It's really hard to understand how to create a relation from that side menu (thanks for clarifications), especially when you have a list of 50+ entities and need to scroll up to text on every relation.
  2. all created relations look the same as unsensed "A text -> A text". It's impossible to recall what are they about.

In my opinion the side menu is a wrong place for the process. Need to see all the work right over the text.

Unfortunately I didn't have a chance to see json result because of error (win 10, the latest docker image):

[2020-01-30 07:26:21,025] [service] [CRITICAL]

--------------
Traceback (most recent call last):
  File "/label-studio/label_studio/utils/misc.py", line 88, in exception_f
    return f(*args, **kwargs)
  File "/label-studio/label_studio/server.py", line 590, in api_completion_update
    project.save_completion(task_id, completion)
  File "/label-studio/label_studio/project.py", line 455, in save_completion
    self._update_derived_output_schema(completion)
  File "/label-studio/label_studio/project.py", line 138, in _update_derived_output_schema
    for result in completion['result']:
KeyError: 'result'
--------------

Any way this is really a good start and your app will save our time and can be very helpfull.
Can't wait for new releases!

Updated: seems the same issue is on https://app.labelstud.io/export when exporting labeled text with relations. I see "[]" in json.

@pilipenok
Copy link

Consider the configurable output, I mean that it would be nice to have an output json schema template that I want for my project without additional transformations.
Something like that:

  "annotations": [{
    "id": {{ $id }},
    "textSegment": {
      "content": "{{ $entity.text }}",
      "startOffset": {{ $entity.start_from }},
      "endOffset": {{ $entity.end_to }},
      "type": "{{ $entity.label.name }}"
    }
  }]

Any way this feature needs huge amount of work to implement but not really important for now.

@makseq
Copy link
Member

makseq commented Sep 28, 2020

It seems that we have the most functionality for semantic graphs at this moment. Take a look to this PR:
HumanSignal/label-studio-frontend#140

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

No branches or pull requests

5 participants