vickumar1981 / stringdistance

A fuzzy matching string distance library for Scala and Java that includes Levenshtein distance, Jaro distance, Jaro-Winkler distance, Dice coefficient, N-Gram similarity, Cosine similarity, Jaccard similarity, Longest common subsequence, Hamming distance, and more..
https://vickumar1981.github.io/stringdistance/api/com/github/vickumar1981/stringdistance/index.html
Other
78 stars 15 forks source link

Scala issue: " object vickumar1981 is not a member of package com.github" #71

Closed Btsalel closed 2 years ago

Btsalel commented 2 years ago

Summary.

import com.github.vickumar1981.stringdistance.StringDistance._ should not give errors

What you expected.

no error messages

What happened instead.

Scala (through Spark DataBricks) complains during importing libraries: object vickumar1981 is not a member of package com.github

import com.github.vickumar1981.stringdistance.StringDistance._
vickumar1981 commented 2 years ago

@Btsalel thanks for reporting this issue.

Have you added the dependency to your build.sbt?

libraryDependencies += "com.github.vickumar1981" %% "stringdistance" % "1.2.7"

Btsalel commented 2 years ago

@vickumar1981 I'm not familiar with sbt. So I've read around and do I understand correctly that sbt is a development environment for accessing DataBricks or the Scala programming language? Or have I completely misunderstood it?

Info: I'm trying to calculate the Levenshtein distance between two string columns in a DataFrame on Spark DataBricks using Scala. I'm working on a configurable cluster, but I have virtually no experience in doing so, I'm working on a company-owned laptop, on which I have no rights to install, which seems to be necessary according to this link

vickumar1981 commented 2 years ago

@Btsalel sbt, along with gradle and maven, are build tools for Scala and java, respectively.

Basically, this library is not a part of standard Scala. It's a 3rd party library, so you have to add it to your project as a dependency.

If you look at the README file, the beginning instructions are to add this library as a dependency to your project either via sbt, gradle, or maven.

Going to close this issue out, as it is seems unrelated to the library.

vickumar1981 commented 2 years ago

@Btsalel feel free to borrow any of the implementations if you need them.

https://github.com/vickumar1981/stringdistance/blob/master/src/main/scala/com/github/vickumar1981/stringdistance/impl/LevenshteinDistanceImpl.scala#L7