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

Korean future fix #40

Merged
merged 4 commits into from
Apr 25, 2017
Merged

Korean future fix #40

merged 4 commits into from
Apr 25, 2017

Conversation

cecilebertin
Copy link
Collaborator

@cecilebertin cecilebertin commented Apr 25, 2017

When I updated the combineSymbol function, I realized the future tense didn't work properly.
The if statement (if (stem[-1] !== 8), line 132) wasn't working correctly and I realized it was coded completely wrong. It pushed 8 to the array for all cases, and we ended up with arrays of 3 or 4 jamo's for latest character of the stem. 3 should be de maximum number of jamo's possible.
We were lucky it passed all the tests before, because the previous combineSymbol function didn't limit the length of the array.
I also realized we missed some cases for the future tense : when the stem ends with a ㅂ consonant, and the other verbs with a stem ending with a consonant other than ㄹ.

src/korean.js Outdated
if(input.length === 3) {
unicodeTotal += input[2];
}
const finalWord = String.fromCharCode(unicodeTotal);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we simply return String.fromCharCode(unicodeTotal) without assigning?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minsooshin you're right. I'll fix that right away.

@minsooshin
Copy link
Contributor

@cecilebertin I don't know the history of this, but I think there is an issue on future tense. Could you take a look at #41?

let presentWord = kc.conjugate('하다', {tense: 'future'});
expect(presentWord).to.equal('할꺼야');
let futureWord = kc.conjugate('하다', {tense: 'future'});
expect(futureWord).to.equal('할꺼야');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be 할 거야. 할꺼야 is pronunciation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minsooshin Thanks! I'll add a fix for this too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minsooshin I looked it up, http://www.koreanwikiproject.com/wiki/A/V_%2B_(으)ㄹ_거예요
I think there should be a space in between for all the cases.

Copy link
Contributor

@minsooshin minsooshin Apr 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cecilebertin that's right. Also, the example you provide is to senior people (Informal polite). So, for your test cases, I think To make the low form (반말), the 예요 part becomes 야: A/V+(으)ㄹ 거야 is the correct reference. That's what I said before; it should be 할 거야. There is a whitespace between and 거야.

@cecilebertin
Copy link
Collaborator Author

@minsooshin , yes I just saw that. I'll take a look at it this afternoon with @yjlim5

@minsooshin
Copy link
Contributor

@cecilebertin thanks!!!

src/korean.js Outdated
stem.push(8);
return `${combineSymbols(stem)} 꺼야`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return `${combineSymbols(stem)} 거야`;

not 꺼야

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

꺼야 is written the pronunciation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minsooshin I think you're right again :) ,I looked it up. Nice catch!
I'll add another commit to fix this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cecilebertin thanks a lot for quick fix and feedback!!!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minsooshin thanks for the thorough review!!!

@yjlim5
Copy link
Collaborator

yjlim5 commented Apr 25, 2017

Thanks for catching the details and fixing them @cecilebertin and @minsooshin. Great team work!

@yjlim5 yjlim5 merged commit e9b21fb into llipio:master Apr 25, 2017
@cecilebertin cecilebertin deleted the KoreanFutureFix branch May 1, 2017 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants