Skip to content

Commit

Permalink
[CHORE] #229 - 변경된 model 네이밍 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
cchanmi committed Dec 3, 2024
1 parent 00c42fe commit 016b4ef
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Smeem-iOS/Smeem-iOS/Global/HighlightModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct HighlightModifier: ViewModifier {
var attributedText = AttributedString(diaryText)

for (index, correction) in corrections.enumerated() {
if index == highlightIndex, let range = attributedText.range(of: correction.original_sentence) {
if index == highlightIndex, let range = attributedText.range(of: correction.originalSentence) {
attributedText[range].backgroundColor = Color(UIColor.point)
attributedText[range].foregroundColor = Color(UIColor.smeemWhite)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct CoachingComparisonView: View {
textHeight = value
}

Text(coachingResponse.original_sentence)
Text(coachingResponse.originalSentence)
.font(Font.custom("Pretendard", size: 14)).fontWeight(.regular)
.frame(maxWidth: .infinity, alignment: .topLeading)
}
Expand All @@ -49,7 +49,7 @@ struct CoachingComparisonView: View {
.foregroundColor(Color(UIColor.point))
}

Text(coachingResponse.corrected_sentence)
Text(coachingResponse.correctedSentence)
.font(Font.custom("Pretendard", size: 14)).fontWeight(.medium)
.foregroundColor(Color(UIColor.point))
.frame(maxWidth: .infinity, alignment: .topLeading)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,41 @@ struct CoachingsResponse: Codable {
}

extension CoachingsResponse {
static let empty = CoachingsResponse(corrections: [CoachingResponse(original_sentence: "I have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterday",
corrected_sentence: "I went to the park yesterdayI went to the park yesterdayI went to the park yesterdayI went to the park yesterdayI went to the park yesterday",
static let empty = CoachingsResponse(corrections: [CoachingResponse(originalSentence: "I have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterday",
correctedSentence: "I went to the park yesterdayI went to the park yesterdayI went to the park yesterdayI went to the park yesterdayI went to the park yesterday",
reason: "현재완료 시제인 have went는 과거 시제인 went로 바꾸는 것이 맞습니다. yesterday와 함께 사용할 때는 단순 과거 시제를 사용해야 합니다.",
is_corrected: true),
CoachingResponse(original_sentence: "I have went to the park yesterdayI have went to the park yesterdayI have went럼뉴름ㄴ람ㄴㄹ 마넝롬나ㅣㅓㅇㄹ ㅗㅁ나ㅓㅇ롬나어롬나어롬나러ㅗㅁ나러 ㅗㄴ마러ㅗㅁ너ㅏ롬 ㄴ라ㅓ ㅗㄴㅁ라 왜 갑자 I have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterday",
corrected_sentence: "I went to the park yesterdayI went to the park yesterdayI went to the park yesterday",
isCorrected: true),
CoachingResponse(originalSentence: "I have went to the park yesterdayI have went to the park yesterdayI have went럼뉴름ㄴ람ㄴㄹ 마넝롬나ㅣㅓㅇㄹ ㅗㅁ나ㅓㅇ롬나어롬나어롬나러ㅗㅁ나러 ㅗㄴ마러ㅗㅁ너ㅏ롬 ㄴ라ㅓ ㅗㄴㅁ라 왜 갑자 I have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterdayI have went to the park yesterday",
correctedSentence: "I went to the park yesterdayI went to the park yesterdayI went to the park yesterday",
reason: "이러 이러한 이유로 이건 맞습니다",
is_corrected: true)])
isCorrected: true)])
static let sample = CoachingsResponse(
corrections: [
CoachingResponse(
original_sentence: "I should have skimmed the previous season - Avatar1..",
corrected_sentence: "I should have skimmed the previous season - Avatar 1.",
originalSentence: "I should have skimmed the previous season - Avatar1..",
correctedSentence: "I should have skimmed the previous season - Avatar 1.",
reason: "Avatar1은 'Avatar 1'으로 띄어쓰기해야 하며, 중복된 마침표 하나를 제거해야 합니다.",
is_corrected: true
isCorrected: true
),
CoachingResponse(
original_sentence: "I think 두팔 who is my boyfriend should study before wathcing….",
corrected_sentence: "I think 두팔, who is my boyfriend, should study before watching.",
originalSentence: "I think 두팔 who is my boyfriend should study before wathcing….",
correctedSentence: "I think 두팔, who is my boyfriend, should study before watching.",
reason: "'wathcing'을 'watching'으로 수정하고, 불필요한 점을 제거했습니다. 또한 쉼표를 추가하여 문장을 읽기 쉽게 만들었습니다.",
is_corrected: true
isCorrected: true
),
CoachingResponse(
original_sentence: "In my personal opinion, the jjin main character of Avatar2 is not Sully, but his son.",
corrected_sentence: "In my personal opinion, the real main character of Avatar 2 is not Sully, but his son.",
originalSentence: "In my personal opinion, the jjin main character of Avatar2 is not Sully, but his son.",
correctedSentence: "In my personal opinion, the real main character of Avatar 2 is not Sully, but his son.",
reason: "'jjin'은 'real'로 대체하였고, 'Avatar2'를 'Avatar 2'로 띄어쓰기 처리하였습니다.",
is_corrected: true
isCorrected: true
)
]
)
}

struct CoachingResponse: Codable {
let original_sentence: String
let corrected_sentence: String
let originalSentence: String
let correctedSentence: String
let reason: String
let is_corrected: Bool
let isCorrected: Bool
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ struct CorrentionsData: Codable {
}

extension DetailDiaryResponse {
static let empty = DetailDiaryResponse(diaryId: 0, topic: "", content: "", createdAt: "", username: "", corrections: [CoachingResponse(original_sentence: "", corrected_sentence: "", reason: "", is_corrected: true)], correctionCount: 3, correctionMaxCount: 3)
static let empty = DetailDiaryResponse(diaryId: 0, topic: "", content: "", createdAt: "", username: "", corrections: [CoachingResponse(originalSentence: "", correctedSentence: "", reason: "", isCorrected: true)], correctionCount: 3, correctionMaxCount: 3)
}

0 comments on commit 016b4ef

Please sign in to comment.