Label extractors are required for correct extraction of labels from raw trees. Internally, they extract labels from the tree and process the tree to avoid data leaks. Also, label extractors define the granularity level for the pipeline.
granularity: functions
Use name of each function as a label. This label extractor will also hide the function name in the AST and all recursive calls to prevent data leaks.
{
"name": "method name"
}
granularity: functions
Use comments of each function as a label, skipping functions without comments. By default, this label extractor finds doc comments, related to function, leaving only description part (skipping params, return and so on). You can also specify using all comments, including inline and block.
{
"name": "method comment" // only doc by default
}
Or:
{
"name": "method comment",
"onlyDoc": false // Use all comments
}
To add new label extractor following next steps:
- Implement LabelExtractor interface.
- Add label extractor config for it.
- Register config in tool runner.
- [Optional] Add tests for this label extractor.