Skip to main content

A Python Code Similarity Detection Doll, just for fun.

Project description

A Python Code Similarity Detection Doll, just for fun. 用于计算python代码相似度的玩具。

背景

基于抽象语法树,有三种方法,第一种是最简单的jaccard相似度,第二种是树的编辑距离,第三种是遍历合适大小的子树计算anti-unification(不完全是)

demo

code_sim('codes/code1.py', 'codes/code2.py', 'jaccard')
code_sim('codes/code1.py', 'codes/code2.py', 'tree_edit')
code_sim('codes/code1.py', 'codes/code2.py', 'fake_anti_uni')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycodesim-0.0.2.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file pycodesim-0.0.2.tar.gz.

File metadata

  • Download URL: pycodesim-0.0.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pycodesim-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ded112c34056bb0581ce7d74407c63fa93fb0edc11b35fc1ffeba23fb25594bf
MD5 a7f3d7caa41169aebe4b5ce47ff5421e
BLAKE2b-256 924c312564dd06e26ea18198592a9ddc5706cb6b52faeac33f0148f3936de1f7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page