Skip to content

edsnlp.utils.examples

find_matches [source]

Finds entities within the example.

Parameters

PARAMETER DESCRIPTION
example

Example to process.

TYPE: str

RETURNS DESCRIPTION
List[Match]

List of matches for entities.

parse_match [source]

Parse a regex match representing an entity.

Parameters

PARAMETER DESCRIPTION
match

Match for an entity.

TYPE: Match

RETURNS DESCRIPTION
Match

Usable representation for the entity match.

parse_example [source]

Parses an example : finds examples and removes the tags.

Parameters

PARAMETER DESCRIPTION
example

Example to process.

TYPE: str

RETURNS DESCRIPTION
Tuple[str, List[Entity]]

Cleaned text and extracted entities.