Class: AIA::ToolFilter::TFIDF
- Inherits:
-
ToolFilter
- Object
- ToolFilter
- AIA::ToolFilter::TFIDF
- Defined in:
- lib/aia/tool_filter/tfidf.rb
Constant Summary collapse
- DEFAULT_THRESHOLD =
0.05- DEFAULT_MAX_TOOLS =
30
Instance Method Summary collapse
-
#initialize(tools:, fact_asserter:, threshold: DEFAULT_THRESHOLD, max_tools: DEFAULT_MAX_TOOLS) ⇒ TFIDF
constructor
A new instance of TFIDF.
Constructor Details
#initialize(tools:, fact_asserter:, threshold: DEFAULT_THRESHOLD, max_tools: DEFAULT_MAX_TOOLS) ⇒ TFIDF
Returns a new instance of TFIDF.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/aia/tool_filter/tfidf.rb', line 29 def initialize(tools:, fact_asserter:, threshold: DEFAULT_THRESHOLD, max_tools: DEFAULT_MAX_TOOLS) super(label: "TF-IDF") @fact_asserter = fact_asserter @threshold = threshold @max_tools = max_tools @tools = tools @tool_entries = [] @tfidf = nil @tool_vectors = [] end |