Class: Gliner::Task
- Inherits:
-
Object
show all
- Defined in:
- lib/gliner/task.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(config_parser:, inference:, input_builder:) ⇒ Task
Returns a new instance of Task.
7
8
9
10
11
|
# File 'lib/gliner/task.rb', line 7
def initialize(config_parser:, inference:, input_builder:)
@config_parser = config_parser
@inference = inference
@input_builder = input_builder
end
|
Instance Attribute Details
#config_parser ⇒ Object
Returns the value of attribute config_parser.
5
6
7
|
# File 'lib/gliner/task.rb', line 5
def config_parser
@config_parser
end
|
#inference ⇒ Object
Returns the value of attribute inference.
5
6
7
|
# File 'lib/gliner/task.rb', line 5
def inference
@inference
end
|
Returns the value of attribute input_builder.
5
6
7
|
# File 'lib/gliner/task.rb', line 5
def input_builder
@input_builder
end
|
Instance Method Details
#build_prompt(parsed) ⇒ Object
19
|
# File 'lib/gliner/task.rb', line 19
def build_prompt(parsed) = raise NotImplementedError
|
#label_prefix ⇒ Object
17
|
# File 'lib/gliner/task.rb', line 17
def label_prefix = raise NotImplementedError
|
#labels(parsed) ⇒ Object
21
|
# File 'lib/gliner/task.rb', line 21
def labels(parsed) = raise NotImplementedError
|
#needs_cls_logits? ⇒ Boolean
27
|
# File 'lib/gliner/task.rb', line 27
def needs_cls_logits? = false
|
#normalize_text? ⇒ Boolean
25
|
# File 'lib/gliner/task.rb', line 25
def normalize_text? = false
|
#parse_config(input) ⇒ Object
13
|
# File 'lib/gliner/task.rb', line 13
def parse_config(input) = raise NotImplementedError
|
#process_output(logits, parsed, prepared, options) ⇒ Object
23
|
# File 'lib/gliner/task.rb', line 23
def process_output(logits, parsed, prepared, options) = raise NotImplementedError
|
#task_type ⇒ Object
15
|
# File 'lib/gliner/task.rb', line 15
def task_type = raise NotImplementedError
|