Lemmy.one
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
gram@lemmy.ml to Rust@programming.devEnglish · 10 months ago

textdistance.rs, Rust crate with 25+ algorithms for comparing strings. Now with no_std support!

github.com

external-link
message-square
3
fedilink
  • cross-posted to:
  • rust@programming.dev
57
external-link

textdistance.rs, Rust crate with 25+ algorithms for comparing strings. Now with no_std support!

github.com

gram@lemmy.ml to Rust@programming.devEnglish · 10 months ago
message-square
3
fedilink
  • cross-posted to:
  • rust@programming.dev
GitHub - life4/textdistance.rs: 🦀📏 Rust library to compare strings (or any sequences). 25+ algorithms, pure Rust, common interface, Unicode support.
github.com
external-link
🦀📏 Rust library to compare strings (or any sequences). 25+ algorithms, pure Rust, common interface, Unicode support. - life4/textdistance.rs
alert-triangle
You must log in or # to comment.
  • abbadon420@lemm.ee
    link
    fedilink
    arrow-up
    7
    ·
    10 months ago

    I like being std free

  • Deebster@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    10 months ago

    Token-based string distances looks like exactly what I need for my current side project - I’m using Levenshtein but I should be comparing based on words, not characters.

    I just need to figure out which (if any) of these does what I need.

    Edit: looks like the Python version has that information: https://github.com/life4/textdistance?tab=readme-ov-file#algorithms

    • gram@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      In Python version, pass the list of words directly into the algorithm, and it will compare words. In Rust version, use Algorithm.for_words:

      https://docs.rs/textdistance/1.1.0/textdistance/trait.Algorithm.html#method.for_words

Rust@programming.dev

rust@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !rust@programming.dev

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 9 users / day
  • 84 users / week
  • 280 users / month
  • 2.75K users / 6 months
  • 34 local subscribers
  • 7.16K subscribers
  • 1.05K Posts
  • 4.87K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • kahnclusions@programming.dev
  • torcherist@programming.dev
  • BE: 0.19.7
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org