Lemmy.World
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
gram@lemmy.ml to Rust@programming.devEnglish · 2 years ago

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

github.com

external-link
message-square
3
link
fedilink
  • cross-posted to:
  • [email protected]
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 · 2 years ago
message-square
3
link
fedilink
  • cross-posted to:
  • [email protected]
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 register to comment.
  • abbadon420@lemm.ee
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    2 years ago

    I like being std free

  • Deebster@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    2 years 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
      ·
      2 years 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: [email protected]

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

Wormhole

[email protected]

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.

  • 17 users / day
  • 107 users / week
  • 337 users / month
  • 1.17K users / 6 months
  • 1.24K local subscribers
  • 8.28K subscribers
  • 1.39K Posts
  • 5.76K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • torcherist@programming.dev
  • UI: 0.19.20-5-ga406e80b
  • BE: 0.19.19-9-gc55dd700c
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org