Framework for Source Code Preprocessing
Project description
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)
# expected output
x = 5 + 6
print(x)
Use case 2: Removing whitespaces
from PyReprism.utils.normalizer import Normalizer
source = """
x = 5 + 6
print(x)
"""
source = Normalizer.remove_whitespaces(source)
# expected output
x=5+6
print(x)
Read the docs for more usage examples.
NB: The beta versions of PyReprism is still unstable, but 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
For more information on how to contribute, read our contributing guidelines.
Issues
If you experience any issue, feel free to report it.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyreprism-0.0.3.tar.gz.
File metadata
- Download URL: pyreprism-0.0.3.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5da40a4d2246169bc0c14614c6b12d5a6f5ffd65c017b29dfcaa43f460de952a
|
|
| MD5 |
931e55d5579dc565207f2e0b5fa92371
|
|
| BLAKE2b-256 |
807e024270cbe9347bc37734a474de04c015205a4cc5c8dc1cbae7c7b7172832
|
File details
Details for the file pyreprism-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pyreprism-0.0.3-py3-none-any.whl
- Upload date:
- Size: 96.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06793f74e45b04ee49a861485928ae6a556fa257b5ae15e05c053705189b4282
|
|
| MD5 |
433688e9c388c4dbe241f14a8cc069d0
|
|
| BLAKE2b-256 |
036d62feda402f2e5a46c676dcf998c8a6bdb4841fde85b9bcd34b82c8d6454a
|