You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,16 @@ python3
190
190
The above python commands will result in the closest name to both "equals" and "to|lower", which is "equals|ignore|case".
191
191
Note: In embeddings that were exported manually using the "--save_w2v" or "--save_t2v" flags, the input token and target words are saved using the symbol "|" as a subtokens delimiter ("*toLower*" is saved as: "*to|lower*"). In the embeddings that are available to download (which are the same as in the paper), the "|" symbol is not used, thus "*toLower*" is saved as "*tolower*".
192
192
193
+
### Exporting the code vectors for the given code examples
194
+
The flag `--export_code_vectors` allows to export the code vectors for the given examples.
195
+
196
+
If used with the `--test <TEST_FILE>` flag,
197
+
a file named `<TEST_FILE>.vectors` will be saved in the same directory as `<TEST_FILE>`.
198
+
Each row in the saved file is the code vector of the code snipped in the corresponding row in `<TEST_FILE>`.
199
+
200
+
If used with the `--predict` flag, the code vector will be printed to console.
201
+
202
+
193
203
## Extending to other languages
194
204
In order to extend code2vec to work with other languages other than Java, a new extractor (similar to the [JavaExtractor](JavaExtractor))
195
205
should be implemented, and be called by [preprocess.sh](preprocess.sh).
0 commit comments