Comments (15)
I was thinking of implementing something on my own and comparing it to yours.
from editdojo.
Also thanks for your code, @justafrank. I got a lot of inspiration from your code for that video.
from editdojo.
Hi @ykdojo . Can I be assigned to this please ?
And, I think, added characters in the edited text should also be highlighted with maybe something like greenish background color.
Original text: I had aweesome breakfast tooday.
Edited text: I had an awesome breakfast today.
So it may give an output like this:
<p>I had <span class="appended">an</span> awe<span class="deleted">e</span>some breakfast to<span class="deleted">o</span>day.
Where the appended words/chars are wrapped in a span with class .appended, and deleted words/chars are wrapped in a span with class .deleted.
from editdojo.
That sounds perfect! I tried assigning this to you on GitHub, but it didn't work for some reason. Feel free to just start working on it and send a pull request when it's ready :)
from editdojo.
Found this library, but not sure if it would be a good fit for this: https://github.com/jhchen/fast-diff
from editdojo.
Maybe it would be better/simpler to just implement this ourselves? That way, it'll be easier to tweak it as we go, too. I just don't like how most of these libraries are really complex to read and edit... Anyway, I'll think about this some more.
from editdojo.
Started working on this today.
Pretty raw and it might be hard to read, but I have some code here already: https://github.com/ykdojo/text_difference_finder
from editdojo.
Hey @ykdojo did you look at my pull request (#25)?
from editdojo.
@justafrank hey sorry I thought I'd submitted my comments already. I just sent them again.
from editdojo.
Here are some examples for testing, in English:
-
Hello I’m looking of the group for learn english.
-> Hello, I’m looking for a group to learn English with. -
what book are you reading ? i want to start this one… what do you think about ?
-> What book are you reading? I want to start this one… What do you think about it? -
who helps me for improving my English?
-> Can anyone help me improve my English? -
I am waiting for snow from this morning until now.
-> I’ve been waiting for snow since this morning. -
even I have French nationality. I still make mistake when I write my own sentences .
-> Even though I’m French, I still make mistakes when I write in French.
from editdojo.
And some test cases in Japanese:
- 日本語でも英語でもドラマよく見ている。
-> 日本語でも英語でもドラマをよく見ています。 - きのうのばんごはんはとてもおいしかたです。
-> きのうのばんごはんはとてもおいしかったです。 - わたしのしごとのま、わたいはそうだいなけしきをみました
-> しごとのあいまにきれいなけしきをみました。 - 知らない人とお喋りのが怖いです。
-> 知らない人とお喋りするのが怖いです。 - Duolingoは本とに凄いアプリです。
-> Duolingoは本当に凄いアプリです。 - 今朝はとても寒い!冬ははやく来る。
-> 今朝はとても寒いですね!冬がもうすぐ来そうです。
from editdojo.
I'm starting to think, ideally, there should be a custom solution for splitting a sentence into words for each language.
Splitting by spaces work well for English, but it won't work well for Japanese, for example.
I think splitting a Japanese sentence into individual characters works well enough for now though.
from editdojo.
I changed a few lines of code, which split the strings by character. Having the option to split by words or character should be enough to cover most languages, I think.
Should I submit another pull request?
from editdojo.
Sure, that sounds perfect.
I made my own version here, so I might pick yours or mine, or try merge them later on.
So one of the reasons I wanted to make my own version is because I wanted to learn how it works myself, and another reason is just because I wanted to make a video about it.
Anyway, I think it's good to have multiple solutions available to choose from :)
from editdojo.
Solved this in my last video. I'll close this issue for now. https://youtu.be/4SP_AY7GGxw
from editdojo.
Related Issues (20)
- When a user signs up for the first time, follow their Twitter account from @EditDojo HOT 3
- When following a user on Twitter, use their ID instead of their handle HOT 3
- Take care of a case when a user's Twitter account is private
- Create a sign up form where the new user selects which language they are learning HOT 24
- Create welcome text that explains how the app works HOT 3
- Make the welcome message look prettier HOT 7
- Decide which CSS framework to use HOT 4
- Take care of the case when a user blocks @EditDojo on Twitter
- Install material-kit (the free version) HOT 1
- Fix the styles of sign up form where the new user selects languages
- [Installation] Keys_format.py instead of keys.py? HOT 2
- In the landing page, the scrolling animation is too slow (I think)
- When the user selects the languages they are learning/fluent in, redirect to a more meaningful page/state HOT 2
- When the user finishes the signup flow, we should show them tweets in the language they're fluent in
- Make a worker script
- Take care of the case when we try to follow someone or retrieve tweets
- Set up HTTPS on Heroku
- Fix the scrolling issue on the phone
- DoesNotExist at /accounts/twitter/login
- Hello YK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editdojo.