Ihor commited on
Commit
bd307a3
1 Parent(s): f7fd7f1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -14
README.md CHANGED
@@ -117,22 +117,17 @@ To run pipeline we need to specify entity types and relations with their paramet
117
  ```python
118
  r = pipe.run({
119
  "text": text, # Text to process
120
- "labels": [ # Labels used by GLiNER for entity extraction
121
- "scientist",
122
- "university",
123
- "city",
124
- "research",
125
- "journal",
126
- ],
127
  "relations": [{ # Relation parameters
128
- "relation": "published at", # Relation label. Required parameter.
129
- "pairs_filter": [("scientist", "journal")], # Optional parameter. It specifies possible members of relations by their entity labels.
130
- # Here, "scientist" is the entity label of the source, and "journal" is the target's entity label.
131
- # If provided, only specified pairs will be returned.
132
- },{
133
- "relation": "worked at",
134
- "pairs_filter": [("scientist", "university"), ("scientist", "other")],
135
  "distance_threshold": 100, # Optional parameter. It specifies the max distance between spans in the text (i.e., the end of the span that is closer to the start of the text and the start of the next one).
 
 
 
 
 
 
136
  }]
137
  })
138
 
 
117
  ```python
118
  r = pipe.run({
119
  "text": text, # Text to process
120
+ "labels": ["organisation", "founder", "position", "date"],
 
 
 
 
 
 
121
  "relations": [{ # Relation parameters
122
+ "relation": "founder", # Relation label. Required parameter.
123
+ "pairs_filter": [("organisation", "founder")], # Optional parameter. It specifies possible members of relations by their entity labels.
 
 
 
 
 
124
  "distance_threshold": 100, # Optional parameter. It specifies the max distance between spans in the text (i.e., the end of the span that is closer to the start of the text and the start of the next one).
125
+ }, {
126
+ "relation": "inception date",
127
+ "pairs_filter": [("organisation", "date")],
128
+ }, {
129
+ "relation": "held position",
130
+ "pairs_filter": [("founder", "position")],
131
  }]
132
  })
133