|
| 1 | +module Classifier |
| 2 | + class LSI |
| 3 | + @auto_rebuild: bool |
| 4 | + @word_list: WordList |
| 5 | + @items: Hash[untyped, ContentNode] |
| 6 | + @version: Integer |
| 7 | + @built_at_version: Integer |
| 8 | + |
| 9 | + attr_reader word_list: WordList |
| 10 | + attr_accessor auto_rebuild: bool |
| 11 | + |
| 12 | + def self.gsl_available: () -> bool |
| 13 | + def self.gsl_available=: (bool value) -> bool |
| 14 | + |
| 15 | + def initialize: (?Hash[Symbol, untyped] options) -> void |
| 16 | + |
| 17 | + def needs_rebuild?: () -> bool |
| 18 | + |
| 19 | + def add_item: (untyped item, *untyped categories) ?{ (untyped) -> String } -> void |
| 20 | + |
| 21 | + def <<: (untyped item) -> void |
| 22 | + |
| 23 | + def categories_for: (untyped item) -> Array[untyped] |
| 24 | + |
| 25 | + def remove_item: (untyped item) -> void |
| 26 | + |
| 27 | + def items: () -> Array[untyped] |
| 28 | + |
| 29 | + def build_index: (?Float cutoff) -> void |
| 30 | + |
| 31 | + def highest_relative_content: (?Integer max_chunks) -> Array[untyped] |
| 32 | + |
| 33 | + def proximity_array_for_content: (untyped doc) ?{ (untyped) -> String } -> Array[[untyped, Float]] |
| 34 | + |
| 35 | + def proximity_norms_for_content: (untyped doc) ?{ (untyped) -> String } -> Array[[untyped, Float]] |
| 36 | + |
| 37 | + def search: (String string, ?Integer max_nearest) -> Array[untyped] |
| 38 | + |
| 39 | + def find_related: (untyped doc, ?Integer max_nearest) ?{ (untyped) -> String } -> Array[untyped] |
| 40 | + |
| 41 | + def classify: (untyped doc, ?Float cutoff) ?{ (untyped) -> String } -> untyped |
| 42 | + |
| 43 | + def vote: (untyped doc, ?Float cutoff) ?{ (untyped) -> String } -> Hash[untyped, Float] |
| 44 | + |
| 45 | + def classify_with_confidence: (untyped doc, ?Float cutoff) ?{ (untyped) -> String } -> [untyped, Float?] |
| 46 | + |
| 47 | + def highest_ranked_stems: (untyped doc, ?Integer count) -> Array[Symbol] |
| 48 | + |
| 49 | + private |
| 50 | + |
| 51 | + def build_reduced_matrix: (untyped matrix, ?Float cutoff) -> untyped |
| 52 | + |
| 53 | + def node_for_content: (untyped item) ?{ (untyped) -> String } -> ContentNode |
| 54 | + |
| 55 | + def make_word_list: () -> void |
| 56 | + end |
| 57 | +end |
0 commit comments