Update README.md
Browse files
README.md
CHANGED
|
@@ -71,7 +71,7 @@ labels = ["Microsoft <> founder", "Microsoft <> inception date", "Bill Gates <>
|
|
| 71 |
entities = model.predict_entities(text, labels)
|
| 72 |
|
| 73 |
for entity in entities:
|
| 74 |
-
print(entity["label"],
|
| 75 |
```
|
| 76 |
### Construct relations extraction pipeline with [utca](https://github.com/Knowledgator/utca)
|
| 77 |
First of all, we need import neccessary components of the library and initalize predictor - GLiNER model and construct pipeline that combines NER and realtions extraction:
|
|
@@ -202,7 +202,7 @@ labels = ["summary"]
|
|
| 202 |
input_ = prompt+text
|
| 203 |
|
| 204 |
threshold = 0.5
|
| 205 |
-
summaries = model.predict_entities(input_, labels, threshold=
|
| 206 |
|
| 207 |
for summary in summaries:
|
| 208 |
print(summary["text"], "=>", summary["score"])
|
|
|
|
| 71 |
entities = model.predict_entities(text, labels)
|
| 72 |
|
| 73 |
for entity in entities:
|
| 74 |
+
print(entity["label"], "=>", entity["text"])
|
| 75 |
```
|
| 76 |
### Construct relations extraction pipeline with [utca](https://github.com/Knowledgator/utca)
|
| 77 |
First of all, we need import neccessary components of the library and initalize predictor - GLiNER model and construct pipeline that combines NER and realtions extraction:
|
|
|
|
| 202 |
input_ = prompt+text
|
| 203 |
|
| 204 |
threshold = 0.5
|
| 205 |
+
summaries = model.predict_entities(input_, labels, threshold=threshold)
|
| 206 |
|
| 207 |
for summary in summaries:
|
| 208 |
print(summary["text"], "=>", summary["score"])
|