-
Notifications
You must be signed in to change notification settings - Fork 47
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
Improving Javascript style #41
Conversation
|
||
/** | ||
* @desc Constructs google translate url | ||
* @params User saved preferences |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From google's style guide:
/**
* Some class, initialized with a value.
* @param {Object} value Some value.
* @constructor
*/
function MyClass(value) {
/**
* Some value.
* @type {Object}
* @private
*/
this.myValue_ = value;
}
Thanks for the pull request, Vandan! I have just merged it. You are going in the right direction, but a few things are not according to Google's style guidelines for Javascript (https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml). For example, 2 spaces should be used for code block indentation, while 4 spaces should be used for statement break indentation. Have a look on the style guide, and you will see many examples of good style there. |
Also, follow git's convention and use imperative instead of gerund in your commit messages. For example, among git users, it would be generally considered better to write "Improve Javascript style" than "Improving Javascript style". |
Thanks a lot ... I had a some small doubts in mind And what is the function of the ngrammin and ngramMax params in getAllWords Vandan Phadke
|
By default, MindTheWord translates isolated words. However, there is an advanced option in the options page that allows the user to choose ngram-min and ngram-max. When the user selects, for example, ngram-min = 2 and ngram-max = 4, MindTheWord will translate sequences of consecutive words containing from 2 to 4 words. |
POS tagging is currently not used. If we had it, we could easily implement the following requested feature: #30 The difficulty are:
If you have any idea how how to overcome these challenges in a simple way, I would really like to hear it! |
The text is broken into a collection of words (or n-grams/wordsequences) in the method Then the words are filtered in |
Have a look also on the |
As per our conversation I am sending this PR.
Please guide me if I am not going in the right direction.