Giter VIP home page Giter VIP logo

Comments (13)

adamb0mb avatar adamb0mb commented on August 28, 2024

Hey Damon!

You're right, it should return 1 when they are exact string matches. I think I may have implemented the "winkler" part of the algorithm incorrectly. Hopefully I can take a look at the issue this week (but I've switched priorities since I had a daughter a couple of months ago :-))

Adam

from natural.

DamonOehlman avatar DamonOehlman commented on August 28, 2024

Hey Mate - congrats on the birth of your daughter. I know what you mean - everything changes when you've got kids :)

I've got a better understanding of the algorithm now after working through it a little and hacking around with an implementation to try and help get the gist of it (https://github.com/DamonOehlman/strcmp.js). No idea if I've got it right though - it's really tough to find a reference implementation to compare against for testing purposes, and my implementation is a little different to most others I have seen...

If I get a little less snowed under in the next few days, I'll see if I can work out where the issue is in Natural's implementation...

from natural.

chrisumbel avatar chrisumbel commented on August 28, 2024

@adamb0mb congrats, man!

in the next couple of days i'll have a look as well. it may have even been me that broke it when trying to tie some things together.

from natural.

adamb0mb avatar adamb0mb commented on August 28, 2024

@chrisumbel I'm trying to get jasmine-node running for Natural on my machine, and I'm having issues with directories.

C:\git\natural>jasmine-node spec

module.js:340
throw err;
^
Error: Cannot find module 'lib/natural/tokenizers/aggressive_tokenizer'
at Function.Module._resolveFilename (module.js:338:15)
....
at Object. (C:\git\natural\spec\aggressive_tokenizer_spec.js:23:17)
...
at Module.require (module.js:362:17)

This is the current code:

var Tokenizer = require('lib/natural/tokenizers/aggressive_tokenizer')
  tokenizer = new Tokenizer();

I can get past this error message if I change the aggressive_tokenizer_spec.js to look for the library starting from the parent directory:

var Tokenizer = require('../lib/natural/tokenizers/aggressive_tokenizer')
  tokenizer = new Tokenizer();

I'm assuming that these tests are running just fine on your dev environment, so I don't want to go through and change all the references. Do you have any ideas about how to make these work?

from natural.

adamb0mb avatar adamb0mb commented on August 28, 2024

OK. I just hacked around my directory issue for now (although, I'd love to get that figured out).

from natural.

chrisumbel avatar chrisumbel commented on August 28, 2024

sorry for the late response and thanks for the fix.

i'll be in touch about the jasmine path issue in a few days. i more-or-less know what's going on there.

from natural.

chrisumbel avatar chrisumbel commented on August 28, 2024

We're good on this one, right?

from natural.

adamb0mb avatar adamb0mb commented on August 28, 2024

Yeah.

On Tuesday, August 7, 2012, Chris Umbel wrote:

We're good on this one, right?


Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-7571929.

Adam - [email protected] (new)

from natural.

chrisumbel avatar chrisumbel commented on August 28, 2024

sweet, thanks!

from natural.

shieee avatar shieee commented on August 28, 2024

Hi,

I would like to ask about JaroWinklerDistance algorithm.

My team made a comparison between 'jezze' and '09270000000' and it returned 0.411111111111111 value (we are expecting 0).

To be honest I am not familiar with Jaro-Winkler and it's algorithm, but upon researching about it I found out that Jaro-Winkler is really useful. My question is, maybe the implementation of the algorithm is incorrect?

Hoping for your feedback.

Thank you!

from natural.

adamb0mb avatar adamb0mb commented on August 28, 2024

You are correct, this should be 0.

from natural.

Hugo-ter-Doest avatar Hugo-ter-Doest commented on August 28, 2024

I tested this, and works like expected. See #491 for the same issue and my answer.

from natural.

adamb0mb avatar adamb0mb commented on August 28, 2024

from natural.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.