PyReprism 0.0.1__tar.gz → 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. {pyreprism-0.0.1 → pyreprism-0.0.2}/PKG-INFO +28 -4
  2. pyreprism-0.0.2/README.md +71 -0
  3. {pyreprism-0.0.1 → pyreprism-0.0.2}/pyproject.toml +1 -1
  4. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/python.py +2 -3
  5. pyreprism-0.0.2/src/PyReprism/utils/extension.py +149 -0
  6. pyreprism-0.0.1/README.md +0 -47
  7. pyreprism-0.0.1/src/PyReprism/utils/extension.py +0 -149
  8. {pyreprism-0.0.1 → pyreprism-0.0.2}/.flake8 +0 -0
  9. {pyreprism-0.0.1 → pyreprism-0.0.2}/.gitignore +0 -0
  10. {pyreprism-0.0.1 → pyreprism-0.0.2}/.readthedocs.yaml +0 -0
  11. {pyreprism-0.0.1 → pyreprism-0.0.2}/LICENSE +0 -0
  12. {pyreprism-0.0.1 → pyreprism-0.0.2}/pytest.ini +0 -0
  13. {pyreprism-0.0.1 → pyreprism-0.0.2}/requirements.txt +0 -0
  14. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/__init__.py +0 -0
  15. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/__init__.py +0 -0
  16. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/_base.py +0 -0
  17. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/abap.py +0 -0
  18. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/actionscript.py +0 -0
  19. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/ada.py +0 -0
  20. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/apacheconf.py +0 -0
  21. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/apl.py +0 -0
  22. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/applescript.py +0 -0
  23. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/arduino.py +0 -0
  24. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/arff.py +0 -0
  25. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/asciidoc.py +0 -0
  26. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/asm6502.py +0 -0
  27. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/aspnet.py +0 -0
  28. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/autohotkey.py +0 -0
  29. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/autoit.py +0 -0
  30. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/bash.py +0 -0
  31. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/basic.py +0 -0
  32. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/batch.py +0 -0
  33. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/bison.py +0 -0
  34. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/brainfuck.py +0 -0
  35. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/bro.py +0 -0
  36. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/c.py +0 -0
  37. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/clike.py +0 -0
  38. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/clojure.py +0 -0
  39. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/coffeescript.py +0 -0
  40. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/cpp.py +0 -0
  41. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/crystal.py +0 -0
  42. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/csharp.py +0 -0
  43. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/csp.py +0 -0
  44. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/css.py +0 -0
  45. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/css_extras.py +0 -0
  46. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/d.py +0 -0
  47. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/dart.py +0 -0
  48. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/diff.py +0 -0
  49. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/django.py +0 -0
  50. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/docker.py +0 -0
  51. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/eiffel.py +0 -0
  52. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/elixir.py +0 -0
  53. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/erb.py +0 -0
  54. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/erlang.py +0 -0
  55. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/flow.py +0 -0
  56. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/fortran.py +0 -0
  57. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/fsharp.py +0 -0
  58. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/gedcom.py +0 -0
  59. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/gherkin.py +0 -0
  60. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/git.py +0 -0
  61. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/glsl.py +0 -0
  62. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/go.py +0 -0
  63. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/graphql.py +0 -0
  64. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/groovy.py +0 -0
  65. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/haml.py +0 -0
  66. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/handlebars.py +0 -0
  67. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/haskell.py +0 -0
  68. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/haxe.py +0 -0
  69. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/hpkp.py +0 -0
  70. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/hsts.py +0 -0
  71. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/html.py +0 -0
  72. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/ichigojam.py +0 -0
  73. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/icon.py +0 -0
  74. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/inform7.py +0 -0
  75. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/ini.py +0 -0
  76. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/io.py +0 -0
  77. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/j.py +0 -0
  78. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/java.py +0 -0
  79. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/javascript.py +0 -0
  80. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/jolie.py +0 -0
  81. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/json.py +0 -0
  82. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/jsx.py +0 -0
  83. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/julia.py +0 -0
  84. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/keyman.py +0 -0
  85. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/kotlin.py +0 -0
  86. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/latex.py +0 -0
  87. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/less.py +0 -0
  88. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/liquid.py +0 -0
  89. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/livescript.py +0 -0
  90. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/lolcode.py +0 -0
  91. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/lua.py +0 -0
  92. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/makefile.py +0 -0
  93. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/markdown.py +0 -0
  94. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/markup.py +0 -0
  95. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/markup_templating.py +0 -0
  96. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/matlab.py +0 -0
  97. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/mel.py +0 -0
  98. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/mizar.py +0 -0
  99. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/monkey.py +0 -0
  100. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/n4js.py +0 -0
  101. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/nasm.py +0 -0
  102. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/nginx.py +0 -0
  103. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/nim.py +0 -0
  104. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/nix.py +0 -0
  105. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/nsis.py +0 -0
  106. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/objectivec.py +0 -0
  107. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/ocaml.py +0 -0
  108. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/opencl.py +0 -0
  109. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/oz.py +0 -0
  110. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/parigp.py +0 -0
  111. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/parser.py +0 -0
  112. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/pascal.py +0 -0
  113. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/perl.py +0 -0
  114. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/php.py +0 -0
  115. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/php_extras.py +0 -0
  116. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/plsql.py +0 -0
  117. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/powershell.py +0 -0
  118. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/processing.py +0 -0
  119. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/prolog.py +0 -0
  120. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/properties.py +0 -0
  121. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/protobuf.py +0 -0
  122. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/pug.py +0 -0
  123. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/puppet.py +0 -0
  124. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/pure.py +0 -0
  125. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/q.py +0 -0
  126. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/qore.py +0 -0
  127. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/r.py +0 -0
  128. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/reason.py +0 -0
  129. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/renpy.py +0 -0
  130. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/rest.py +0 -0
  131. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/rip.py +0 -0
  132. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/roboconf.py +0 -0
  133. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/ruby.py +0 -0
  134. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/rust.py +0 -0
  135. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/sas.py +0 -0
  136. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/sass.py +0 -0
  137. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/scala.py +0 -0
  138. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/scheme.py +0 -0
  139. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/scss.py +0 -0
  140. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/smalltalk.py +0 -0
  141. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/smarty.py +0 -0
  142. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/soy.py +0 -0
  143. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/stylus.py +0 -0
  144. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/swift.py +0 -0
  145. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/tcl.py +0 -0
  146. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/textile.py +0 -0
  147. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/tsx.py +0 -0
  148. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/twig.py +0 -0
  149. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/typescript.py +0 -0
  150. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/vbnet.py +0 -0
  151. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/velocity.py +0 -0
  152. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/verilog.py +0 -0
  153. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/vhdl.py +0 -0
  154. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/vim.py +0 -0
  155. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/visual_basic.py +0 -0
  156. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/wasam.py +0 -0
  157. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/xeora.py +0 -0
  158. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/xojo.py +0 -0
  159. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/languages/yaml.py +0 -0
  160. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/utils/__init__.py +0 -0
  161. {pyreprism-0.0.1 → pyreprism-0.0.2}/src/PyReprism/utils/normalizer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: PyReprism
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: Framework for Source Code Preprocessing
5
5
  Project-URL: Homepage, https://github.com/unlv-evol/PyReprism
