GithubHelp home page GithubHelp logo

kailashbuki / fingerprint Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 14.0 39 KB

Document fingerprint generator

Home Page: https://github.com/kailashbuki/fingerprint

License: MIT License

Python 100.00%

fingerprint's People

Contributors

cychiang avatar kailashbuki avatar pandrey2003 avatar praecipue avatar ralic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fingerprint's Issues

Error when Installing in windows python3 using pip

I was trying to install using

pip install fingerprint

but it gives an error

C:\Users\andey\Documents\GithubDownloadedRepos\dejavu>pip install fingerprint 
Collecting fingerprint
   Using cached fingerprint-0.1.2.tar.gz (3.7 kB)                                                                            
      ERROR: Command errored out with exit status 1: 
         command: 'c:\users\andey\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; 
sys.argv[0] = '"'"'C:\\Users\\andey\\AppData\\Local\\Temp\\pip-install-oibj2130\\fingerprint\\setup.py'"'"'; __file__='"'"'
C:\\Users\\andey\\AppData\\Local\\Temp\\pip-install-oibj2130\\fingerprint\\setup.py'"'"';f=getattr(tokenize, '"'"'open
'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
egg_info --egg-base 'C:\Users\andey\AppData\Local\Temp\pip-install-oibj2130\fingerprint\pip-egg-info'
       cwd: C:\Users\andey\AppData\Local\Temp\pip-install-oibj2130\fingerprint\ 
    Complete output (5 lines):  
    Traceback (most recent call last):
     File "<string>", line 1, in <module>
     File "C:\Users\andey\AppData\Local\Temp\pip-install-oibj2130\fingerprint\setup.py", line 12, in <module>
          long_description=open('README.md').read(),                                                                          
      FileNotFoundError: [Errno 2] No such file or directory: 'README.md'  
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

But older version

pip install fingerprint==0.1.1

works fine though.

Winnowing not recognizing copies

Hi,

I was using your algorithm to classify different documents and while it was working well, for some reason when I apply OCR to handwritten forms (text is valid I have checked) somehow none of the hashed fingerprints match another similar form. I have attached the two forms I am comparing along with this issue. Any help on this is appreciated!

These are IRS forms (1099) and I have filled one with random data on a page and the other one is just a template. I want to see if there is a similarity in their fingerprints (which there should be), but it shows no common fingerprints.

f1099msc.txt
1099_2.txt

index out of range

fpg = FingerprintGenerator(input_string='asdfsdfasfadafafadsadfa')
fpg.generate_fingerprints()
Traceback (most recent call last):
File "", line 1, in
File "/home/serj/work/mirror0/virtual_env/local/lib/python2.7/site-packages/fingerprint/fingerprintgenerator.py", line 151, in generate_fingerprints
self.generate_rollinghash()
File "/home/serj/work/mirror0/virtual_env/local/lib/python2.7/site-packages/fingerprint/fingerprintgenerator.py", line 81, in generate_rollinghash
prev_hash_value += ord(first_kgram[i])(BASE*(KLENGTH-1-i))
IndexError: string index out of range
exit()

Lots of selected hashes are 0

Hi,

I was looking at your implementation of winnowing and decided to try it out on a project I am working on. I have .txt files that I am using this on to create digital fingerprints for these files. With the kgram length as 5 and a window length of 19 (therefore expected keys selected should be close to 2/(1+window length) = 10%), I am getting around 50% of my hashes as fingerprints. Out of this 50%, around 85% have a value of 0 in different positions. Do you have any idea why this could be the case?

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.