Comments (9)
Hi!
Thank you for the feedback!
It seems that there is a little out of sync between astminer
and this lib. In astminer
AST stores in JSON under ast
key and this library tries to read by key tree
. You can change this behavior by changing the value here. Just set AST = "ast"
.
from embeddings-for-trees.
Hi
Thank you for help, its resolved.
But another same error appeared.
I tried to change NODE = "nodeType" to NODE= "typeLabel" but it didn't work.
I guess it is due to compatibility issue between astminer output and this lib.
There are 2 to 3 ways to create AST using astminer, can you let me know which format this lib is using or help me with above error.
Thanks.
from embeddings-for-trees.
Hi!
Using typeLabel
should be ok.
You should use json AST
storage in astminer
:
storage:
name: json AST
Could you provide some astminer
output examples?
from embeddings-for-trees.
I created ASTs using Antrl provided by astminer.
Here is output example.
{"label":"1542.java","ast":[{"token":"","typeLabel":"compilationUnit","children":[1,2]},{"token":"date|time|parser","typeLabel":"IDENTIFIER","children":[]},{"token":"parser","typeLabel":"IDENTIFIER","children":[]}]}
from embeddings-for-trees.
Oh, it seems I found a bug in vocabulary implementation. Instead of using NODE
value from common.py
, it uses internal value:
https://github.com/JetBrains-Research/embeddings-for-trees/blob/master/embeddings_for_trees/data/vocabulary.py#L14
Try to change this NODE
to typeLabel
from embeddings-for-trees.
Ok thank you. I'll try updating it.
from embeddings-for-trees.
I updated it then I get error in jsonl_dataset.py. It seems NODE value needs to be changed at some other place as well.
from embeddings-for-trees.
I changed NODE to typeLabel in common.py as well. It worked now.
Thank you for support.
from embeddings-for-trees.
Nice to hear that it works!
I will update the codebase to make it easier for future usage.
If you have any other questions please feel free to open new issues.
from embeddings-for-trees.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from embeddings-for-trees.