Skip to content

Add RBS type signatures #45

@cardmagic

Description

@cardmagic

Summary

Add RBS type signatures to enable static type checking and improved IDE support.

Motivation

  • Ruby 3.0+ includes RBS as the standard type signature format
  • Enables static analysis with tools like Steep
  • Improves IDE autocompletion and documentation
  • Helps catch type errors before runtime

Scope

Type signatures needed for:

  • Classifier::Bayes - initialize, train, untrain, classify, classifications
  • Classifier::LSI - initialize, add_item, classify, search, find_related
  • Classifier::ContentNode - internal LSI data structure
  • String extensions - word_hash, clean_word_hash
  • Vector/Matrix extensions - normalize, magnitude, SV_decomp

Files to create

sig/
  classifier.rbs
  classifier/bayes.rbs
  classifier/lsi.rbs
  classifier/lsi/content_node.rbs
  classifier/extensions/string.rbs
  classifier/extensions/vector.rbs

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions