Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mast-group/naturalize
Source code for the Naturalize project
https://github.com/mast-group/naturalize
Last synced: about 2 months ago
JSON representation
Source code for the Naturalize project
- Host: GitHub
- URL: https://github.com/mast-group/naturalize
- Owner: mast-group
- License: bsd-3-clause
- Archived: true
- Created: 2015-09-04T16:26:21.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-05T21:53:02.000Z (almost 9 years ago)
- Last Synced: 2024-01-26T18:36:59.661Z (5 months ago)
- Language: Java
- Homepage: http://groups.inf.ed.ac.uk/naturalize/
- Size: 238 KB
- Stars: 57
- Watchers: 13
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-machine-learning-on-source-code - Naturalize - Language agnostic framework for learning coding conventions from a codebase and then expoiting this information for suggesting better identifier names and formatting changes in the code. (Software)
- awesome-machine-learning-on-source-code - Naturalize - Language agnostic framework for learning coding conventions from a codebase and then expoiting this information for suggesting better identifier names and formatting changes in the code. (Software)
- awesome-machine-learning-on-source-code - Naturalize - Language agnostic framework for learning coding conventions from a codebase and then expoiting this information for suggesting better identifier names and formatting changes in the code. (Software)
- awesome-machine-learning-on-source-code - Naturalize - Language agnostic framework for learning coding conventions from a codebase and then expoiting this information for suggesting better identifier names and formatting changes in the code. (Software)
- awesome-machine-learning-on-source-code - Naturalize - Language agnostic framework for learning coding conventions from a codebase and then expoiting this information for suggesting better identifier names and formatting changes in the code. (Software)
README
Naturalize
===============
Naturalize suggests natural names for source code.naturalize is released under a BSD license.
The project depends on three internal (maven) modules:
a) [codemining-sequencelm](https://github.com/mast-group/codemining-sequencelm)
b) [codemining-utils](https://github.com/mast-group/codemining-utils)
c) [codemining-core](https://github.com/mast-group/codemining-core)
d) [commitmining-tools](https://github.com/mast-group/commitmining-tools)the rest of the dependencies are declared in the maven dependencies.
## Basic Usage
```java
final AbstractIdentifierRenamings renamer = new BaseIdentifierRenamings(
new JavaTokenizer());
renamer.buildRenamingModel(trainingFiles);final SortedSet renamings = renamer
.getRenamings(new Scope(snippet,
Scope.ScopeType.SCOPE_LOCAL, null, -1, -1),
nameOfIdentifier);
```If you need a method for directly specifying variable bindings consider
using `AbstractIdentifierRenamings.getRenamings(TokenNameBinding binding)`
that avoids retokenizing the snippet and performing a textual match on the
tokens.