/** * 타자 대결 text bank (docs/games/typing.md §4). Every topic belongs to one language and one category: * - word: single words, one per item; * - short: one sentence per item; * - long: a whole text, typed line by line (long lines are wrapped at spaces, `wrapLines`). * Poems and songs are public domain (the authors died more than 70 years ago, 애국가 is the national anthem); * the fables are the site's own retellings. Only characters on a plain keyboard (no hanja, curly quotes or dashes). */ export type Lang = 'ko' | 'en'; export type Category = 'word' | 'short' | 'long'; export interface Topic { id: string; lang: Lang; cat: Category; /** Name in the settings ("과일", "애국가"). */ name: string; /** Shown under a long text (author / source). */ by?: string; /** word / short: the items. long: the lines of the text in order. */ items: readonly string[]; } const words = (s: string) => s.trim().split(/\s+/); const lines = (s: string) => s .split('\n') .map((l) => l.trim()) .filter(Boolean); export const TOPICS: readonly Topic[] = [ // ---------------------------------------------------------------- 한국어 단어 { id: 'ko-fruit', lang: 'ko', cat: 'word', name: '과일', items: words(`사과 바나나 딸기 포도 수박 참외 복숭아 자두 살구 체리 키위 망고 파인애플 귤 오렌지 레몬 라임 자몽 감 곶감 배 석류 무화과 블루베리 라즈베리 앵두 매실 유자 한라봉 천혜향 멜론 코코넛 아보카도 두리안 리치 용과 대추 모과 오디 크랜베리 파파야 구아바 패션프루트 산딸기 청포도 샤인머스캣`), }, { id: 'ko-animal', lang: 'ko', cat: 'word', name: '동물', items: words(`호랑이 사자 코끼리 기린 얼룩말 하마 코뿔소 원숭이 고릴라 침팬지 판다 곰 여우 늑대 사슴 노루 토끼 다람쥐 고슴도치 너구리 수달 비버 캥거루 코알라 펭귄 독수리 부엉이 올빼미 참새 까치 비둘기 앵무새 공작 타조 오리 거위 닭 병아리 강아지 고양이 햄스터 염소 양 소 돼지 말 낙타 거북이 악어 도마뱀 개구리 두꺼비 고래 돌고래 상어 문어 오징어 해파리 불가사리 나비 잠자리 무당벌레 개미 꿀벌 메뚜기 반딧불이`), }, { id: 'ko-veg', lang: 'ko', cat: 'word', name: '채소', items: words(`배추 무 당근 감자 고구마 양파 대파 쪽파 마늘 생강 오이 호박 애호박 가지 토마토 고추 피망 파프리카 시금치 상추 깻잎 양배추 브로콜리 콜리플라워 셀러리 아스파라거스 옥수수 콩나물 숙주 버섯 표고버섯 느타리 팽이버섯 연근 우엉 도라지 더덕 고사리 미나리 부추 냉이 달래 쑥 케일 비트 청경채`), }, { id: 'ko-country', lang: 'ko', cat: 'word', name: '나라', items: words(`대한민국 일본 중국 대만 몽골 베트남 태국 필리핀 인도네시아 말레이시아 싱가포르 인도 네팔 파키스탄 이란 이라크 튀르키예 이집트 케냐 나이지리아 남아프리카공화국 모로코 프랑스 독일 영국 이탈리아 스페인 포르투갈 네덜란드 벨기에 스위스 오스트리아 스웨덴 노르웨이 핀란드 덴마크 폴란드 그리스 러시아 우크라이나 미국 캐나다 멕시코 브라질 아르헨티나 칠레 페루 콜롬비아 쿠바 호주 뉴질랜드`), }, { id: 'ko-food', lang: 'ko', cat: 'word', name: '음식', items: words(`김치찌개 된장찌개 순두부찌개 부대찌개 비빔밥 불고기 갈비찜 삼겹살 떡볶이 김밥 라면 냉면 칼국수 수제비 잡채 김치전 파전 만두 순대 어묵 삼계탕 설렁탕 갈비탕 미역국 떡국 육개장 감자탕 닭갈비 족발 보쌈 짜장면 짬뽕 탕수육 볶음밥 오므라이스 돈가스 카레 초밥 우동 피자 햄버거 스파게티 샌드위치 샐러드 붕어빵 호떡 팥빙수 약과 송편 식혜`), }, { id: 'ko-job', lang: 'ko', cat: 'word', name: '직업', items: words(`의사 간호사 약사 선생님 교수 경찰관 소방관 군인 변호사 판사 검사 기자 작가 화가 가수 배우 감독 요리사 제빵사 농부 어부 목수 미용사 디자이너 건축가 과학자 연구원 프로그래머 비행기조종사 승무원 운전기사 택배기사 우체부 은행원 회계사 수의사 사진작가 통역사 번역가 아나운서 운동선수 코치 사서 상담사 정원사 바리스타`), }, { id: 'ko-sport', lang: 'ko', cat: 'word', name: '스포츠', items: words(`축구 야구 농구 배구 탁구 테니스 배드민턴 골프 볼링 당구 수영 다이빙 육상 마라톤 체조 태권도 유도 검도 씨름 복싱 레슬링 펜싱 양궁 사격 역도 스키 스노보드 스케이트 컬링 아이스하키 핸드볼 럭비 하키 승마 조정 카누 서핑 요트 클라이밍 사이클 철인삼종 피구 족구 줄넘기`), }, { id: 'ko-idiom', lang: 'ko', cat: 'word', name: '사자성어', items: words(`일석이조 다다익선 동문서답 이심전심 오리무중 우왕좌왕 자업자득 작심삼일 전화위복 죽마고우 천고마비 청출어람 토사구팽 팔방미인 표리부동 학수고대 함흥차사 호시탐탐 고진감래 과유불급 금상첨화 대기만성 마이동풍 백문불여일견 사필귀정 새옹지마 십시일반 아전인수 역지사지 온고지신 유비무환 일취월장 일편단심 적반하장 조삼모사 진퇴양난 칠전팔기 타산지석 동고동락 일거양득`), }, // ---------------------------------------------------------------- 한국어 짧은글 { id: 'ko-proverb', lang: 'ko', cat: 'short', name: '속담', items: lines(` 가는 말이 고와야 오는 말이 곱다. 낮말은 새가 듣고 밤말은 쥐가 듣는다. 천 리 길도 한 걸음부터. 세 살 버릇 여든까지 간다. 소 잃고 외양간 고친다. 원숭이도 나무에서 떨어질 때가 있다. 말 한마디로 천 냥 빚을 갚는다. 티끌 모아 태산. 백지장도 맞들면 낫다. 고래 싸움에 새우 등 터진다. 돌다리도 두들겨 보고 건너라. 바늘 도둑이 소도둑 된다. 콩 심은 데 콩 나고 팥 심은 데 팥 난다. 등잔 밑이 어둡다. 호랑이도 제 말 하면 온다. 호랑이에게 물려 가도 정신만 차리면 산다. 우물을 파도 한 우물을 파라. 하늘이 무너져도 솟아날 구멍이 있다. 벼는 익을수록 고개를 숙인다. 빈 수레가 요란하다. 개구리 올챙이 적 생각 못 한다. 누워서 떡 먹기. 식은 죽 먹기. 가랑비에 옷 젖는 줄 모른다. 발 없는 말이 천 리 간다. 아니 땐 굴뚝에 연기 날까. 오르지 못할 나무는 쳐다보지도 마라. 윗물이 맑아야 아랫물이 맑다. 사공이 많으면 배가 산으로 간다. 서당 개 삼 년이면 풍월을 읊는다. 쥐구멍에도 볕 들 날 있다. 구슬이 서 말이라도 꿰어야 보배다. 금강산도 식후경. 될성부른 나무는 떡잎부터 알아본다. 믿는 도끼에 발등 찍힌다. 남의 떡이 더 커 보인다. 도토리 키 재기. 똥 묻은 개가 겨 묻은 개 나무란다. 열 번 찍어 안 넘어가는 나무 없다. 작은 고추가 더 맵다. 시작이 반이다. 백 번 듣는 것이 한 번 보는 것만 못하다. 얌전한 고양이가 부뚜막에 먼저 올라간다. 우는 아이 젖 준다. 제 눈에 안경. 공든 탑이 무너지랴. 꿩 먹고 알 먹는다. 번갯불에 콩 볶아 먹겠다. 산 넘어 산이다. 목마른 사람이 우물 판다. `), }, { id: 'ko-quote', lang: 'ko', cat: 'short', name: '명언', items: lines(` 아는 것이 힘이다. 나는 생각한다, 그러므로 나는 존재한다. 시간은 금이다. 내일 지구가 멸망할지라도 나는 오늘 한 그루의 사과나무를 심겠다. 배우고 때때로 익히면 또한 기쁘지 아니한가. 아는 것을 안다고 하고 모르는 것을 모른다고 하는 것이 아는 것이다. 천재는 1퍼센트의 영감과 99퍼센트의 노력으로 이루어진다. 실패는 성공의 어머니이다. 오늘 할 일을 내일로 미루지 마라. 너 자신을 알라. 인생은 짧고 예술은 길다. 펜은 칼보다 강하다. 행복은 습관이다, 그것을 몸에 지녀라. 가장 큰 영광은 한 번도 실패하지 않음이 아니라 실패할 때마다 다시 일어서는 데 있다. 세 사람이 길을 가면 그중에 반드시 나의 스승이 있다. 배움에는 왕도가 없다. 늦었다고 생각할 때가 가장 빠를 때이다. 꿈을 꿀 수 있다면 그 꿈을 이룰 수도 있다. 한 번의 실패와 영원한 실패를 혼동하지 마라. 건강한 몸에 건강한 정신이 깃든다. 지금 이 순간을 즐겨라. 작은 기회로부터 종종 위대한 업적이 시작된다. 평생 살 것처럼 꿈을 꾸고 내일 죽을 것처럼 오늘을 살아라. 노력은 배신하지 않는다. 웃음은 마음의 보약이다. `), }, { id: 'ko-twister', lang: 'ko', cat: 'short', name: '잰말놀이', items: lines(` 간장 공장 공장장은 강 공장장이고 된장 공장 공장장은 공 공장장이다. 내가 그린 기린 그림은 잘 그린 기린 그림이다. 저기 있는 말뚝이 말 맬 말뚝이냐 말 못 맬 말뚝이냐. 경찰청 쇠창살 외철창살 검찰청 쇠창살 쌍철창살. 들의 콩깍지는 깐 콩깍지인가 안 깐 콩깍지인가. 앞집 팥죽은 붉은 팥 풋팥죽이고 뒷집 콩죽은 햇콩 단콩 콩죽이다. 한영양장점 옆 한양양장점, 한양양장점 옆 한영양장점. 저 분은 백 법학박사이고 이 분은 박 법학박사이다. 상표 붙은 큰 깡통은 깐 깡통인가 안 깐 깡통인가. 작은 토끼 토끼 통 옆 큰 토끼 토끼 통. 중앙청 창살은 쌍창살이고 시청의 창살은 외창살이다. 서울 특허 허가과 허가과장 허과장. 철수 책상 철 책상, 영희 책상 쇠 책상. 신진 샹송 가수의 신춘 샹송 쇼. 고려고 교복은 고급 교복이고 고려고 교복은 고급 원단을 사용했다. `), }, { id: 'ko-daily', lang: 'ko', cat: 'short', name: '일상 문장', items: lines(` 오늘 점심은 뭘 먹을까요? 주말에 같이 영화 보러 갈래요? 창밖에 첫눈이 소복소복 내리고 있어요. 버스가 생각보다 일찍 와서 다행이에요. 따뜻한 차 한잔 마시면서 쉬어 가요. 내일은 아침 일찍 일어나야 해요. 강아지가 꼬리를 흔들며 반겨 줘요. 도서관에서 재미있는 책을 빌렸어요. 비가 오니까 우산을 꼭 챙기세요. 생일 축하해요, 행복한 하루 보내세요! 공원에 벚꽃이 활짝 피었어요. 배가 고파서 라면을 끓여 먹었어요. 오랜만에 친구에게 전화를 걸었어요. 시험이 끝나서 마음이 홀가분해요. 이번 여름에는 바다로 여행을 가요. 엘리베이터가 고장 나서 계단으로 올라갔어요. 할머니 댁 마당에 감나무가 있어요. 새로 산 운동화가 아주 편해요. 밤하늘에 별이 반짝반짝 빛나요. 오늘도 수고 많으셨습니다. 아침마다 동네를 한 바퀴 달려요. 냉장고에 우유가 다 떨어졌어요. 다음 역은 시청, 시청역입니다. 천천히 하나씩 해 보면 돼요. 고마운 마음을 담아 편지를 썼어요. `), }, // ---------------------------------------------------------------- 한국어 긴글 { id: 'ko-anthem', lang: 'ko', cat: 'long', name: '애국가', by: '대한민국 국가', items: lines(` 동해 물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세 무궁화 삼천리 화려 강산 대한 사람 대한으로 길이 보전하세 남산 위에 저 소나무 철갑을 두른 듯 바람 서리 불변함은 우리 기상일세 무궁화 삼천리 화려 강산 대한 사람 대한으로 길이 보전하세 가을 하늘 공활한데 높고 구름 없이 밝은 달은 우리 가슴 일편단심일세 무궁화 삼천리 화려 강산 대한 사람 대한으로 길이 보전하세 이 기상과 이 맘으로 충성을 다하여 괴로우나 즐거우나 나라 사랑하세 무궁화 삼천리 화려 강산 대한 사람 대한으로 길이 보전하세 `), }, { id: 'ko-stars', lang: 'ko', cat: 'long', name: '별 헤는 밤', by: '윤동주', items: lines(` 계절이 지나가는 하늘에는 가을로 가득 차 있습니다. 나는 아무 걱정도 없이 가을 속의 별들을 다 헤일 듯합니다. 가슴속에 하나 둘 새겨지는 별을 이제 다 못 헤는 것은 쉬이 아침이 오는 까닭이요, 내일 밤이 남은 까닭이요, 아직 나의 청춘이 다하지 않은 까닭입니다. 별 하나에 추억과 별 하나에 사랑과 별 하나에 쓸쓸함과 별 하나에 동경과 별 하나에 시와 별 하나에 어머니, 어머니, 어머님, 나는 별 하나에 아름다운 말 한마디씩 불러 봅니다. 소학교 때 책상을 같이 했던 아이들의 이름과, 패, 경, 옥 이런 이국 소녀들의 이름과, 벌써 아기 어머니 된 계집애들의 이름과, 가난한 이웃 사람들의 이름과, 비둘기, 강아지, 토끼, 노새, 노루, 프랑시스 잠, 라이너 마리아 릴케 이런 시인의 이름을 불러 봅니다. 이네들은 너무나 멀리 있습니다. 별이 아슬히 멀듯이, 어머님, 그리고 당신은 멀리 북간도에 계십니다. 나는 무엇인지 그리워 이 많은 별빛이 내린 언덕 위에 내 이름자를 써 보고, 흙으로 덮어 버리었습니다. 딴은 밤을 새워 우는 벌레는 부끄러운 이름을 슬퍼하는 까닭입니다. 그러나 겨울이 지나고 나의 별에도 봄이 오면 무덤 위에 파란 잔디가 피어나듯이 내 이름자 묻힌 언덕 위에도 자랑처럼 풀이 무성할 거외다. `), }, { id: 'ko-prologue', lang: 'ko', cat: 'long', name: '서시', by: '윤동주', items: lines(` 죽는 날까지 하늘을 우러러 한 점 부끄럼이 없기를, 잎새에 이는 바람에도 나는 괴로워했다. 별을 노래하는 마음으로 모든 죽어 가는 것을 사랑해야지 그리고 나한테 주어진 길을 걸어가야겠다. 오늘 밤에도 별이 바람에 스치운다. `), }, { id: 'ko-azalea', lang: 'ko', cat: 'long', name: '진달래꽃', by: '김소월', items: lines(` 나 보기가 역겨워 가실 때에는 말없이 고이 보내 드리우리다. 영변에 약산 진달래꽃 아름 따다 가실 길에 뿌리우리다. 가시는 걸음걸음 놓인 그 꽃을 사뿐히 즈려밟고 가시옵소서. 나 보기가 역겨워 가실 때에는 죽어도 아니 눈물 흘리우리다. `), }, { id: 'ko-mountain-flower', lang: 'ko', cat: 'long', name: '산유화', by: '김소월', items: lines(` 산에는 꽃 피네 꽃이 피네 갈 봄 여름 없이 꽃이 피네 산에 산에 피는 꽃은 저만치 혼자서 피어 있네 산에서 우는 작은 새요 꽃이 좋아 산에서 사노라네 산에는 꽃 지네 꽃이 지네 갈 봄 여름 없이 꽃이 지네 `), }, { id: 'ko-silence', lang: 'ko', cat: 'long', name: '님의 침묵', by: '한용운', items: lines(` 님은 갔습니다. 아아, 사랑하는 나의 님은 갔습니다. 푸른 산빛을 깨치고 단풍나무 숲을 향하여 난 작은 길을 걸어서 차마 떨치고 갔습니다. 황금의 꽃같이 굳고 빛나던 옛 맹세는 차디찬 티끌이 되어서 한숨의 미풍에 날아갔습니다. 날카로운 첫 키스의 추억은 나의 운명의 지침을 돌려 놓고 뒷걸음쳐서 사라졌습니다. 나는 향기로운 님의 말소리에 귀먹고 꽃다운 님의 얼굴에 눈멀었습니다. 사랑도 사람의 일이라 만날 때에 미리 떠날 것을 염려하고 경계하지 아니한 것은 아니지만, 이별은 뜻밖의 일이 되고 놀란 가슴은 새로운 슬픔에 터집니다. 그러나 이별을 쓸데없는 눈물의 원천을 만들고 마는 것은 스스로 사랑을 깨치는 것인 줄 아는 까닭에, 걷잡을 수 없는 슬픔의 힘을 옮겨서 새 희망의 정수박이에 들이부었습니다. 우리는 만날 때에 떠날 것을 염려하는 것과 같이 떠날 때에 다시 만날 것을 믿습니다. 아아, 님은 갔지마는 나는 님을 보내지 아니하였습니다. 제 곡조를 못 이기는 사랑의 노래는 님의 침묵을 휩싸고 돕니다. `), }, { id: 'ko-hunmin', lang: 'ko', cat: 'long', name: '훈민정음 서문', by: '세종대왕(현대어 풀이)', items: lines(` 나랏말이 중국과 달라 한자와는 서로 통하지 아니하므로, 어리석은 백성이 말하고자 하는 바가 있어도 마침내 제 뜻을 능히 펴지 못하는 사람이 많다. 내가 이를 불쌍히 여겨 새로 스물여덟 자를 만드니, 사람마다 하여금 쉽게 익혀 날마다 씀에 편안하게 하고자 할 따름이다. `), }, { id: 'ko-heungbu', lang: 'ko', cat: 'long', name: '흥부와 놀부', by: '전래 동화(이 사이트에서 다시 씀)', items: lines(` 옛날 어느 마을에 욕심 많은 형 놀부와 마음씨 착한 아우 흥부가 살았어요. 부모님이 돌아가시자 놀부는 재산을 모두 차지하고 흥부네 식구를 내쫓았어요. 흥부는 가난했지만 늘 웃으며 부지런히 일했어요. 어느 봄날, 흥부는 다리가 부러진 제비 한 마리를 정성껏 고쳐 주었어요. 이듬해 돌아온 제비는 박씨 하나를 물어다 주었어요. 가을이 되어 커다란 박을 타 보니 쌀과 비단과 금은보화가 쏟아져 나왔어요. 소문을 들은 놀부는 일부러 제비 다리를 부러뜨리고 고쳐 주는 척했어요. 놀부가 받은 박을 타자 도깨비와 똥물이 쏟아져 나와 집이 엉망이 되었어요. 흥부는 빈털터리가 된 형을 따뜻하게 맞아 주었고, 놀부는 잘못을 뉘우치고 형제가 사이좋게 살았답니다. `), }, { id: 'ko-sun-moon', lang: 'ko', cat: 'long', name: '해님 달님', by: '전래 동화(이 사이트에서 다시 씀)', items: lines(` 깊은 산골에 엄마와 오누이가 살았어요. 떡을 팔고 돌아오던 엄마 앞에 호랑이가 나타났어요. 떡 하나 주면 안 잡아먹지! 호랑이는 떡을 모두 빼앗고 엄마까지 잡아먹었어요. 호랑이는 엄마 옷을 입고 오누이가 사는 집에 찾아갔어요. 문틈으로 내민 털북숭이 손을 보고 오누이는 호랑이인 것을 알아챘어요. 오누이는 뒷문으로 빠져나가 우물가 나무 위로 올라갔어요. 하느님, 저희를 살려 주시려거든 튼튼한 동아줄을 내려 주세요. 하늘에서 내려온 동아줄을 잡고 오누이는 하늘로 올라갔어요. 뒤따라 썩은 동아줄을 잡은 호랑이는 수수밭에 떨어지고 말았어요. 그 뒤 오빠는 달이 되고 누이는 해가 되어 세상을 밝게 비추었답니다. `), }, { id: 'ko-tortoise', lang: 'ko', cat: 'long', name: '토끼와 거북', by: '이솝 우화(이 사이트에서 다시 씀)', items: lines(` 발이 빠른 토끼는 느림보 거북을 늘 놀려 댔어요. 참다못한 거북이 말했어요. 그럼 저 언덕까지 달리기 시합을 하자. 출발하자마자 토끼는 저만치 앞서 나갔어요. 뒤를 돌아보니 거북은 아직 출발선 근처에서 엉금엉금 기고 있었어요. 토끼는 나무 그늘에 누워 한숨 자고 가도 이기겠다고 생각했어요. 그사이 거북은 한 번도 쉬지 않고 한 걸음 한 걸음 걸어갔어요. 잠에서 깬 토끼가 허둥지둥 뛰어갔지만 거북은 벌써 언덕 위에 있었어요. 꾸준히 노력하는 사람이 끝내 이긴다는 이야기랍니다. `), }, // ---------------------------------------------------------------- English words { id: 'en-fruit', lang: 'en', cat: 'word', name: 'Fruits', items: words(`apple banana cherry grape lemon lime mango melon orange peach pear plum kiwi papaya pineapple strawberry blueberry raspberry blackberry watermelon apricot coconut fig guava lychee nectarine olive pomegranate tangerine cranberry avocado date grapefruit persimmon quince`), }, { id: 'en-animal', lang: 'en', cat: 'word', name: 'Animals', items: words(`tiger lion elephant giraffe zebra hippo rhino monkey gorilla panda bear fox wolf deer rabbit squirrel hedgehog raccoon otter beaver kangaroo koala penguin eagle owl sparrow parrot peacock ostrich duck goose chicken puppy kitten hamster goat sheep cow pig horse camel turtle crocodile lizard frog whale dolphin shark octopus squid jellyfish butterfly dragonfly ladybug ant bee`), }, { id: 'en-color', lang: 'en', cat: 'word', name: 'Colors', items: words(`red orange yellow green blue purple pink brown black white gray silver gold navy beige ivory maroon violet indigo turquoise crimson scarlet lavender olive teal coral peach mint lemon cream`), }, { id: 'en-country', lang: 'en', cat: 'word', name: 'Countries', items: words(`Korea Japan China Mongolia Vietnam Thailand Philippines Indonesia Malaysia Singapore India Nepal Pakistan Iran Iraq Egypt Kenya Nigeria Morocco France Germany England Italy Spain Portugal Netherlands Belgium Switzerland Austria Sweden Norway Finland Denmark Poland Greece Russia Ukraine Canada Mexico Brazil Argentina Chile Peru Colombia Cuba Australia`), }, { id: 'en-food', lang: 'en', cat: 'word', name: 'Food', items: words(`pizza burger pasta salad sandwich noodles rice bread cheese butter cookie cake muffin pancake waffle donut bagel cereal yogurt omelet sausage bacon steak chicken soup curry taco burrito sushi dumpling popcorn pretzel chocolate candy pudding pie toast honey jam`), }, { id: 'en-job', lang: 'en', cat: 'word', name: 'Jobs', items: words(`doctor nurse teacher farmer pilot police firefighter soldier lawyer judge reporter writer painter singer actor dancer chef baker carpenter plumber barber designer architect scientist engineer programmer driver mailman banker dentist vet photographer librarian coach`), }, { id: 'en-sport', lang: 'en', cat: 'word', name: 'Sports', items: words(`soccer baseball basketball volleyball tennis badminton golf bowling swimming diving running marathon boxing wrestling fencing archery skiing skating hockey rugby cricket cycling surfing sailing rowing climbing karate judo taekwondo gymnastics`), }, // ---------------------------------------------------------------- English short { id: 'en-proverb', lang: 'en', cat: 'short', name: 'Proverbs', items: lines(` Actions speak louder than words. All that glitters is not gold. A picture is worth a thousand words. Better late than never. The early bird catches the worm. Practice makes perfect. Rome was not built in a day. When in Rome, do as the Romans do. Where there is a will, there is a way. Two heads are better than one. Every cloud has a silver lining. Honesty is the best policy. Look before you leap. Time flies like an arrow. No pain, no gain. Easy come, easy go. Knowledge is power. A friend in need is a friend indeed. Do not judge a book by its cover. Do not count your chickens before they hatch. Birds of a feather flock together. The pen is mightier than the sword. An apple a day keeps the doctor away. Slow and steady wins the race. Laughter is the best medicine. Necessity is the mother of invention. Still waters run deep. Absence makes the heart grow fonder. There is no place like home. You cannot have your cake and eat it too. Too many cooks spoil the broth. Out of sight, out of mind. Curiosity killed the cat. Great minds think alike. The grass is always greener on the other side. Do not put all your eggs in one basket. It is no use crying over spilt milk. Strike while the iron is hot. Beauty is in the eye of the beholder. A journey of a thousand miles begins with a single step. `), }, { id: 'en-quote', lang: 'en', cat: 'short', name: 'Famous quotes', items: lines(` I think, therefore I am. Know thyself. To be, or not to be, that is the question. Genius is one percent inspiration and ninety-nine percent perspiration. Well done is better than well said. An investment in knowledge pays the best interest. Life is really simple, but we insist on making it complicated. The only thing we have to fear is fear itself. Imagination is more important than knowledge. It does not matter how slowly you go as long as you do not stop. Whatever you are, be a good one. In the middle of difficulty lies opportunity. Be yourself; everyone else is already taken. Simplicity is the ultimate sophistication. The best way out is always through. Turn your face to the sun and the shadows fall behind you. Fortune favors the bold. Happiness depends upon ourselves. Brevity is the soul of wit. All the world's a stage. `), }, { id: 'en-twister', lang: 'en', cat: 'short', name: 'Tongue twisters', items: lines(` She sells seashells by the seashore. Peter Piper picked a peck of pickled peppers. How much wood would a woodchuck chuck if a woodchuck could chuck wood? Red lorry, yellow lorry, red lorry, yellow lorry. Unique New York, unique New York, you know you need unique New York. Fuzzy Wuzzy was a bear. Fuzzy Wuzzy had no hair. I scream, you scream, we all scream for ice cream. A big black bug bit a big black bear. Six slippery snails slid slowly seaward. Fred fed Ted bread, and Ted fed Fred bread. Toy boat, toy boat, toy boat. Betty Botter bought some butter, but she said the butter's bitter. Can you can a can as a canner can can a can? Which witch switched the Swiss wristwatches? Eleven benevolent elephants. `), }, { id: 'en-pangram', lang: 'en', cat: 'short', name: 'Pangrams', items: lines(` The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs. How vexingly quick daft zebras jump! Sphinx of black quartz, judge my vow. The five boxing wizards jump quickly. Jackdaws love my big sphinx of quartz. Bright vixens jump; dozy fowl quack. Waltz, bad nymph, for quick jigs vex. Quick zephyrs blow, vexing daft Jim. Crazy Fredrick bought many very exquisite opal jewels. `), }, // ---------------------------------------------------------------- English long { id: 'en-gettysburg', lang: 'en', cat: 'long', name: 'Gettysburg Address', by: 'Abraham Lincoln, 1863', items: lines(` Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this. But, in a larger sense, we can not dedicate, we can not consecrate, we can not hallow this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us, that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion, that we here highly resolve that these dead shall not have died in vain, that this nation, under God, shall have a new birth of freedom, and that government of the people, by the people, for the people, shall not perish from the earth. `), }, { id: 'en-road', lang: 'en', cat: 'long', name: 'The Road Not Taken', by: 'Robert Frost, 1916', items: lines(` Two roads diverged in a yellow wood, And sorry I could not travel both And be one traveler, long I stood And looked down one as far as I could To where it bent in the undergrowth; Then took the other, as just as fair, And having perhaps the better claim, Because it was grassy and wanted wear; Though as for that the passing there Had worn them really about the same, And both that morning equally lay In leaves no step had trodden black. Oh, I kept the first for another day! Yet knowing how way leads on to way, I doubted if I should ever come back. I shall be telling this with a sigh Somewhere ages and ages hence: Two roads diverged in a wood, and I, I took the one less traveled by, And that has made all the difference. `), }, { id: 'en-sonnet18', lang: 'en', cat: 'long', name: 'Sonnet 18', by: 'William Shakespeare', items: lines(` Shall I compare thee to a summer's day? Thou art more lovely and more temperate: Rough winds do shake the darling buds of May, And summer's lease hath all too short a date; Sometime too hot the eye of heaven shines, And often is his gold complexion dimm'd; And every fair from fair sometime declines, By chance or nature's changing course untrimm'd; But thy eternal summer shall not fade, Nor lose possession of that fair thou ow'st; Nor shall Death brag thou wander'st in his shade, When in eternal lines to time thou grow'st: So long as men can breathe or eyes can see, So long lives this, and this gives life to thee. `), }, { id: 'en-daffodils', lang: 'en', cat: 'long', name: 'Daffodils', by: 'William Wordsworth', items: lines(` I wandered lonely as a cloud That floats on high o'er vales and hills, When all at once I saw a crowd, A host, of golden daffodils; Beside the lake, beneath the trees, Fluttering and dancing in the breeze. Continuous as the stars that shine And twinkle on the milky way, They stretched in never-ending line Along the margin of a bay: Ten thousand saw I at a glance, Tossing their heads in sprightly dance. `), }, { id: 'en-twinkle', lang: 'en', cat: 'long', name: 'Twinkle, Twinkle, Little Star', by: 'Jane Taylor, 1806', items: lines(` Twinkle, twinkle, little star, How I wonder what you are! Up above the world so high, Like a diamond in the sky. When the blazing sun is gone, When he nothing shines upon, Then you show your little light, Twinkle, twinkle, all the night. Twinkle, twinkle, little star, How I wonder what you are! `), }, { id: 'en-preamble', lang: 'en', cat: 'long', name: 'US Constitution Preamble', by: '1787', items: lines(` We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America. `), }, { id: 'en-hare', lang: 'en', cat: 'long', name: 'The Tortoise and the Hare', by: "Aesop's fable (retold for this site)", items: lines(` A hare was always laughing at a tortoise for being so slow. One day the tortoise said, "Let us race to the top of that hill." The hare laughed and agreed, and the race began. In no time the hare was far ahead, and the tortoise was barely past the start. "I have plenty of time," thought the hare, and he lay down under a tree for a nap. Meanwhile the tortoise kept walking, one small step after another, without ever stopping. When the hare woke up and dashed to the hill, the tortoise was already waiting at the top. Slow and steady wins the race. `), }, ]; export const TOPIC_BY_ID: Readonly> = Object.fromEntries(TOPICS.map((t) => [t.id, t])); export const topicsFor = (lang: Lang, cat: Category): Topic[] => TOPICS.filter((t) => t.lang === lang && t.cat === cat); /** Longest line typed at once (long texts): Korean lines are wider on screen than English ones. */ export const MAX_LINE: Readonly> = { ko: 34, en: 52 }; /** Breaks a long line at spaces so each piece fits in one row of the typing box (greedy, words are never split). */ export function wrapLine(line: string, max: number): string[] { if (line.length <= max) return [line]; const out: string[] = []; let cur = ''; for (const w of line.split(' ')) { if (!cur) cur = w; else if (cur.length + 1 + w.length <= max) cur += ` ${w}`; else { out.push(cur); cur = w; } } if (cur) out.push(cur); return out; } export const wrapLines = (items: readonly string[], lang: Lang): string[] => items.flatMap((l) => wrapLine(l, MAX_LINE[lang]));