Hello Hugging Face forum members,
my name is Mislav, I’m a recent computer science graduate from Croatia. I had the idea of building Grammarly for Croatian Google Chrome plugin. I want to pursue that idea, but before I do that, I want to have a roadmap of what I would have to do in order to build it.
I am completely new to NLP and don’t have any experience with NLP, but I do have some basic experience with machine learning.
Here are the features that I want to build (in order). There will probably be others later on:
- Spell checker
- Tone detector - tells the user how does the text sound - confident, formal, informal etc.
- Improvements suggesstor - suggests how the user can improve his/her text so that it resembles a certain tone better (i.e. how to make his/her message seem more formal)
I don’t know how Grammarly works - what does it use as a technology to detect grammar errors? What does it use to predict sentiment? What does it use to measure how engaging is the text? How does it judge the delivery of the message intended by the text? Essentially, if you had to reverse-engineer Grammarly and use that knowledge to help me build it, I’d be grateful.
I’m doing this project to both learn about NLP and ship the product, so ideally I could have a balance of learning & speed while working on this project. Maybe I could reuse some code from the Hugging Face repo? I intend to make the product a freemium product, so I’m not sure if that’s aligned with the code license.
Any suggestions as to how to go about building this would be appreciated. Again, I am new to this, so a detailed description would go a long way.
Although I respect your dedication, I urge you to be realistic. The road from “knowing nothing about NLP and just the basics of ML” to “building and shipping a whole NLP and deep learning focused product” is long. On top of that, this “Beginners” category is not a good fit for this kind of question. “Research” might be better suited.
I can’t give you a detailed description because “multiple roads lead to Rome”, in other words there are different ways to go about this. I’ll list some things that I think are important for you to get familiar with before even starting with this project. Don’t try to do too much at once. What you want to do takes years of expertise to get even the background right.
Read papers about readability. This is probably the most important field that you need to get a theoretical understanding of if you want to do things right. Grammarly does not only do a “right or wrong” prediction, but it also suggests improvements. Those improvements increase readability, which is quite a big field in (psycho)linguistics. This paper is a good (recent) starting point, code available here. However, I’d also suggest to read up on the theoretical work that has been done way back concerning readability formulas to get a better understanding of the problem.
- For spell checking you need to look into (grammatical) error correction. A lot of work has been done and lately it has been influenced by many neighbouring fields such as machine translation and quality estimation. From a programming perspective, here you may want to look into seq2seq and denoising auto-encoders, although I have to admit that I do not know what the SOTA is these days.
Sentiment analysis will be another large chunk of what you want to do, as its principles can be applied to style as well. You will find a lot information about this. The difficult part is not necessarily detecting which style a text has, but highlighting in that text which spans are confidently the points of interest that contribute to this sentiment. The problem, as so often with neural systems these days, is ensuring that there is some linguistic validation there and that the predicted spans are actually meaningful. (For instance, you may want to exclude prepositions and proper nouns from the result.)
- Perhaps the hardest part is the “improvement suggestor” that you mention. You may want to look into the task of paraphrasing which also has gained some attention over the last few years. Style transfer also seems to be useful here.
As a first step, you should read up on all subfields above. Second, you can start learning how to implement these kinds of things, and lastly you can try to bring them all together into a single system with an interface.
As is hopefully clear to you now, this is not a one day, not even a one year, job. If it interests you, go for it! But be aware that if you want to do this right and actually understand what you are doing, that it will take time.