Extracting quotes and their referenced entities
The quotes app extracts quotations, even when the quotes extend through several sentences of text.
The app performs a lookup when a QuotationScope entity is found, that encompasses the Quotation and the QuotationAuthor. You can find this in the quotation domain or you can make your own custom domain with this entity.
Options
QuotesOptions
interface QuotesOptions {
mentions: string[];
}
with:
| Property | Description |
|---|---|
mentions |
URIs of the entities that should be extracted, if present, from the identified quotes |
Results
QuotesResults
type QuotesResults = QuoteResult[];
QuoteResult
interface QuoteResult {
author: string;
text: string;
begin_offset: string;
end_offset: string;
}
with
| Property | Description |
|---|---|
mentions |
URIs of the entities that should be extracted, if present, from the identified quotes |
author |
Quotation author |
text |
Quotation text |
begin_offset |
Begin offset within the document |
end_offset |
End offset within the document |
Examples
Quotes only
Quotes and mentioned entities
Extracting quotes and their referenced entities
The quotes app extracts quotations, even when the quotes extend through several sentences of text.
The app performs a lookup when a QuotationScope entity is found, that encompasses the Quotation and the QuotationAuthor. You can find this in the quotation domain or you can make your own custom domain with this entity.
Options
QuotesOptions
interface QuotesOptions {
mentions: string[];
}
with:
| Property | Description |
|---|---|
mentions |
URIs of the entities that should be extracted, if present, from the identified quotes |
Results
QuotesResults
type QuotesResults = QuoteResult[];
QuoteResult
interface QuoteResult {
author: string;
text: string;
begin_offset: string;
end_offset: string;
}
with
| Property | Description |
|---|---|
mentions |
URIs of the entities that should be extracted, if present, from the identified quotes |
author |
Quotation author |
text |
Quotation text |
begin_offset |
Begin offset within the document |
end_offset |
End offset within the document |
API
Examples
You will need to install the english language module to run the sample. pip install wowool-english
Extracting sentiments
Note that in the results the sentiments have been resolved. For this to happen we need to add the entities in the pipeline.
from wowool.sdk import Pipeline
from wowool.quotes import Quotes
text = '"Wowool has cool technology", said John Smith.'
pipeline = Pipeline(
[
"english",
"quotation",
"quotes.app",
]
)
document = pipeline(text)
print(document.results(Quotes.ID))
results:
[
{
"text": "\"Wowool has cool technology\"",
"begin_offset": 0,
"end_offset": 28,
"author": "John Smith"
}
]
License
In both cases you will need to acquirer a license file at https://www.wowool.com
Non-Commercial
This library is licensed under the GNU AGPLv3 for non-commercial use.
For commercial use, a separate license must be purchased.
Commercial license Terms
1. Grants the right to use this library in proprietary software.
2. Requires a valid license key
3. Redistribution in SaaS requires a commercial license.
Metadata
Release files for wowool-quotes 2.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wowool_quotes-2.1.2-py3-none-any.whl | Python 3 | none | any | Details for wowool_quotes-2.1.2-py3-none-any.whl |
Release files / wowool_quotes-2.1.2-py3-none-any.whl
| Download URL | wowool_quotes-2.1.2-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31ac8b8b0c51c6987b9e79895045c95e8fbdde35c51a817f3805274b61b6758f
|
|
BLAKE2b-256 checksum How to use checksums |
cf4c0f84da2b8c75cf6ca22f5494be582417942f35360063c578d18ed23c8e4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for wowool-quotes 2.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.