Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does codeprep works on JavaScript source code preprocessing? #8

Open
Kelin-hao opened this issue Jul 21, 2020 · 3 comments
Open

Does codeprep works on JavaScript source code preprocessing? #8

Kelin-hao opened this issue Jul 21, 2020 · 3 comments
Labels
bug Something isn't working question Further information is requested

Comments

@Kelin-hao
Copy link

It seems that it dosenot work when delt with javascript language. And is there any solution to remove end of a token'\t' in the token sequence.

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.94. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the question Further information is requested label Jul 21, 2020
@Kelin-hao
Copy link
Author

I try to use corpus to preprocess my JavaScript source code as following:
import codeprep.api.corpus as cps cps.basic('D:/NpmData/forTest/npm_1/@angular-cdk',no_com=True, no_str= True,extensions="js")
But an error ocured:
`RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.`

@hlibbabii
Copy link
Member

Hi @Wang-JLU! Thanks for creating the issue. It should work for a JS corpus as well. From the error message you are getting, it does not look like it has something to do with the language you want to pre-process. It rather seems to be a multi-processing issue on Windows. Unfortunately, I couldn't reproduce the error. If you still haven't figured out what the problem is, could you please give more details (Windows and python version you are running)?

Regarding token, currently, we are always returning since without it's impossible to reconstruct original tokens. Therefore we don't have any switch/parameter at the moment to change this behavior. So, unfortunately, you have to do this yourself. Could you please tell us your use case, why exactly you need it, so we can consider adding such a switch.

@hlibbabii hlibbabii added the bug Something isn't working label Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants