Skip to content

Relation Extraction empty #183

@tatankam

Description

@tatankam

Hi,
I was testing the relation through sie with haystack following https://superlinked.com/docs/integrations/haystack
Relation Extraction
Extract relationships between entities using GLiREL:

from haystack_integrations.components.extractors.sie import SIEExtractor

extractor = SIEExtractor(
    base_url="http://localhost:8080",
    model="jackboyla/glirel-large-v0",
    labels=["works_for", "ceo_of", "founded"]
)

result = extractor.run(text="Tim Cook is the CEO of Apple Inc.")
for relation in result["relations"]:
    print(f"{relation.head} --{relation.relation}--> {relation.tail}")
# Tim Cook --ceo_of--> Apple Inc.
print(result)

I obtain no output:
{'entities': [], 'relations': [], 'classifications': [], 'objects': []}

The others extractions like Text Classification and Entity Extraction, work fine.

Is it a model issue?

Thanks a lot
Mario

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions