Spaces:
Running
Running
Joe Shamon
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -35,8 +35,6 @@ pip install -r requirements.txt
|
|
35 |
Use the CodeChunker class to chunk a specific code file. You can specify the file extension and token limit for chunking.
|
36 |
Example:
|
37 |
```py
|
38 |
-
from backend.app.util.TextChunker.Chunker import CodeChunker
|
39 |
-
|
40 |
chunker = CodeChunker(file_extension='py', encoding_name='gpt-4')
|
41 |
chunks = chunker.chunk(your_code_here, token_limit=1000)
|
42 |
CodeChunker.print_chunks(chunks)
|
@@ -46,8 +44,6 @@ CodeChunker.print_chunks(chunks)
|
|
46 |
The CodeParser class allows you to parse code to identify points of interest and comments, which can then be used for chunking or other analysis.
|
47 |
Example:
|
48 |
```
|
49 |
-
from backend.app.util.CodeParsing.CodeParser import CodeParser
|
50 |
-
|
51 |
parser = CodeParser(['py'])
|
52 |
tree = parser.parse_code(your_code_here, 'py')
|
53 |
points_of_interest = parser.extract_points_of_interest(tree, 'py')
|
|
|
35 |
Use the CodeChunker class to chunk a specific code file. You can specify the file extension and token limit for chunking.
|
36 |
Example:
|
37 |
```py
|
|
|
|
|
38 |
chunker = CodeChunker(file_extension='py', encoding_name='gpt-4')
|
39 |
chunks = chunker.chunk(your_code_here, token_limit=1000)
|
40 |
CodeChunker.print_chunks(chunks)
|
|
|
44 |
The CodeParser class allows you to parse code to identify points of interest and comments, which can then be used for chunking or other analysis.
|
45 |
Example:
|
46 |
```
|
|
|
|
|
47 |
parser = CodeParser(['py'])
|
48 |
tree = parser.parse_code(your_code_here, 'py')
|
49 |
points_of_interest = parser.extract_points_of_interest(tree, 'py')
|