code2vec icon indicating copy to clipboard operation
code2vec copied to clipboard

How to create separately "my_dataset.raw.train.txt" files for each java codes?

Open brcsnt opened this issue 3 years ago • 3 comments

Hello,

Thank you again for sharing this project with us! I have a question. When I run the "Preprocess.sh" script, all the java files in train folder union all and create a "my_dataset.raw.train.txt" file. Is it possible to create the "my_dataset.raw.train.txt" files as a separate files for each java code in train folder ? (For instance my_dataset.raw.train_code_1.txt , my_dataset.raw.train_code_2.txt, etc.)

Many thanks in advance.

brcsnt avatar Mar 08 '22 10:03 brcsnt

Hi @brcsnt , Of course, You can just move each file into a separate directory and point the preprocess.sh script to each individual directory.

You can also modify the JavaExtractor project to do that, depending on whether you would rather modify the code or modify the directory structure.

Best, Uri

On Tue, Mar 8, 2022 at 5:07 AM Burcu @.***> wrote:

Hello,

Thank you again for sharing this project with us! I have a question. When I run the "Preprocess.sh" script, all the java files in train folder union all and create a "my_dataset.raw.train.txt" file. Is it possible to create the "my_dataset.raw.train.txt" files as a separate files for each java code in train folder ?

Many thanks in advance.

— Reply to this email directly, view it on GitHub https://github.com/tech-srl/code2vec/issues/149, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSOXMGU7QYSI6AMDXJIDJDU64RFJANCNFSM5QF36Z2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

urialon avatar Mar 08 '22 13:03 urialon

Hello @urialon,

Thank you so much for your quick response. I did some research to make changes to the JavaExtractor project. Do I have to modify exactly the "extract.py" file to get the result I specified above? I tried to make some changes but so far without success.

Many thanks in advance.

brcsnt avatar Mar 10 '22 10:03 brcsnt

Not necessarily. But you do need to build the *.jar* file of the JavaExtractor by running mvn package from the directory JavaExtractor/JPredict for your changes to take effect.

Best, Uri

On Thu, Mar 10, 2022 at 5:30 AM Burcu @.***> wrote:

Hello @urialon https://github.com/urialon,

Thank you so much for your quick response. I did some research to make changes to the JavaExtractor project. Do I have to modify exactly the "extract.py" file to get the result I specified above? I tried to make some changes but so far without success.

Many thanks in advance.

— Reply to this email directly, view it on GitHub https://github.com/tech-srl/code2vec/issues/149#issuecomment-1063901455, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSOXMCW4DXCQKFGORGEXE3U7HFKLANCNFSM5QF36Z2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

urialon avatar Mar 10 '22 13:03 urialon