Knowledgator UTCA
KnowledgatorGitHubDiscord
  • Welcome to UTCA documentation!
  • Quickstart
  • Concepts
    • Components
    • Types of components
    • ExecutionSchema
    • Context
    • Scopes
  • Development and Contribution
    • Contribution
    • Future relises
  • Framework structure
  • Core
    • Component
    • BaseExecutor
    • Action
    • Executable
    • Evaluator
    • Memory management
    • Schemas
    • Exceptions
  • Structural components
    • ExecutionSchema
    • Switch
    • ForEach
    • Filter
    • While
    • Condition
    • BREAK
    • Log
  • Base Actions
    • Flush
    • AddData
    • RenameAttribute
    • RenameAttributeQuery
    • SetValue
    • UnpackValue
    • NestToKey
    • ExecuteFunction
  • Predictors
    • Predictor
    • Transformers predictors
    • Transformers schemas
    • TokenSearcherPredictor
    • ComprehendItPredictor
    • GLiNERPredictor
    • OpenAIChatGPTPredictor
    • OpenAIWhisperPredictor
  • Tasks
    • Task
    • ComprehendIt
    • TokenSearcherTextCleaner
    • TokenSearcherNER
    • TokenSearcherQandA
    • TokenSearcherRelationExtraction
    • GLiNER
    • GLiNERRelationExtraction
    • GLiNERQandA
    • OpenAIChat
    • WhisperSpeechToText
    • TransformersTextToSpeech
    • TransformersChartsAndPlotsAnalysis
    • TransformersDocumentQandA
    • TransformersImageClassification
    • TransformersVisualQandA
    • TransformersObjectDetection
    • TransformersTextEmbedding
    • TransformersEntityLinking
    • TransformersTokenClassifier
    • TransformersTextSummarization
    • TransformersTextualQandA
    • TransformersTextClassification
    • TransformersChat
    • Objects
    • Chat tasks utilities
    • Relation extraction tasks utilities
  • Executable Schemas
    • SemanticSearchSchema
    • Web2Meaning
    • RequestsHTML
  • Datasources
    • Audio
    • DB
      • SQL
      • Neo4j
      • Chroma
      • Qdrant
    • Google Documents
    • Google Sheets
    • Image
    • Index
    • JSON
    • PDF
    • Plain text
    • Video
  • Conditions
    • RePattern
    • SemanticCondition
  • APIs
    • GoogleCloudClient
  • Integrations
    • Google Cloud
  • Examples
    • Basic image classification
    • Text to speech
    • PDF document processing
Powered by GitBook
On this page
  • Module: implementation.tasks
  • Methods and properties
  • __init__
  • GliNERInput
  • __init__
  • GliNEROutput
  • __init__
  • GLiNERPreprocessor
  • __init__
  • execute
  • GLiNERPostprocessor
  • execute
  1. Tasks

GLiNER

NER task

PreviousTokenSearcherRelationExtractionNextGLiNERRelationExtraction

Last updated 1 year ago

This task usesby default. For more details, see:

Subclass of .

Module: .tasks

Methods and properties

Main methods and properties


__init__

Arguments:

  • predictor ([Any, Any], optional): Predictor that will be used in task. If equals to None, default will be used. Defaults to None.

  • preprocess (Optional[], optional): Component executed before predictor. If equals to None, default component will be used. Defaults to None. Default component:

  • postprocess (Optional[], optional): Component executed after predictor. If equals to None, default component will be used. Defaults to None. Default component:

  • input_class (Type[], optional): Class for input validation. Defaults to .

  • output_class (Type[], optional): Class for output validation. Defaults to .

  • name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.




GliNERInput


__init__

Arguments:

  • text (str): Text to process.

  • labels (List[str]): Labels for classification.




GliNEROutput


__init__

Arguments:

  • text (str): Input text.




GLiNERPreprocessor


__init__

Arguments:

  • sents_batch (int): Chunks size in sentences. Defaults to 10.

  • threshold (float): Minimial score to put entities into the output (used by predictor). Defaults to 0.5.

  • name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.


execute

Arguments:

  • input_data (Dict[str, Any]): Expected keys:

    • "text" (str): Text to process;

Returns:

  • Dict[str, Any]: Expected keys:

    • "texts" (List[str]): Model inputs;

    • "chunks_starts" (List[int]): Chunks start positions. Used by postprocessor;

    • "threshold" (List[int]): Minimial score to put entities into the output;




GLiNERPostprocessor


execute

Arguments:

  • input_data (Dict[str, Any]): Expected keys:

    • "output" (List[List[Dict[str, Any]]]): Model output;

    • "text" (str): Processed text;

    • "chunks_starts" (List[int]): Chunks starts;

Returns:

  • Dict[str, Any]: Expected keys:

    • "text" (str): Processed text;



Subclass of .

Subclass of . Type of [].

output (List[]): Classified entities.

Create prompts with providied text. Subclass of . Type of [Dict[str, Any], Dict[str, Any]].

Format output. Subclass of . Type of [Dict[str, Any], Dict[str, Any]].

"output" (List[]): Classified entities;

Action
Action
Action
Action
GliNERPredictor
GLiNERPredictor
Predictor
GliNERPredictor
Component
Component
GliNERPreprocessor
GliNERPostprocessor
GliNERInput
GliNEROutput
implementation
ClassifiedEntity
ClassifiedEntity
ClassifiedEntity
NEROutput
NEROutput
NERTask
NEROutputType
Input
IOModel