6
6
  Project-URL: Issues, https://github.com/unlv-evol/PyReprism/issues
@@ -46,7 +46,7 @@ Requires-Dist: pytest-cov; extra == 'dev'
46
46
  Description-Content-Type: text/markdown
47
47
 
48
48
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
49
-
49
+ ![PyPI - Downloads](https://img.shields.io/pypi/dd/PyReprism)
50
50
  # PyReprism
51
51
 
52
52
  PyReprism is a suite of essential methods designed for common preprocessing tasks in code clone detection research.
@@ -56,10 +56,28 @@ PyReprism is a suite of essential methods designed for common preprocessing task
56
56
  pip install PyReprism
57
57
  ```
58
58
  ## Quick Usage
59
+ Use case 1: Removing comments
59
60
  ```python
60
61
 
61
62
  from PyReprism.languages import Python
63
+ # from PyReprism.languages import Java
64
+
65
+ source = """
66
+ # single line comment
67
+ x = 5 + 6
68
+ '''
69
+ multiline
70
+ comment
71
+ '''
72
+ print(x)
73
+ """
74
+
75
+ source = Python.remove_comments(source)
76
+ ```
62
77
 
78
+ Use case 2: Removing whitespaces
79
+ ```python
80
+ from PyReprism.utils.normalizer import Normalizer
63
81
  source = """
64
82
  # single line comment
65
83
  x = 5 + 6
@@ -70,11 +88,15 @@ comment
70
88
  print(x)
71
89
  """
72
90
 
73
- source =''.join(Python.remove_comments(source))
91
+ source = Normalizer.remove_whitespaces(source)
74
92
  ```
75
- Read the [docs]() for more usage examples.
93
+
94
+ Read the [docs]() for more usage examples. -- Coming soon!!
95
+
96
+ NB: The beta versions of PyReprism is still highly unstable, we are working 24/7 to ensure the tool is usable.
76
97
 
77
98
  ## How to Contribute
99
+ We invite you to help us build this tool and make it more extensive. Contribution is open to OSS community.
78
100
 
79
101
  ```shell
80
102
  git clone https://github.com/unlv-evol/PyReprism.git
@@ -92,3 +114,5 @@ Then, install the requirements:
92
114
  ```
93
115
  pip install -r requirements.txt
94
116
  ```
117
+ ## Issues
118
+ If you experience any issue, feel free to report it here. We are developing the issue reporting guidelines which will be available soon.
@@ -0,0 +1,71 @@
1
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
2
+ ![PyPI - Downloads](https://img.shields.io/pypi/dd/PyReprism)
3
+ # PyReprism
4
+
5
+ PyReprism is a suite of essential methods designed for common preprocessing tasks in code clone detection research.
6
+
7
+ ## Install
8
+ ```shell
9
+ pip install PyReprism
10
+ ```
11
+ ## Quick Usage
12
+ Use case 1: Removing comments
13
+ ```python
14
+
15
+ from PyReprism.languages import Python
16
+ # from PyReprism.languages import Java
17
+
18
+ source = """
19
+ # single line comment
20
+ x = 5 + 6
21
+ '''
22
+ multiline
23
+ comment
24
+ '''
25
+ print(x)
26
+ """
27
+
28
+ source = Python.remove_comments(source)
29
+ ```
30
+
31
+ Use case 2: Removing whitespaces
32
+ ```python
33
+ from PyReprism.utils.normalizer import Normalizer
34
+ source = """
35
+ # single line comment
36
+ x = 5 + 6
37
+ '''
38
+ multiline
39
+ comment
40
+ '''
41
+ print(x)
42
+ """
43
+
44
+ source = Normalizer.remove_whitespaces(source)
45
+ ```
46
+
47
+ Read the [docs]() for more usage examples. -- Coming soon!!
48
+
49
+ NB: The beta versions of PyReprism is still highly unstable, we are working 24/7 to ensure the tool is usable.
50
+
51
+ ## How to Contribute
52
+ We invite you to help us build this tool and make it more extensive. Contribution is open to OSS community.
53
+
54
+ ```shell
55
+ git clone https://github.com/unlv-evol/PyReprism.git
56
+ cd PyReprism
57
+ ```
58
+ **(Optional)** It is suggested to make use of virtualenv. Therefore, before installing the requirements run:
59
+
60
+ ```
61
+ python3 -m venv venv
62
+ source venv/bin/activate
63
+ ```
64
+
65
+ Then, install the requirements:
66
+
67
+ ```
68
+ pip install -r requirements.txt
69
+ ```
70
+ ## Issues
71
+ If you experience any issue, feel free to report it here. We are developing the issue reporting guidelines which will be available soon.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "PyReprism"
7
- version = "0.0.1"
7
+ version = "0.0.2"
8
8
  authors = [
9
9
  { name= "UNLV EVOL LAB", email="ogenrwot@unlv.nevada.edu" },
10
10
  ]
@@ -17,9 +17,8 @@ class Python:
17
17
 
18
18
  @staticmethod
19
19
  def comment_regex():
20
- # return re.compile(r'(?P<comment>#.*?$)|(?P<noncomment>\'(\\.|[^\\\'])*\'|"(\\.|[^\\"])*"|.[^#\'"]*)', re.DOTALL | re.MULTILINE)
21
- # pattern = re.compile(r'(?P<comment>#.*?$|"""[\s\S]*?"""|\'\'\'[\s\S]*?\'\'\')|(?P<noncomment>[^\n]*?(?=\n|$))', re.MULTILINE)
22
- pattern = re.compile(r'(?P<comment>#.*?$)|(?P<noncomment>\'(\\.|[^\\\'])*\'|"(\\.|[^\\"])*"|[^#\'"]+)',re.DOTALL | re.MULTILINE)
20
+ pattern = re.compile(r'(?P<comment>#.*?$)|'r'(?P<multilinecomment1>""".*?""")|'r'(?P<multilinecomment2>\'\'\'.*?\'\'\')|'r'(?P<noncomment>\'(\\.|[^\\\'])*\'|"(\\.|[^\\"])*"|.[^#\'"]*)',re.DOTALL | re.MULTILINE)
21
+ # pattern = re.compile(r'(?P<comment>#.*?$)|(?P<noncomment>\'(\\.|[^\\\'])*\'|"(\\.|[^\\"])*"|[^#\'"]+)',re.DOTALL | re.MULTILINE)
23
22
  return pattern
24
23
 
25
24
  @staticmethod
@@ -0,0 +1,149 @@
1
+ abap: str = ".abap"
2
+ actionscript: str = ".as"
3
+ ada: str = ".ada"
4
+ apacheconf: str = ".conf"
5
+ apl: str = ".apl"
6
+ applescript: str = ".applescript"
7
+ arduino: str = ".ino"
8
+ arff: str = ".arff"
9
+ asciidoc: str = ".adoc"
10
+ asm6502: str = ".asm"
11
+ aspnet: str = ".asp"
12
+ autohotkey: str = ".ahk"
13
+ autoit: str = ".au3"
14
+ bash: str = ".sh"
15
+ basic: str = ".bas"
16
+ batch: str = ".bat"
17
+ bison: str = ".y"
18
+ brainfuck: str = ".bf"
19
+ bro: str = ".bro"
20
+ c: str = ".c"
21
+ clike: str = ".c" # This is generic; specific languages like C or C++ should be used.
22
+ clojure: str = ".clj"
23
+ coffeescript: str = ".coffee"
24
+ cpp: str = ".cpp"
25
+ crystal: str = ".cr"
26
+ csharp: str = ".cs"
27
+ csp: str = ".csp"
28
+ css_extras: str = ".css"
29
+ css: str = ".css"
30
+ d: str = ".d"
31
+ dart: str = ".dart"
32
+ diff: str = ".diff"
33
+ django: str = ".py" # Django typically uses Python files
34
+ docker: str = "Dockerfile"
35
+ eiffel: str = ".e"
36
+ elixir: str = ".ex"
37
+ erb: str = ".erb"
38
+ erlang: str = ".erl"
39
+ flow: str = ".js" # Flow is a static type checker for JavaScript
40
+ fortran: str = ".f90"
41
+ fsharp: str = ".fs"
42
+ gedcom: str = ".ged"
43
+ gherkin: str = ".feature"
44
+ git: str = ".git"
45
+ glsl: str = ".glsl"
46
+ go: str = ".go"
47
+ graphql: str = ".graphql"
48
+ groovy: str = ".groovy"
49
+ haml: str = ".haml"
50
+ handlebars: str = ".hbs"
51
+ haskell: str = ".hs"
52
+ haxe: str = ".hx"
53
+ hpkp: str = ".hpkp"
54
+ hsts: str = ".hsts"
55
+ html: str = ".html"
56
+ http: str = ".http"
57
+ ichigojam: str = ".ijs"
58
+ icon: str = ".icon"
59
+ inform7: str = ".ni"
60
+ ini: str = ".ini"
61
+ io: str = ".io"
62
+ ipynb: str = ".ipynb"
63
+ j: str = ".ijs"
64
+ java: str = ".java"
65
+ javascript: str = ".js"
66
+ jolie: str = ".ol"
67
+ json: str = ".json"
68
+ jsx: str = ".jsx"
69
+ julia: str = ".jl"
70
+ keyman: str = ".kmn"
71
+ kotlin: str = ".kt"
72
+ latex: str = ".tex"
73
+ less: str = ".less"
74
+ liquid: str = ".liquid"
75
+ lisp: str = ".lisp"
76
+ livescript: str = ".ls"
77
+ lolcode: str = ".lol"
78
+ lua: str = ".lua"
79
+ makefile: str = "Makefile"
80
+ markdown: str = ".md"
81
+ markup_templating: str = ".xml"
82
+ markup: str = ".xml"
83
+ matlab: str = ".m"
84
+ mel: str = ".mel"
85
+ mizar: str = ".miz"
86
+ monkey: str = ".monkey"
87
+ n4js: str = ".n4js"
88
+ nasm: str = ".asm"
89
+ nginx: str = ".conf"
90
+ nim: str = ".nim"
91
+ nix: str = ".nix"
92
+ nsis: str = ".nsi"
93
+ objectivec: str = ".m"
94
+ ocaml: str = ".ml"
95
+ opencl: str = ".cl"
96
+ oz: str = ".oz"
97
+ parigp: str = ".gp"
98
+ parser: str = ".parser"
99
+ pascal: str = ".pas"
100
+ perl: str = ".pl"
101
+ php_extras: str = ".php"
102
+ php: str = ".php"
103
+ plsql: str = ".sql"
104
+ powershell: str = ".ps1"
105
+ processing: str = ".pde"
106
+ prolog: str = ".pl"
107
+ properties: str = ".properties"
108
+ protobuf: str = ".proto"
109
+ pug: str = ".pug"
110
+ puppet: str = ".pp"
111
+ pure: str = ".pure"
112
+ python: str = ".py"
113
+ q: str = ".q"
114
+ qore: str = ".q"
115
+ r: str = ".r"
116
+ reason: str = ".re"
117
+ renpy: str = ".rpy"
118
+ rest: str = ".rest"
119
+ rip: str = ".rip"
120
+ roboconf: str = ".graph"
121
+ ruby: str = ".rb"
122
+ rust: str = ".rs"
123
+ sas: str = ".sas"
124
+ sass: str = ".sass"
125
+ scala: str = ".scala"
126
+ scheme: str = ".scm"
127
+ scss: str = ".scss"
128
+ smalltalk: str = ".st"
129
+ smarty: str = ".tpl"
130
+ soy: str = ".soy"
131
+ stylus: str = ".styl"
132
+ swift: str = ".swift"
133
+ tcl: str = ".tcl"
134
+ textile: str = ".textile"
135
+ tsx: str = ".tsx"
136
+ twig: str = ".twig"
137
+ typescript: str = ".ts"
138
+ vbnet: str = ".vb"
139
+ velocity: str = ".vm"
140
+ verilog: str = ".v"
141
+ vhdl: str = ".vhdl"
142
+ vim: str = ".vim"
143
+ visual_basic: str = ".vb"
144
+ wasm: str = ".wasm"
145
+ wiki: str = ".wiki"
146
+ xeora: str = ".xeora"
147
+ xojo: str = ".xojo"
148
+ yaml: str = ".yaml"
149
+ yml: str = ".yml"
pyreprism-0.0.1/README.md DELETED
@@ -1,47 +0,0 @@
1
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
2
-
3
- # PyReprism
4
-
5
- PyReprism is a suite of essential methods designed for common preprocessing tasks in code clone detection research.
6
-
7
- ## Install
8
- ```shell
9
- pip install PyReprism
10
- ```
11
- ## Quick Usage
12
- ```python
13
-
14
- from PyReprism.languages import Python
15
-
16
- source = """
17
- # single line comment
18
- x = 5 + 6
19
- '''
20
- multiline
21
- comment
22
- '''
23
- print(x)
24
- """
25
-
26
- source =''.join(Python.remove_comments(source))
27
- ```
28
- Read the [docs]() for more usage examples.
29
-
30
- ## How to Contribute
31
-
32
- ```shell
33
- git clone https://github.com/unlv-evol/PyReprism.git
34
- cd PyReprism
35
- ```
36
- **(Optional)** It is suggested to make use of virtualenv. Therefore, before installing the requirements run:
37
-
38
- ```
39
- python3 -m venv venv
40
- source venv/bin/activate
41
- ```
42
-
43
- Then, install the requirements:
44
-
45
- ```
46
- pip install -r requirements.txt
47
- ```
@@ -1,149 +0,0 @@
1
- abap: str = "xxxxx"
2
- actionscript: str = "xxxxx"
3
- ada: str = ".ada"
4
- apacheconf: str = "xxxxx"
5
- apl: str = "xxxxx"
6
- applescript: str = "xxxxx"
7
- arduino: str = "xxxxx"
8
- arff: str = "xxxxx"
9
- asciidoc: str = "xxxxx"
10
- asm6502: str = "xxxxx"
11
- aspnet: str = ".asp"
12
- autohotkey: str = "xxxxx"
13
- autoit: str = "xxxxx"
14
- bash: str = ".sh"
15
- basic: str = "xxxxx"
16
- batch: str = "xxxxx"
17
- bison: str = "xxxxx"
18
- brainfuck: str = "xxxxx"
19
- bro: str = "xxxxx"
20
- c: str = ".c"
21
- clike: str = "xxxxx"
22
- clojure: str = "xxxxx"
23
- coffeescript: str = "xxxxx"
24
- cpp: str = ".cpp"
25
- crystal: str = "xxxxx"
26
- csharp: str = ".csharp"
27
- csp: str = "xxxxx"
28
- css_extras: str = "xxxxx"
29
- css: str = ".css"
30
- d: str = "xxxxx"
31
- dart: str = ".dart"
32
- diff: str = ".diff"
33
- django: str = "xxxxx"
34
- docker: str = "xxxxx"
35
- eiffel: str = "xxxxx"
36
- elixir: str = "xxxxx"
37
- erb: str = "xxxxx"
38
- erlang: str = "xxxxx"
39
- flow: str = "xxxxx"
40
- fortran: str = "xxxxx"
41
- fsharp: str = "xxxxx"
42
- gedcom: str = "xxxxx"
43
- gherkin: str = "xxxxx"
44
- git: str = ".git"
45
- glsl: str = "xxxxx"
46
- go: str = ".go"
47
- graphql: str = "xxxxx"
48
- groovy: str = ".groovy"
49
- haml: str = "xxxxx"
50
- handlebars: str = "xxxxx"
51
- haskell: str = "xxxxx"
52
- haxe: str = "xxxxx"
53
- hpkp: str = "xxxxx"
54
- hsts: str = "xxxxx"
55
- html: str = "xxxxx"
56
- http: str = "xxxxx"
57
- ichigojam: str = "xxxxx"
58
- icon: str = "xxxxx"
59
- inform7: str = "xxxxx"
60
- ini: str = ".ini"
61
- io: str = ".io"
62
- ipynd: str = ".ipynd"
63
- j: str = ".j"
64
- java: str = ".java"
65
- javascript: str = ".js"
66
- jolie: str = "xxxxx"
67
- json: str = ".json"
68
- jsx: str = ".jsx"
69
- julia: str = ".julia"
70
- keyman: str = "xxxxx"
71
- kotlin: str = ".kt"
72
- latex: str = "xxxxx"
73
- less: str = ".less"
74
- liquid: str = "xxxxx"
75
- lisp: str = "xxxxx"
76
- livescript: str = "xxxxx"
77
- lolcode: str = "xxxxx"
78
- lua: str = "xxxxx"
79
- makefile: str = "xxxxx"
80
- markdown: str = ".md"
81
- markup_templating: str = "xxxxx"
82
- markup: str = ".xml"
83
- matlab: str = "xxxxx"
84
- mel: str = "xxxxx"
85
- mizar: str = "xxxxx"
86
- monkey: str = "xxxxx"
87
- n4js: str = "xxxxx"
88
- nasm: str = "xxxxx"
89
- nginx: str = "xxxxx"
90
- nim: str = "xxxxx"
91
- nix: str = "xxxxx"
92
- nsis: str = "xxxxx"
93
- objectivec: str = "xxxxx"
94
- ocaml: str = ".ocaml"
95
- opencl: str = "xxxxx"
96
- oz: str = "xxxxx"
97
- parigp: str = "xxxxx"
98
- parser: str = "xxxxx"
99
- pascal: str = "xxxxx"
100
- perl: str = ".pl"
101
- php_extras: str = "xxxxx"
102
- php: str = ".php"
103
- plsql: str = "xxxxx"
104
- powershell: str = "xxxxx"
105
- processing: str = "xxxxx"
106
- prolog: str = "xxxxx"
107
- properties: str = ".properties"
108
- protobuf: str = "xxxxx"
109
- pug: str = "xxxxx"
110
- puppet: str = "xxxxx"
111
- pure: str = "xxxxx"
112
- python: str = ".py"
113
- q: str = "xxxxx"
114
- qore: str = "xxxxx"
115
- r: str = "xxxxx"
116
- reason: str = "xxxxx"
117
- renpy: str = "xxxxx"
118
- rest: str = "xxxxx"
119
- rip: str = "xxxxx"
120
- roboconf: str = "xxxxx"
121
- ruby: str = ".rb"
122
- rust: str = ".rs"
123
- sas: str = ".sas"
124
- sass: str = ".sass"
125
- scala: str = ".scala"
126
- scheme: str = ".rkt"
127
- scss: str = ".scss"
128
- smalltalk: str = "xxxxx"
129
- smarty: str = "xxxxx"
130
- soy: str = "xxxxx"
131
- stylus: str = ".stylus"
132
- swift: str = ".swift"
133
- tcl: str = "xxxxx"
134
- textile: str = "xxxxx"
135
- tsx: str = ".tsx"
136
- twig: str = "xxxxx"
137
- typescript: str = ".ts"
138
- vbnet: str = "xxxxx"
139
- velocity: str = "xxxxx"
140
- verilog: str = "xxxxx"
141
- vhdl: str = "xxxxx"
142
- vim: str = ".vim"
143
- visual_basic: str = ".vb"
144
- wasm: str = "xxxxx"
145
- wiki: str = "xxxxx"
146
- xeora: str = "xxxxx"
147
- xojo: str = "xxxxx"
148
- yaml: str = ".yaml"
149
- yml: str = ".yml"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes