from sourced.ml.core.extractors import bags_extractor
bags_extractor.Extractor?
Init signature: bags_extractor.Extractor(log_level=20)
Docstring:
Converts a single UAST via `algorithm` to anything you need.
It is a wrapper to use in `Uast2Features` Transformer in a pipeline.
Init docstring:
Class constructor
:param log_level: logging level.
File: ~/anaconda3/envs/sourced/lib/python3.6/site-packages/sourced_ml_core-0.0.3-py3.6.egg/sourced/ml/core/extractors/bags_extractor.py
Type: type
Subclasses: BagsExtractor, RoleIdsExtractor
from sourced.ml.core.extractors import Extractor
Extractor.extract?
Signature: Extractor.extract(self, uast:bblfsh.node.Node)
Docstring: <no docstring>
File: ~/anaconda3/envs/sourced/lib/python3.6/site-packages/sourced_ml_core-0.0.3-py3.6.egg/sourced/ml/core/extractors/bags_extractor.py
Type: function
from sourced.ml.core.utils import bblfsh
bblfsh.BblfshClient.parse(filename='/home/user/Downloads/script.py')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-37-9dbc87e2a353> in <module>
1 code = '''print("hi")'''
----> 2 bblfsh.BblfshClient.parse(filename='/home/user/Downloads/script.py')
TypeError: parse() missing 1 required positional argument: 'self'
After checking the available modules, I did not find a function for extracting the UAST path contexts. Is it possible to do it with sourced
? Also I did not find any documentation (maybe someone can give me a pointer about where to find the docs?).