Learn R Programming

jiebaR (version 0.8.1)

distance: Hamming distance of words

Description

The function uses Simhash worker to do keyword extraction and find the keywords from two inputs, and then computes Hamming distance between them.

Usage

distance(codel, coder, jiebar)
vector_distance(codel, coder, jiebar)

Arguments

codel
a Chinese sentence or the path of a text file
coder
a Chinese sentence or the path of a text file
jiebar
jiebaR Worker

References

http://en.wikipedia.org/wiki/Hamming_distance

See Also

worker

Examples

Run this code
## Not run: 
# ### Simhash
# words = "hello world"
# simhasher = worker("simhash", topn = 1)
# simhasher <= words
# distance("hello world" , "hello world!" , simhasher)
# ## End(Not run)

Run the code above in your browser using DataLab