Skip to main content

Framework for Source Code Preprocessing

Project description

License: MIT PyPI - Downloads

PyReprism

PyReprism is a suite of essential methods designed for common preprocessing tasks in code clone detection research.

Install

pip install PyReprism

Quick Usage

Use case 1: Removing comments

from PyReprism.languages import Python
# from PyReprism.languages import Java

source = """
# single line comment
x = 5 + 6
'''
multiline
comment
'''
print(x)
"""

source = Python.remove_comments(source)

Use case 2: Removing whitespaces

from PyReprism.utils.normalizer import Normalizer
source = """
# single line comment
x = 5 + 6
'''
multiline
comment
'''
print(x)
"""

source = Normalizer.remove_whitespaces(source)

Read the docs for more usage examples. -- Coming soon!!

NB: The beta versions of PyReprism is still highly unstable, we are working 24/7 to ensure the tool is usable.

How to Contribute

We invite you to help us build this tool and make it more extensive. Contribution is open to OSS community.

git clone https://github.com/unlv-evol/PyReprism.git
cd PyReprism

(Optional) It is suggested to make use of virtualenv. Therefore, before installing the requirements run:

python3 -m venv venv
source venv/bin/activate

Then, install the requirements:

pip install -r requirements.txt

Issues

If you experience any issue, feel free to report it here. We are developing the issue reporting guidelines which will be available soon.

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

pyreprism-0.0.2.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyreprism-0.0.2-py3-none-any.whl (97.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyreprism-0.0.2.tar.gz
  • Upload date:
  • Size: 37.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.10

File hashes

Hashes for pyreprism-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e28651781c23200f205903dc31275ed5056a2623ecf25f6e73480c53d160e023
MD5 ccdd6cf3d17934a67ed257edf1dda805
BLAKE2b-256 bb1a26ac5c68d380ba25d699fea4365bfc699ec4a97664e250053031cd641c15

See more details on using hashes here.

File details

Details for the file pyreprism-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyreprism-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 97.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.10

File hashes

Hashes for pyreprism-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cbc786261e5222c2c5b6a327349828835c50881a07a2b1c1ec2047a1f29629ff
MD5 d55d739e5e0e816cf32280b332d465f9
BLAKE2b-256 1b7355e19c59bd09a5ee8eb11ecb11019c961bd65dfd990e49398d7aadd64829

See more details on using hashes here.

Supported by

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