Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 214a947

Browse files
Update README.md
1 parent f2fb04b commit 214a947

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

‎README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
**code-bert present version is available for Linux and Mac only. We are working on the Windows release. Please hang on**
44

5+
codeBERT is a package to **automatically review you code documentation**. codeBERT currently works for Python code.
6+
7+
🔨 Given a function body `f` as a string of code tokens (including special tokens such as `indent` and `dedent`) and a doc string `d` as a string of Natual Language tokens. Predict whether `f` and `d` are assciated or not (meaning, whether they represent the same concept or not)
8+
59
This is [CodistAI](https://codist-ai.com/) open source version to easily use the fine tuned model based on our open source MLM code model [codeBERT-small-v2](https://huggingface.co/codistai/codeBERT-small-v2)
610

711
[codeBERT-small-v2](https://huggingface.co/codistai/codeBERT-small-v2) is a RoBERTa model, trained using Hugging Face Transformer library and then we have fine tuned the model on the task of predicting the following -
812

9-
Given a function body `f` as a string of code tokens (including special tokens such as `indent` and `dedent`) and a doc string `d` as a string of Natual Language tokens. Predict whether `f` and `d` are assciated or not (meaning, whether they represent the same concept or not)
13+
1014

1115
## An example
1216

@@ -25,7 +29,7 @@ def get_file(filename):
2529

2630
```
2731

28-
Using our another open source library [tree-hugger](https://github.com/autosoft-dev/tree-hugger) it is fairly trivial to get the code and separate out the function body and the docstring with a single API call.
32+
💡 Using our another open source library [tree-hugger](https://github.com/autosoft-dev/tree-hugger) it is fairly trivial to get the code and separate out the function body and the docstring with a single API call.
2933

3034
We can use then, the [`process_code`](https://github.com/autosoft-dev/code-bert/blob/2dd35f16fa2cdb96f75e21bb0a9393aa3164d885/code_bert/core/data_reader.py#L136) method from this prsent repo to process the code lines in the proper format as [codeBERT-small-v2](https://huggingface.co/codistai/codeBERT-small-v2) would want.
3135

@@ -84,7 +88,7 @@ So, let's say you have a directory called `test_files` with some python files in
8488

8589
A prompt will appear to confirm the model location. Once you confirm that then the algorithm will take one file at a time and analyze that, recursively on the whole directory.
8690

87-
It should produce a report like the following -
91+
🏆 It should produce a report like the following -
8892

8993

9094
```
@@ -107,4 +111,6 @@ Function "get_file" with Dcostring """opens a url"""
107111
Do they match?
108112
No
109113
******************************************************************
110-
```
114+
```
115+
116+
Stay tuned!

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /