## Entity


A labelled annotation over one or more spans (more than one = discontinuous).


Usage

``` python
Entity(
    *, spans, label=None, id=None, concepts=(), attributes=None, metadata=None
)
```


Equality and hashing use `(label, spans)` only: two entities over the same characters with the same label are the same entity, whatever their IDs, concepts or attributes.


## Parameter Attributes


`spans: Iterable[tuple[int, int]]`  

`label: str | None = None`  

`id: str | None = None`  

`concepts: Iterable[Concept] = ()`  

`attributes: Mapping[str, str | bool] | None = None`  

`metadata: Mapping[str, Any] | None = None`  


## Attributes

| Name | Description |
|----|----|
| [hull](#hull) | The smallest single span covering all parts, gaps included. Not the extent. |

------------------------------------------------------------------------


#### hull


The smallest single span covering all parts, gaps included. Not the extent.


`hull: Span`


## Methods

| Name | Description |
|----|----|
| [parts()](#parts) | The covered text of each span. |

------------------------------------------------------------------------


#### parts()


The covered text of each span.


Usage

``` python
parts(text)
```
