対称éè¨ã£ã¦ãªããªã®ã
Looker ã®å¯¾ç§°éè¨ã¨ããæ©è½ãæ°ã«ãªã£ã¦ããã®ã ããã©ãããã¾ãã¡ããåãã£ã¦ããªããæ¤ç´¢ãã¦ããã¾ãé¢é£ããæç®ãè¦ã¤ãããªããããªãã§å¯¾ç§°éè¨ã¨ããååãªã®ããåãããªãããã¼ã¿ã¦ã§ã¢ãã¦ã¹ã§ãéæ£è¦åããããã¼ã¿ã®ä¸ã§éè¨ãããæã«ä½¿ããæ¦å¿µãªã®ã ã¨ã¯æãã®ã ããã©ãã
ã¨ãããããå®é¨ãã¦ã¿ããLookerã®ããã¥ã¡ã³ãã«è¼ã£ã¦ãããã¼ã¿ä¾ãErqã§åãè¾¼ããï¼å¾ã ã®ããããã¼ã¿ã追å ãã¦ãããï¼
load table orders(order_id integer, user_id integer, total real, order_date text) from ```csv 1 100 50.36 2017-12-01 2 101 24.12 2017-12-02 3 137 50.36 2017-12-02 4 100 59.68 2017-12-03 ``` delimiter E'\t';; load table order_item(order_id integer, item_id integer, quantity integer, unit_price real) from ```csv 1 50 1 23.00 1 63 2 13.68 2 63 1 13.68 2 72 1 5.08 2 79 1 5.36 3 78 1 50.36 4 50 2 23.00 4 63 1 13.68 ``` delimiter E'\t';; table data = orders join order_item using (order_id);;
注æã®åè¨éé¡ã¯ç°¡åã«è¨ç®ã§ããã
erq> orders {sum(total)};; select sum(total) from orders ["sum(total)"] [184.52] 1 row (0.001s)
ä¸æ¹ã§ãçµåæ¸ã¿ã®ãã¼ã¿ã使ã£ã¦åè¨éé¡ãè¨ç®ãããã¨ããã¨ãæ£ããè¨ç®ã§ããªãã表ãçµåãããã¨ãã«ãordersãã¼ãã«ã®åè¡ãè¤è£½ããã¦ããããã ã
erq> data {sum(total)};; select sum(total) from data ["sum(total)"] [342.8] 1 row (0.001s)
ããã§ãordersãã¼ãã«ã®ãã¼ã使ã£ã¦ããã¾ããã¨ããå¿ è¦ãããã
ã²ã¨ã¤ã®æ¹æ³ã¯ãåè¨ããå¤ã«ããæãã«ãã¼ã®æ å ±ãåãè¾¼ã¿ãsum distincté¢æ°ã使ã£ã¦éç´ãè¡ããã¨ã ãããã§ã¯ãåç´ã«ãorder_idã®å¤ã10000åãããã®ãtotalã«å ãããã¨ã§ããã¼ã®æ å ±ãåãè¾¼ãã§ãããæå¾ã«ãorder_idã ãã®sum distinctçµæãå¼ãã°ãorder_idã§åºå¥ãããtotalã®åè¨ã«ãªãã¯ãã ã
erq> data {sum(distinct total + order_id * 10000) - sum(distinct order_id * 10000)};; select sum(distinct total + order_id * 10000) - sum(distinct order_id * 10000) from data ["sum(distinct total + order_id * 10000) - sum(distinct order_id * 10000)"] [184.52000000000407] 1 row (0.000s)
çµæã¯ãæãããã¨ã«ãªã£ã¦ãã¾ã£ããSQLiteã§ã¯æµ®åå°æ°ç¹æ°ã使ã£ã¦ããããã«ã大ããæ°ã使ã£ã¦æ å ±ãåãè¾¼ãã¨ãè¨ç®ãããtotalã®åè¨å¤ã«ã¯å¤§ããªèª¤å·®ãåºã¦ãã¾ãã
éã«ãå°æ°ç¹ä»¥ä¸ã«åãè¾¼ãã¨ã誤差ã¯ãã·ã«ãªããï¼ãããããéé¡ã®è¨ç®ã«æµ®åå°æ°ç¹æ°ã使ããã¨èªä½ãé¿ããã¹ãã ããããï¼
erq> data {sum(distinct total + order_id * 1e-10) - sum(distinct order_id * 1e-10)};; select sum(distinct total + order_id * 1e-10) - sum(distinct order_id * 1e-10) from data ["sum(distinct total + order_id * 1e-10) - sum(distinct order_id * 1e-10)"] [184.52] 1 row (0.000s)
idãåç´ã«å®æ°åãã¦è¶³ã代ããã«ãããã·ã¥é¢æ°ã«éããªã©ãè¤éãªå¤æãè¡ããã¨ãã§ããããç°ãªããã¼ã®å¤ãå¶ç¶è¡çªããªãããã«åãè¾¼ãããªããæ¹æ³ã¯ã©ããã£ã¦ãããããã ãå ã»ã©ã®ä¾ã®ããã«ã誤差ããªã¼ãã¼ããã¼ã»ã¢ã³ãã¼ããã¼ã«ã¯æ°ãä»ããå¿ è¦ããããã¾ãããã¼ãåãè¾¼ãã å¤ãéç´ãããã¨ã§ãåãè¾¼ãã ãã¼ã®å½±é¿ãéç´çµæããæã¡æ¶ãè¨ç®ãã§ãããã¨ãããã¨ãå¿ è¦ã ã
ã°ã«ã¼ãåãããå ´åããåãæ¹æ³ã使ãããããã§ã¯ãuser_idã§ã°ã«ã¼ãåãã¦ãåè¨ã¨å¹³åãè¨ç®ãã¦ã¿ãã
erq> data {user_id => sum: sum(distinct total + order_id * 1e-8) - sum(distinct order_id * 1e-8), avg: avg(distinct total + order_id * 1e-8) - avg(distinct order_id * 1e-8)};; select user_id, sum(distinct total + order_id * 1e-8) - sum(distinct order_id * 1e-8) as sum, avg(distinct total + order_id * 1e-8) - avg(distinct order_id * 1e-8) as avg from data group by (user_id) ["user_id","sum","avg"] [100,110.04,55.02] [101,24.12,24.12] [137,50.36,50.36] 3 rows (0.001s)
ã¨ããã§ããµãã¯ã¨ãªã使ããã®ãªãããããªé¢åãªãã¨ãããªãã¦ããä½æ®µéãã«åãã¦éè¨ãè¡ãã°æ¸ã話ã§ã¯ãããéè¨ãããã«ã©ã ãæãåºãã¦ãã¦
erq> data {user_id, order_id, total};; select user_id, order_id, total from data ["user_id","order_id","total"] [100,1,50.36] [100,1,50.36] [101,2,24.12] [101,2,24.12] [101,2,24.12] [137,3,50.36] [100,4,59.68] [100,4,59.68] 8 rows (0.001s)
éè¤ãé¤å¤ãã
erq> data {user_id, order_id, total} distinct;; select distinct user_id, order_id, total from data ["user_id","order_id","total"] [100,1,50.36] [101,2,24.12] [137,3,50.36] [100,4,59.68] 4 rows (0.001s)
ãã¨ã¯ããããéè¨ããã°ããã
erq> data {user_id, order_id, total} distinct {user_id => sum: sum(total), avg: avg(total)};; select user_id, sum(total) as sum, avg(total) as avg from (select distinct user_id, order_id, total from data) group by (user_id) ["user_id","sum","avg"] [100,110.03999999999999,55.019999999999996] [101,24.12,24.12] [137,50.36,50.36] 3 rows (0.000s)
ï¼ã¾ãããªãã誤差ãåºã¦ãããã©ãããã¯æµ®åå°æ°ç¹æ°ã®ããã ã¨æãããæ°ã«ããªããã¨ã«ãããï¼
distinctãããªãã¦ãgroup byãã¤ãã£ã¦éè¤é¤å¤ãè¡ãªã£ã¦ãããããã¡ãã®æ¹ããè¡å ¨ä½ã§ã¯ãªããã¼ã®å¤ã ãã使ã£ã¦éè¤ãé¤å¤ããã®ã§ãè¨ç®ããã軽ããããããªãã
erq> data {order_id => user_id, total} {user_id => sum: sum(total), avg: avg(total)};; select user_id, sum(total) as sum, avg(total) as avg from (select order_id, user_id, total from data group by (order_id)) group by (user_id) ["user_id","sum","avg"] [100,110.03999999999999,55.019999999999996] [101,24.12,24.12] [137,50.36,50.36] 3 rows (0.001s)
ï¼SQLiteã§ã¯group byå¥ã§æå®ããã¦ããªãééç´ã«ã©ã ã§ããuser_id, totalã¯ãorder_idã«å¯¾ãã¦é¢æ°å¾å±ã§ããã®ã§ãselectå¥ã«åºã¦ãã¦ãåé¡ããªãã®ã ãããããåãä»ããªãSQLã¨ã³ã¸ã³ã使ã£ã¦ããå ´åã¯ãany_valueéç´é¢æ°ã使ãããé©å½ã«minéç´é¢æ°ã使ããªã©ã®å¯¾å¦ãããå¿ è¦ããããï¼
ã¨ã«ããããµãã¯ã¨ãªã§ group by ã使ã£ã¦éè¤ãé¤å»ãã¦ããæ¹æ³ã¯ç´ ç´ã§åãããããããsumãavgã®ãããªéç´é¢æ°ã®æ§è³ªã«å·¦å³ãããæ±ç¨çãªææ³ãªã®ã§ãç¹ã«å¶ç´ããªããã°ãå¾è ã®å¤æ®µéã®éç´ã使ã£ãæ¹ãããããã«æããBIãã¼ã«ãªã©ã§ã¯ãéç´ã®ãã©ã¼ãããã»æ®µéãåºå®ã§ããã¨ãã£ãå¶ç´ãããããã«ãåè ã®æ¹æ³ã使ããããªãã®ãããããªãã
MDNã«ããã»ãã³ãã£ã¯ã¹ã®èª¬æãç´ããã
ãã®è¨äºã®èª¬æã¯åé¡ãããã®ã§ãã§ããã°ç´ããããç´ããªãGitHubã«issueãåºãã®ãçã ã¨æããããããªãè±èªã§æ¸ãã®ã¯å¤§å¤ãªã®ã§ãã¨ããããæ¥æ¬èªã§åé¡ç¹ãã¾ã¨ãã¦ããã
ããã°ã©ãã³ã°ã§ã¯ãã»ãã³ãã£ã¯ã¹ã¨ã¯ãã³ã¼ãã®æçã®æå³ãæãã¾ãããã¨ãã°ããJavaScript ã§ãã®è¡ãå®è¡ããã¨ãã©ã®ãããªå¹æãããã®ãï¼ããããã® HTML è¦ç´ ã«ã¯ãã©ã®ãããªç®çãå½¹å²ãããã®ãï¼ã (ãã©ã®ããã«è¦ããã®ãï¼ãã§ã¯ãªã)ã
æåã®ããã®èª¬æã¯ãã¨ããããOKã ã¨æããç´°ãã表ç¾ã«ã±ããã¤ãããããããããªããã©ãã»ãã³ãã£ã¯ã¹ã¨ã¯ã³ã¼ãã®æå³ã®ãã¨ã§ããã®éå½¢å¼çãªå®ä½ã¨ãã¦ã¯ãããã°ã©ã ãå®è¡ããéã«èµ·ããã¨ãã§ã¯ãã ã¨ãããããç¹ãã£ã¦ããç®çãå½¹å²ãªã©ã ã¨è¨ããã ãããï¼è¨èªå¦ãªããã§ã¯ãã³ã³ããã¹ãããç¬ç«ããæå³ãèããæå³è«ã¨ãã³ã³ããã¹ãã¨æå³ã®é¢ä¿ãè«ããèªç¨è«ã¨ãåãããããããªãããããã§ã¯ãç¹ã«ä¸¡è ãåºå¥ãã¦ããªããï¼
ãããããã®å¾ã«ã¤ã¥ããJavaScript, CSS, HTMLã®ã»ãã³ãã£ã¯ã¹ã«ã¤ãã¦ã®åå¥ã®èª¬æã¯ãã ãã¶ããããã
JavaScript ã§ã®ã»ãã³ãã£ã¯ã¹
JavaScript ã«ããã¦ãæååã®å¼æ°ãåãããã®æååã
textContent
ã¨ãã<li>
è¦ç´ ãè¿ãé¢æ°ãæ³åãã¦ã¿ã¦ãã ãããbuild('Peach')
ã¾ãã¯createLiWithContent('Peach')
ã¨ããé¢æ°åã®å ´åãä½ãããã®ããç解ããããã«ã³ã¼ããè¦ãå¿ è¦ãããã®ã¯ã©ã¡ãã§ããããï¼
ãã®èª¬æã¯ãã©ããã£ã¦ã³ã¼ãããªã¼ããã«ã«ããããã¨ãã話ããã¦ãããã³ã¼ãã®ãªã¼ãããªãã£ã¯ãã³ã¼ãã®ã»ãã³ãã£ã¯ã¹ã¨ã¯é¢ä¿ããªãã
æåã®èª¬æéããJavaScript ã§ãã®è¡ãå®è¡ããã¨ãã©ã®ãããªå¹æãããã®ãï¼ãã¨ããã®ããJavaScriptã®ã»ãã³ãã£ã¯ã¹ã ãé¢æ°ã®ååãbuild
ã«ããããcreateLiWithContent
ã«ããããaa
ã«ãããããããã¯JavaScriptã§æ¸ãããããã°ã©ã ã®åä½ã«ãã»ã¼å½±é¿ããªã1ãèå¥åã«ã©ãåã¥ãããèªä½ã¯ããã°ã©ã ã®åä½ã«å½±é¿ããªãããã ãããããminifierã®ãããªãã¼ã«ã使ã£ã¦èå¥åãçããã®ã«æ¸ãæãããã¨ã§ãJavaScriptããã°ã©ã ãå°ãããããã¨ãã§ããã
JavaScriptã®ã»ãã³ãã£ã¯ã¹ã¯ã主ã«æ¬¡ã®ãããªææ¸ã§è¦å®ããã¦ããã
- ECMA-262 ECMAScript® 2023 language specification ECMAScript (JavaScript) è¨èªèªä½ã®ã»ãã³ãã£ã¯ã¹ãè¦å®ãã¦ããã
- WHATWG Standards JavaScriptããã¢ã¯ã»ã¹ã§ãã種ã ã®ãã¡ã·ãªãã£ï¼æ©è½ï¼ãè¦å®ããã¦ããã
HTML ã§ã®ã»ãã³ãã£ã¯ã¹
HTMLã®ã»ãã³ãã£ã¯ã¹ã«é¢ãã¦ã¯ãOKãªèª¬æã§ããã¨ã¯æãããã ãææ°ã®HTMLä»æ§ã«åããã説æã«æ¸ããããã¨ããã£ã¨ããã¨æãã
HTMLä»æ§ 1.8 HTML vs XML syntax ã§ãææ¸ãã¢ããªã±ã¼ã·ã§ã³ãè¨è¿°ããæ½è±¡è¨èªã¨ãæ å ±äº¤æç¨ã®å ·ä½æ§æã¨ãã¦ãHTMLæ§æããXMLæ§æããè¦å®ããã¦ããããããã®æ§æã«ãã£ã¦è¨è¿°ãããHTMLææ¸ã¯ããã¡ã¤ã«ã«ä¿åãããããHTTPã§éä¿¡ããããããã
ãããã®HTMLææ¸ã¯ããã©ã¦ã¶ã¼ã§å¦çãããéãã¡ã¢ãªä¸ã§ã¯ããDOM HTMLãã¨ããããæ½è±¡çãªå½¢ã«å¤æããããHTMLæ§æã«ã¤ãã¦ã¯13 The HTML syntaxã§ãXMLæ§æã«ã¤ãã¦ã¯14 The XML syntax ã§ãããããDOM HTMLã«å¤æããæ¹æ³ãè¦å®ããã¦ããã
HTMLã®ã»ãã³ãã£ã¯ã¹ã¯ 3 Semantics, structure, and APIs of HTML documents ã§å®ãããã¦ãããããã¯ãå³å¯ã«è¨ãã°ããã¡ã¤ã«ã«ä¿åããããéä¿¡ããããããHTMLæ§æãXMLæ§æã«å¯¾ãã¦ã§ã¯ãªããããæ½è±¡çãªå é¨è¡¨ç¾ã§ããDOM HTMLã«å¯¾ãã¦ãããããã®è¦ç´ ãå±æ§ãå±æ§å¤ã®ã»ãã³ãã£ã¯ã¹ãè¦å®ãã¦ããã
Elements in the DOM represent things; that is, they have intrinsic meaning, also known as semantics.
For example, an ol element represents an ordered list.
è¦ç´ ã¯ããããããªã«ãç©äº (thing) ãè¡¨ç¾ (represent) ãã¦ããããã¨ãã°ãolè¦ç´ ã¯ãé åºä»ããªã¹ãã表ç¾ãã¦ãããã¨ãããã¨ããä»æ§ã¨ãã¦æ¸ããã¦ããã
ã¾ããHTMLã®åè¦ç´ ã«ã¯APIãå®ç¾©ããã¦ãã¦ããã®APIãä»ãã¦ãè¦ç´ ã®æ©è½ã«é¢ããæä½ããJavaScriptããè¡ããããã¨ãã°ã<button>
è¦ç´ ã¯ãã¿ã³æä½ã«é¢ããAPIãæä¾ãã¦ãããã<video>
è¦ç´ ã¯ãããªåçã«é¢ããAPIãæä¾ãã¦ããããããã£ãAPIã«é¢ããè¦å®ã¯ãä»æ§ã®ãã "intrinsic meaning" ã "semantics" ã¨ããããã¯ãããããã©ã¦ã¶ã¼ä¸ã§å®ç¾ããããã®æ©æ§ã®ãããªãã®ã¨ããããããããJavaScriptã®ãããªããã°ã©ã ã®ãããã°ã©ã ã®æ¯ãèããã»ãã³ãã£ã¯ã¹ã ã¨ããèãããããã°ãDOM HTMLã®APIããä¸ç¨®ã®ã»ãã³ãã£ã¯ã¹ã ã¨èããããã ãããè¨èªçãªãã³ã¼ãã«ãã£ã¦è¡¨ç¾ãããç©äºãæãã»ãã³ãã£ã¯ã¹ã¨ãããã°ã©ã çãªãã³ã¼ãã«ãã£ã¦å®ç¾ãããæ©æ§ã®æ¯ãèããæããã»ãã³ãã£ã¯ã¹ãã®ä¸¡æ¹ããä»æ§ã«è¦å®ããã¦ãããã¨ã«ãªãã
HTMLã®ã»ãã³ãã£ã¯ã¹ã¯ããã©ã¦ã¶ã¼ã®ç»é¢ä¸ã§ã®å ·ä½çãªè¦ãç®ï¼ãã¬ã¼ã³ãã¼ã·ã§ã³ï¼ãè¦å®ãã¦ããªããHTMLã®è¦ãç®ã¯ãHTMLèªä½ã§ã¯ãªããHTMLã«é¢é£ã¥ããããã¹ã¿ã¤ã«ã·ã¼ãã«ãã£ã¦æ±ºã¾ã£ã¦ããã
CSS ã§ã®ã»ãã³ãã£ã¯ã¹
CSS ã«ããã¦ããã¾ãã¾ãªç¨®é¡ã®æç©ã表ãããã«
li
è¦ç´ ã§ãªã¹ããã¹ã¿ã¤ã«ä»ããããã¨ãæ³åãã¦ã¿ã¦ãã ãããdiv > ul > li
ã¾ãã¯.fruits__item
ã§é¸æããã DOM ã®ä¸é¨ãä½ã§ãããåããã®ã¯ã©ã¡ãã§ããããï¼
æ¬æ¥ã§ããã°ããCSSã§ã®ã»ãã³ãã£ã¯ã¹ãã¨ã¯ããã¯ããCSSã®ã³ã¼ããã©ã®ãããªæå³ãæã¤ã®ãï¼ãã¨ãã£ãé¨åã説æããã¹ãã ããã¨æããããã§ã®MDNã®èª¬æã¯ãã»ãã³ãã£ã¯ã¹ã§ã¯ãªãã¦ãããããCSSãæ¸ãããã®ãã©ã¯ãã£ã¹ã®èª¬æã§ãããªãã
div > ul > li
ã¨ããæå®ã¯ããdivè¦ç´ ã®åulè¦ç´ ã®ããã«åã®liè¦ç´ ããæå®ãã¦ãããä¸æ¹ã§ã.fruits__item
ã¯ãclass
å±æ§ãfruits__item
ã®è¦ç´ ããæå®ãã¦ãããã©ã¡ããæå³ã®ããè¨è¿°ã§ãããã©ã¡ãã®æ¹ãã©ã¡ããCSSã¨ãã¦ã®æå³ããããè¦ç´ ã®æå³ã¯HTMLä»æ§ã¨ãã¦ããããè¦å®ããã¦ããããã¯ã©ã¹ï¼class
å±æ§ã®å¤ï¼ã®æå³ã«é¢ãã¦ã¯ããã®HTMLã®æ¸ãæãåæã«æ±ºãã¦ãããã¨ã ãclass
å±æ§ã¯HTMLè¦ç´ ã®æå³ãæ¡å¼µããæ©æ§ã§ããã¨ãã°Microformatã®ãããªä»æ§ããHTMLä»æ§ã§è¦å®ãããªãæå³ã表ç¾ããããã«ä½¿ã£ã¦ãããããããããããä»æ§ã§è¦å®ããã¦ããªããç¬èªã¯ã©ã¹ fruits__item
ãå³å¯ã«ã©ã®ãããªæå³ããã£ã¦ããã®ããç¥ããã¨ã¯é£ããã人éã¯ï¼ãããã¯ä»æ¥ã®LLMã¯ï¼fruits__item
ã¨ããã¯ã©ã¹åã«åãè¾¼ã¾ããè±åèªã®æå³ã解éã§ãããããããªãããããã¯CSSèªä½ã®ã»ãã³ãã£ã¯ã¹ã§ã¯ãªããè±åèªã®æå³ã解éãã¦ãããCSSæå³ã®å
ã«ãã人éã®æå³ã説æãã¦ããããã¨ãã観ç¹ã§ã¯ãå·®ãããã ããããã ãããã¯ããã¹ã使ã£ãããã»ãã³ãã£ãã¯ã§ãªãã¨ããã¯ã©ã¹åã ããã»ãã³ãã£ãã¯ã ãã¨ãããã¨ã«ã¯ãªããªããããã ul > li
ã¨ããã»ã¬ã¯ã¿ã¼ã ã£ããããulè¦ç´ ã®åliè¦ç´ ãã¨ããæå³ã®å
ã«ãããé åºãªããªã¹ãã®ãªã¹ãã¢ã¤ãã ãã¨ããæå³ã¯æçã ããããéã«ã.aaaa
ã®ãããªã»ã¬ã¯ã¿ã¼ã ã£ãããã¯ã©ã¹åã使ã£ã¦ãã¦ãæå³ãèªã¿åããã¨ã¯ã§ããªããã¾ããulãliã®ãããªè¦ç´ ã®æå³ã¯HTMLä»æ§ã§è¦å®ããã¦ããããfruits__item
ã¯ã©ã¹ã®è¦ç´ ãã©ã®ãããªæå³ã§ããã®ããç¥ãã«ã¯ãã©ãã«ãæ¨æ¸¬ãããããªãã
ããã«æ¸ããã¨ã¯ç¹ã«å人çãªèãã«ãªãã¨ã¯æãã®ã ããã©ããCSSèªä½ã¯ããã¾ããã»ãã³ãã£ãã¯ããªä»çµã¿ã§ã¯ãªããããããªããã¨ããã®ããCSSã¯ãDOMã«å¯¾ãã¦æ§æçã«ããããããããããè¦ç´ ã«å¯¾ãã¦CSSããããã£ãå²ãå½ã¦ãæ©æ§ã ããã ãCSSã®å¦çã®ä»çµã¿ä¸ãHTMLã®åè¦ç´ ãæ¬æ¥æã£ã¦ããã»ãã³ãã£ã¯ã¹ã¯ãç¡è¦ãã¦å¦çãããã¨ã«ãªããã ãããHTMLã®æå³ä¸ã¯åãæå³ã«ãªãã¯ãã§ããCSSã¯ç°ãªãã¹ã¿ã¤ã«ä»ãããã¦ãã¾ãããã¨ãã° <div>
è¦ç´ ã®æå³ã¯ "The div element has no special meaning at all. It represents its children." ã®ããã«å®ã¾ã£ã¦ãããã ããã¨ãã£ã¦ãCSSã¯<div>
è¦ç´ ãç¡è¦ãã¦å¦çãããã¯ããªãã
HTML ã®ã»ãã³ãã£ã¯ã¹ã®æ¡å¼µ
å
è¿°ã®ããã«ãHTMLã§ã¯class
å±æ§ã使ã£ã¦ãHTMLèªä½ã«è¦å®ããã¦ããªãè¦ç´ ã®æå³ã表ç¾ãããã¨ãã§ããããã®ä»ã«ãæå³ã®æ¡å¼µãè¡ãããã®ã§ããã°ãã«ã¹ã¿ã è¦ç´ ã使ããã¨ãã§ãããã«ã¹ã¿ã è¦ç´ ã¯ãclass
å±æ§ã使ã£ãå ´åã¨éã£ã¦ãã«ã¹ã¿ã è¦ç´ ã®APIã®æä¾ãå¯è½ã«ãªãã®ã§ãHTMLä»æ§ã«è¦å®ããã¦ããããªããã£ãã®è¦ç´ ã¨è¿ãå½¢ã§ãã«ã¹ã¿ã è¦ç´ ãè¦å®ããå®è£
ããå©ç¨ãããã¨ãã§ããã
ãã®ä»ãHTMLã®æå³ãæ¡å¼µã»å¤æ´ãã¦ãããã®ã« ARIA in HTML ããããHTMLã®ã»ãã³ãã£ã¯ã¹ã§ã¯ãã¢ããªã±ã¼ã·ã§ã³æä½ä¸ã®é·ç§»çãªã¹ãã¼ãã表ç¾ãããã¦ããªããã¨ãããããã¨ãã°ããã°ã«ãã¿ã³ãå®è£
ãããã¨ããã¨ãããã¨ããHTMLã®buttonè¦ç´ ã¨ãJavaScriptãCSSã«ãã£ã¦ãã°ã«ãã¿ã³ã®è¦è¦è¡¨ç¾ãå®è£
ããã¨ãã¦ããããããè¦è¦è¡¨ç¾ã使ããªãã¦ã¼ã¶ã¼ã«ã¨ã£ã¦ã¯ãã¢ã¯ã»ã·ããªãã£ã¼ã®æ¬ å¦ããã¢ããªã±ã¼ã·ã§ã³ã«ãªã£ã¦ãã¾ãããããããHTMLã¬ãã«ã§ã¯æ¬ å¦ãã¦ããæ
å ±ãDOM HTMLä¸ã§è¡¨ç¾ãããããARIAã§ã¯ã»ãã³ãã£ã¯ã¹ãæ¡å¼µãã¦ããããã°ã«ãã¿ã³ã®ä¾ã§ããã°aria-pressed
å±æ§ã«ãã£ã¦ããã°ã«ãã¿ã³ã®ã¹ãã¼ãã表ç¾ããæ¯æ´æè¡ãä»ãã¦ãããå¤ãã®ã¦ã¼ã¶ã¼ãã¢ããªã±ã¼ã·ã§ã³ãå©ç¨ãããã¨ãã§ããã
- ã»ã¼ãã¨ããã®ã¯ãJavaScriptã«ã¯é¢æ°ã®ååãåå¾ããæ¹æ³ãç¨æããã¦ãã¦ãããããååã®åå¾ãè¡ãå¦çãå«ãã§ããã°åä½ãå¤ããããã↩
è¨å·ã¨éä¿¡ã«é¢ããæ½è±¡é層ã¢ãã«ã®ã¡ã¢
æ å ±ç§å¦ã»æè¡ã¨è¨å·è«ãé¢é£ä»ãããã¨ãã試ã¿ã¯ãããããåå¨ããããå人çã«ã¯ããã¾ã¾ã§æ示ããã¦ããã¢ãã«ã§ç´å¾ããããã®ã¯ãã¾ãå¤ããªããæ¢åã®ã¢ãã«ã¯ãæççã ã£ããä¸æ£ç¢ºã ãããã§ã¯ãããæ£ç¢ºã§ãããã詳細ã«ãªããããªãã¢ãã«ãã¡ã¢ãã¦ããã
æ å ±ã·ã¹ãã ã¯ã次ã®4ã¤ã®ä¸ç観ã«åãã¦ãèãããã¨ãã§ãããä½æ¬¡ã®ã¬ã¤ã¤ã¼ããé ã«ã
- ç©ççï¼å ´ã®ä¸ç
- éä¿¡çï¼ä¿¡å·ã®ä¸ç
- è¨ç®çï¼è¡¨ç¾ã®ä¸ç
- 人éçï¼æèã®ä¸ç
ã¨èããã
ç©ççã¯ãæ å ±ã·ã¹ãã ããã®ããã«ç©ççãªç³»ã¨ãã¦è§£éããä¸ç観ã ã人éãè¨ç®æ©ã¯ãã»ã³ãµã¼ãã¢ã¯ãã¥ã¨ã¼ã¿ã¼ãªã©ãä»ãã¦ç©ççãªå¤é¨ç°å¢ã¨ç¸äºä½ç¨ãã¦ãããããããéç¨ã®ãã¹ã¦ã®ç¾è±¡ã¯ãè¨ç®éç¨ãéä¿¡éç¨ãå«ãã¦ãå®éã«ã¯ãã¹ã¦ç©ççãªæ³åã«å¾ã£ã¦ãããç©ççã§ã¯ã人éã®ç¥è¦ããããç¾è±¡ãä½ç¨ããããæ··æ²ã¨ãã¦ãã¦ãé«åº¦ãªæ°çã¢ãã«ã«ãã£ã¦è¨è¿°ãããã
éä¿¡çã¯ãå®å®ã®ãã¡ã秩åºã ã£ã¦ä¿¡å·ãä¼éã§ããé¨åãæãåºããä¸ç観ã ãããã«ã¯ãä¼éãæã¾ããã·ã°ãã«ã¨ãä¼éãæã¾ããªããã¤ãºã®åºå¥ãåå¨ãã¦ããããã®åºå¥ã¯ããã¹ã¦ãå ´ã¨ãã¦æ±ãç©ççã«ã¯ç¡ãã£ããã®ã ããã¤ãºãå¹æçã«é¤å»ããå¤èª¿æè¡ã«ãã£ã¦éä¿¡è·¯ã¯å»¶é·ãããç¾ä»£ã§ã¯å°ççãªé信網ãå½¢æããã¦ããã
è¨ç®çã¯ãéä¿¡ã«ãã£ã¦çµã°ãã表ç¾ã交æããã¨ã³ãã£ãã£ãããªãä¸ç観ã ãã¨ã³ãã£ãã£ã©ããã¯ç©ççã«ã¯éã¦ããã¦ããããé信網ã«ãã£ã¦æ¥ç¶ããã¦ãããã¨ã§ãè¨ç®çã«ããã¦ã¯ãç´æ¥çã«æ¥ãã¦ããããã«è¦ãããéä¿¡ã¯ã表ç¾ãä¿¡å·ã«å¤æããç©çå ´ãä»ãã¦ä¼éããã¾ã表ç¾ã«æ»ããããã«ãã£ã¦ãéä¿¡è·¯èªä½ã¯ã»ã¨ãã©éæã§ãã£ã¦ãè·¯ã¨ããããé¢ã®ããã«è¦ããããããã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ãããã¨ã³ãã£ãã£ã¯ã¤ã³ã¿ã¼ãã§ã¼ã¹ãä»ãã¦è¡¨ç¾ã交æããã£ã¦ãããã¨ã³ãã£ãã£ã¯ã表ç¾ããªãããã®æ³åã§å¥ã®è¡¨ç¾ã«å¤æããã¾ãã¤ã³ã¿ã¼ãã§ã¼ã¹ãä»ãã¦äº¤æãã¦ããã
人éçã¯ãã¨ã³ãã£ãã£ãæèãã¦ãããªãã¸ã§ã¯ããããªãä¸ç観ã ã人éã¯æèçã«ç°å¢ã¨æ¥ãããªãã¸ã§ã¯ããèªèãããè¨ç®çããä¸ã®ä¸çã®å¤ãã®ç¾è±¡ããã¨ãã°ã¨ã³ãã£ãã£ãã¤ã³ã¿ã¼ãã§ã¼ã¹ã表ç¾ã¨ãã£ãè¨ç®çã®ç¾è±¡ã¯ãç¡æèã®åå¨ã«ãªã£ã¦ãããã³ã³ãã¥ã¼ã¿ã¼ãå¦çããå¤ãã®è¨ç®ã¯äººéã«æèãããªãããä¸é¨ã®è¨ç®ã¯ã人éãæèã§ãããªãã¸ã§ã¯ãã¨ãã¦æ示ãããã
ã²ã¨ã¤ã®æ å ±ã·ã¹ãã ã¯ããããã£ã4ã¤ã®ä¸ç観ã«ãã£ã¦è¦ããã¨ãã§ãããéè¦ãªã®ã¯ãæ å ±ãä¼éãããéç¨ããå ´ã®ä¸çããè«ãããã¨ããå¿ã®ä¸çããè«ãããã¨ãã§ããã¨ãããã¨ã ãã¤ã¾ããæ å ±ã¯ãç©ççã«ã¯é»å ´ã¨ãã¦åå¨ãã¦ãããããããéä¿¡ä¸ã¯é»å§ã®é«ä½ã«ãã£ã¦è¨é²ã»ä¼éããã111001100101011ã®ãããªãã¸ã¿ã«ä¿¡å·ã ã£ããããããããã³ã³ãã¥ã¼ã¿ã¼ã¯ã29483ã¨ããæ°å¤ã¨ãã¦å¦çãããããããã¯"ç«"ã¨ããæåã¨ãã¦å¦çããããããããããã³ã³ãã¥ã¼ã¿ã¼ã®ãã®ãããªè¨ç®ã¯ããã°ã©ã ãããæ©æ§ã§ãã£ã¦ãã³ã³ãã¥ã¼ã¿ã¼èªä½ã¯ä¿¡å·ãæ°å¤ãæåã¨ãã¦æèãããã¨ã¯ãªãããã æ©æ¢°çã«è¨ç®ãã¦ããã ãã ã29483ã¨ããæ°å¤ã«å¤§å°ã®ææ ¨ãæ±ããã¨ããªããã"ç«"ã¨ããæåãå¦çãã¦ããããã¨è¨ã£ã¦ãç«ã¨ããåç©ãé£æ³ãããã¯ããªããéã«ããç«ãã¨ããæåãèªãã 人éã®å¤ãã¯åç©ã®ç«ã«æãã馳ããã®ã§ãã£ã¦ããã®ãç«ãã¨ããæåèªä½ã«ã¤ãã¦èãåºã人ã¯å°ãªãã¨ããç¹ã§ã人éã¯èªç¥æ©è½ã¨ãã¦ã¯ãç«ãã¨ãã表ç¾ã確å®ã«å¦çãã¦ããã«ãé¢ãããã表ç¾èªä½ã¯æèã«ã®ã¼ãã¥ããã¨è¨ããã ããã
æ å ±ã·ã¹ãã ã®è¦æ¹ããããã£ãä¸ç観ã®ã¬ã¤ã¤ã¼ã«åãããã¨ã§ã次ã®ãããªãã¨ãè¨ãããããããªãã
é«æ¬¡ã®ä¸çã®ç¾è±¡ã¯ä½æ¬¡ã®ä¸çã§ã解éãå¯è½ã ãããã®éã¯æãç«ããªãã人éãè¨ç®æ©ãï¼éå ããçµæãè¨ç®ã§ãããã¯ã¨ãããï¼ç©çç¾è±¡ã«éå ãã¦è§£éã§ãããããããç©çç¾è±¡ã®ãªãã§éä¿¡ã¨ãã¦è§£éã§ããã®ã¯ä¸é¨ã®ç¾è±¡ã ãã§ãããè¨ç®ã¨ãã¦è§£éã§ããã®ã¯ããã«å°ãªãã人éã®æèã«æã£ã¦ããç¾è±¡ã¯ãã®ã»ãã®ä¸é¨åã ã
ããã¯ããèªä½ã§äººéçã«ãè¨ç®çã«ãéä¿¡çã«ãç©ççã«ã解éãå¯è½ãªã¨ã³ãã£ãã£ã ã人éèªä½ãç©çç¾è±¡ã«éå ãããããéä¿¡ç¾è±¡ã«éå ãããããè¨ç®ç¾è±¡ã«éå ãããã人éã¨æ©æ¢°ãåºå¥ããè¨ç®ãè¡ãã¨ã³ãã£ãã£ã¨èãã¦ãåé¡ããªãã
人éã¨äººéã人éã¨æ©æ¢°ãæ©æ¢°ã¨æ©æ¢°ã¨ãã£ãã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ããã¨ãããã表ç¾ã¯ç°ãªããå ·ä½çã«ã©ã®ãããªè¡¨ç¾ã使ããã¯ãå½ç¶ãæ å ±æè¡åéã§è©³ããæ¤è¨ããã¦ããã®ã§ãæ å ±æè¡ã«è¨å·è«çãªèå¯ãå ããã®ã§ããã°ããããã£ã表ç¾ã®ä½ç³»ãé©åã«èª¬æã§ãããããªãã®ã§ãªããã°ãªããªãã¯ãã ã
ããã°ã©ãã³ã°ããªãé£ããã®ãã¨è¨ãã°ããã®ä¸å ã¨ãã¦ããµã ã人éãæèããªãè¨ç®çã«ã¤ãã¦æèããããå¾ãªããããã¨ãããã¨ãããã ãããããã¦ãè¨ç®ã«ã¤ãã¦æèãããããã«ãªã£ãããã°ã©ãã¼ããéä¿¡ã«é¢ãã¦ã¯ãã¾ãæèããã¦ããªããããããªããããããé©åãªæ¹æ³ã§ããã°ã©ã ãè¡ãã°ãéä¿¡ãæèãããã«è¨ç®ãããã°ã©ã ãããã¨ãã§ãããåæ§ã«ãè¨ç®ã®å¤§é¨åãé è½ãã¦ãæèããè¨ç®ãæ½è±¡çãªãã®ã«çµããã¨ã§ãããã°ã©ã ã¯äººéã®æã«è² ãããã®ã«ãªãã
æ½è±¡ã¯ã©ã¹ãã¤ã³ã¿ã¼ãã§ã¼ã¹ãKotlinã®è¨æ³
æ½è±¡ã¯ã©ã¹ã¯æªå®ç¾©ã®æ½è±¡ã¡ã½ãããããã¯ã©ã¹ã§ãæ´¾çã¯ã©ã¹ã§å®è£ ãè¡ããã¨ã§ãã¤ã³ã¹ã¿ã³ã¹åãå¯è½ã«ãªãã
abstract class AC protected constructor() { abstract protected fun amX(): Int abstract protected fun amY(): String fun cmZ() = "${this.amX()} ${this.amY()}" } val ac = object : AC() { override fun amX() = 42 override fun amY() = "abc" }
ãã®ç¨®é¡ã®ç¶æ¿ã¯ãå§è²ã«ç½®ãæãããã¨ãã§ããå ´åããããæ½è±¡ã¡ã½ãããæãåºãã¦ã¤ã³ã¿ã¼ãã§ã¼ã¹åãããã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ãã³ã³ã¹ãã©ã¯ã¿ã«ã¨ãã¯ã©ã¹ã§å ·ä½ã¡ã½ãããå®è£ ããã
interface IC { fun amX(): Int fun amY(): String } class CC(val ic: IC) { fun cmZ() = "${ic.amX()} ${ic.amY()}" } val cc = CC(object : IC { override fun amX() = 42 override fun amY() = "abc" })
æ½è±¡ã¡ã½ãããå®è£ ããå ·ä½ã¡ã½ãããããã¹ã¼ãã¼ã¯ã©ã¹ã®ä»ã®ã¡ã½ãããå¼ã³åºãã±ã¼ã¹ã§ã¯ããããã種é¡ã®å¤æã¯ã§ããªãããããããã親ã¯ã©ã¹ã®ã¡ã½ãããåã¯ã©ã¹ã®ã¡ã½ããã«ä¾åãã¤ã¤ãåã¯ã©ã¹ã®ã¡ã½ããã親ã¯ã©ã¹ã®ã¡ã½ããã«ä¾åããã¨ãããç¸äºä¾åã®é¢ä¿ã«ãªã£ã¦ããã±ã¼ã¹ã¯ãå¤ãã®å ´åã¯å¿ è¦ããªãããé¿ãããããªãé¿ãããã±ã¼ã¹ã§ãããã®ã§ãç©æ¥µçã«ç¶æ¿ããå§è²ã¸ç½®ãæããåæ©ãããã
ããããªããåé¡ã¨ãã¦ãç¶æ¿ããå§è²ã¸ç½®ãæããã¨ãã«ã¯ãä½åãªèå¥åãå¢ãã¦ãã¾ã£ã¦ããããã¨ã®ã³ã¼ãã§ã¯æ½è±¡ã¯ã©ã¹ACã ããå®ç¾©ããã°ããã£ãã¨ããããæ°ããã³ã¼ãã§ã¯ãã¤ã³ã¿ã¼ãã§ã¼ã¹ã®ICã¨ã¯ã©ã¹ã®CCã«åããã¦ãã¾ã£ã¦ããããã¡ãããã¯ã©ã¹ã®å é¨ã§ã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®ç¾©ãããã¨ã§ãåå空éã«æ£ããããªããã工夫ãããã¨ã¯ã§ããã
class CC(val ic: IC) { interface IC { fun amX(): Int fun amY(): String } fun cmZ() = "${ic.amX()} ${ic.amY()}" }
Kotlinã®è¨æ³ä¸ã®åé¡ã¨ãã¦ãå¿åãªãã¸ã§ã¯ãã®è¨æ³ãã©ã ãå¼ã«æ¯ã¹ã¦ã¯ããã«ä¸æ ¼å¥½ã¨ããç¹ãããããããã¤ã³ã¿ã¼ãã§ã¼ã¹ã®ã¡ã½ããã1ã¤ã ããªããããã¯é¢æ°ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ãããã¨ãã§ããã
class CC1(val ic: IC) { fun interface IC { fun amX(): Int } fun cmZ() = "${ic.amX()}" } val cc1 = CC1 { 42 }
ã¡ã½ããã1ã¤ã®å ´åã¨2ã¤ã®å ´åã§è¨æ³ä¸ã®ç¸éãããã¾ã§å¤§ããã®ã¯ããã¨çä¸å°½ã§ãè¨æ³ä¸ã®å¶ç´ãè¨è¨ä¸ä¸èªç¶ãªé¸æãåãããå¯è½æ§ãããããã¨ãã°æ¬¡ã®ããã«ãé¢æ°ãè¤æ°ã³ã³ã¹ãã©ã¯ã¿ã§åããããªå½¢ã«å¤ããã¨ããææ³ã§ãè¨æ³ã®ç ©éããè¿åãããããããªãã
class CC2(val amX: () -> Int, val amY: () -> String) { fun cmZ() = "${amX()} ${amY()}" } val cc2 = CC2(amX = { 42 }, amY = { "abc" })
ãã®æ¹æ³ã¯ããã¨ã®è¨æ³ããç°¡æ½ã ããåé¡ã¨ãã¦ãè©ä¾¡ã®ã¿ã¤ãã³ã°ããããã³ã³ã¹ãã©ã¯ã¿ã®å¼æ°ã¯ãå¼ã³åºãæç¹ã§è©ä¾¡ããã¦ãã¾ããããé¢æ°ã§ã¯ãªãå³å¤ã§æ¸¡ããããªã·ã°ããã£ã«ãã¦ãã¾ãå¯è½æ§ãããã
class CC3(val pX: Int, val pY: String) { fun cmZ() = "${pX} ${pY}" } val cc3 = CC3(pX = 42, pY = "abc")
ããå®ç¾©ãã¦ãã¾ãã¨ããã¨ããã²ãã¿ã¼ã¡ã½ããã®å®è£ ãå¤ãã¦ãè©ä¾¡ã¿ã¤ãã³ã°ãã³ã³ããã¼ã«ãããã¨ãå³ãããªãããããã¯ãé©åã«ã¤ã³ã¿ã¼ãã§ã¼ã¹ã使ããã¨ãæã¾ããå ´é¢ãåå¨ããããã«æãããã
class CC4(val ic: IC) { interface IC { val pX: Int val pY: String } fun cmZ() = "${ic.pX} ${ic.pY}" } val cc4 = CC4(object : CC4.IC { override val pX = 42 override val pY by lazy { println("computed!"); "abc" } })
ããã
val cc4 = CC4 { val pX = 42 val pY by lazy { println("computed!"); "abc" } }
ãããç°¡åã«æ¸ãããããã®ã ããã©ãã
ããããã¡ã½ããå¼æ°ã®ã»ããã©ãã«ããã¦ãè©ä¾¡æ¦ç¥ãå¤ããããããã«ããã¨ãï¼ ã¾ããã¡ã½ããå¼ã³åºãã®å½¢å¼ã§æ¸ãããã®ãæ£æ ¼è©ä¾¡ã»å¤æ¸¡ãã«ãªã£ã¦ããªãã®ã¯ãããããã¨è¨èªã®åæã¨ãã¡ã³ã¿ã«ã¢ãã«ã¨ãå£ãã¦ãããã§ã¯ããã Ceylonè¨èªã®LazySpecifierã¿ãããªæ¦å¿µãå°å ¥ãã¦ãããææ³ã¯é©å½ãªãã ãã©ã
class CC5(lazy val pX: Int, lazy val pY: String) { fun cmZ() = "${pX} ${pY}" } val cc5 = CC5(lazy pX = 42, lazy pY = { println("computed!"); "abc" })
ã¨ãï¼ ã¾ãããªãããã£ã¨ãã·ãªè¨æ³ã§ã§ããã¨ãããã ãã©
ãIPAãã©ã³ãã©ã¤ã»ã³ã¹ãå·¡ã£ã¦ãã«ã¤ãã¦æãã¨ãã 2
åããæéã空ãã¦ãã¾ã£ããã©ããµãã»ãããã©ã³ãã¯å æåºæºãå¤ããã®ããã¨ããã¨ããã«ã¤ãã¦æ¸ãã
IPAフォントライセンスを巡って | 一般社団法人 文字情報技術促進協議会
ãã©ã³ããã©ãã ããã¨å æåºæºã«ã¯é¢ä¿ããªã
å æåºæºã¨ããã®ã¯ãæåå³å½¢ãã符å·åã«ããã£ã¦åå®ããããã®åºæºã ãè¦ããã«ãæåå³å½¢âæåã³ã¼ãã¨ããå¤æã®ã«ã¼ã«ã ãä¸æ¹ããã©ã³ãã¯ãæåãæç»ããããã®ããã°ã©ã ã§ãæåã³ã¼ãâæåå³å½¢ã¨ãããéåãã®å¤æãè¡ãã
ãã©ã³ãã¯æç»ã«é¢ããããã°ã©ã ã§ãã£ã¦ã符å·åã«é¢ããã«ã¼ã«ã§ã¯ãªãããã®ãããªã«ã¼ã«ã¯è¦æ ¼æ¸ã«æ¸ããã¦ãããã®ã§ãã£ã¦ããã©ã³ãã®ä¸ã«å æåºæºã¯å«ã¾ãã¦ããªããããããã«ããã©ã³ãããµãã»ããåãããªã©ã®æ¹å¤ãè¡ã£ãããã¨ãã£ã¦ãå æåºæºãå¤ããã¨ãããã¨ãããããªãã
ãã©ã³ãã®ãµãã»ããåã§å æåºæºãå¤ããã¨æãã¨ããããããã¯æåã³ã¼ãã®è¦æ ¼æ¸ã¨ãã©ã³ããã¡ããã¨åºå¥ãã¦ããªãã¨ãããã¨ã§ã¯ãªãã ãããã
IPAmjææãã©ã³ãã¨æåæ å ±åºç¤ã¯éã
ãã©ã³ãã¯ãããèªä½ãå æåºæºã§ã¯ãªããå æåºæºã®ãããªæ¦å¿µã¯ããã©ã³ãå®è£ ã®å¤é¨ã«åå¨ããããã®ãããªæ¦å¿µãå ±æããã®ã¯ãè¦æ ¼æ¸ã®å½¹å²ã ããã¨ãè¦æ ¼æ¸ã®ã³ã¼ããã£ã¼ããç¹å®ã®ãã©ã³ãã§å°å·ããã¦ããã¨ãã¦ãããã©ã³ãã¨è¦æ ¼ã¯éããã®ã ã
å®éã®ã¨ãããæåæ å ±åºç¤ã®è¦æ ¼æ¸ã¨ãããã®ãåå¨ãã¦ãæ£å¼ã«å ¬éããã¦ããã¨ããããã§ã¯ãªããå ¬éããã¦ããã®ã¯ãOpenXMLå½¢å¼ã®MJæåä¸è¦§è¡¨ã¨ãIPAmjææãã©ã³ãã ãMJãå©ç¨ããããã«ã¯å¥é符å·åã®ã«ã¼ã«ãè¦å®ããè¦æ ¼æ¸ãè¦ãã¯ãã ããç°¡åãªå©ç¨ã¬ã¤ãç¨åº¦ã®è³æããç¨æããã¦ããªããç¾ç¶ã®æåæ å ±åºç¤ããã®ãããªå½¢æ ã ãããæåæ å ±åºç¤ã¨IPAmjææãã©ã³ãã®éãããããåãããªããªã£ã¦ããã
æåæ å ±åºç¤ãè¦æ ¼ã¨ãã¦æããä¸ã§ããã©ã³ãã®è¦æ ¼é©åæ§ãä¿è¨¼ã»èªè¨¼ã§ããããã«ããããã¨ããã¢ããã¼ã·ã§ã³ãããã®ã¯ãããããã ããããããã©ã³ãã®ã©ã¤ã»ã³ã¹ã§ããIPAãã©ã³ãã©ã¤ã»ã³ã¹ã§ãããã¨ããã®ã¯ãçãæªãããããããããIPAãã©ã³ãã©ã¤ã»ã³ã¹ã¯æåæ å ±åºç¤æ´åäºæ¥ã®åã«ã§ããã¨ããæç¹ã§ãæ´¾çãã©ã³ããè¦æ ¼ã«é©åãããã©ããã¨ãããã¨ã¯IPAãã©ã³ãã©ã¤ã»ã³ã¹ã¨ä½ãé¢ä¿ã®ãªã話ã ã
å æåºæºãªã©ãè¦å®ããä»æ§æ¸ãæ£å¼ã«çå®ããã¦ããªãã¨ããã®ã¯ãæåæ å ±åºç¤èªä½ã®åé¡ã§ããã¯ãã ããã¨ãIPAmjææãã©ã³ãã®å©ç¨ãã©ã¤ã»ã³ã¹ã§å¶éãããã¨ãæåæ å ±åºç¤ã®åé¡ã解決ããããã§ã¯ãªããããããããæåæ å ±åºç¤ã®ãæåã³ã¼ãè¦æ ¼ã¨ãã¦ã®ä¸å®å ¨ãã解æ¶ããã¹ãã ããã
ãIPAãã©ã³ãã©ã¤ã»ã³ã¹ãå·¡ã£ã¦ãã«ã¤ãã¦æãã¨ãã 1
IPAフォントライセンスを巡って | 一般社団法人 文字情報技術促進協議会
IPAãã©ã³ãã©ã¤ã»ã³ã¹1ã¯ãOpen Source Initiative (OSI) ãããThe Open Source Definition (OSD) 2ã«æºæ ãã¦ããã¨ããèªå®ãåãã¦ããã¨ãã触ãè¾¼ã¿ã ã£ãã3 ã ãããã©ã¤ã»ã³ã¹ãçç±ã«MJææä½ãã©ã³ããå©ç¨ãããµã¼ãã¹ãå·®ãæ¢ããã¨ããã®ã¯ä¸å¯è§£ãªãã¨ã«æããããã£ãããããã¯ã©ããããã¨ãªãã ãããããã®è¨äºãèªãã§ã次ã®ãããªçåãæµ®ããã ã
- IPAmjææãWebãã©ã³ãã¨ãã¦å©ç¨ãããã¨ã¯ãIPAãã©ã³ãã©ã¤ã»ã³ã¹ä¸åé¡ã¨ãªãã®ãã
- IPAmjææãWOFFåãããµã¼ãã¹ã¯ãIPAãã©ã³ãã©ã¤ã»ã³ã¹ä¸åé¡ã¨ãªãã®ãã
- ãµãã»ãããã©ã³ãã¯å æåºæºãå¤ããã®ãã
以ä¸ã§ã¯ãä¸è¨çåã®ãã¡ã1ã¨2ã«ã¤ãã¦èãã¦ã¿ããã3ã«ã¤ãã¦ã¯ãå¥ã®è¨äºã«ããã
以ä¸ãIPAãã©ã³ãã©ã¤ã»ã³ã¹ã®æ¡é ãæãå ´åã¯ãIPAãã©ã³ãã©ã¤ã»ã³ã¹ã®è¡¨ç¾ã«å¾ããåæãããé ç®ãå·ã§ã¯ãªãé ã§è¡¨ç¾ãããã¾ããOSDæ¡æã¯å «ç°çè¡(mhatta)ã«ããããªã¼ãã³ã½ã¼ã¹ã®å®ç¾©ãã®æ¥æ¬èªè¨³4ã«åºã¥ãã
1. IPAmjææãWebãã©ã³ãã¨ãã¦å©ç¨ãããã¨ã¯ãIPAãã©ã³ãã©ã¤ã»ã³ã¹ä¸åé¡ã¨ãªãã®ãã
IPAmjææããè¤è£½ãã®ä»ã®å©ç¨ããããã±ã¼ã¹ã¨ãã¦ã次ã®3ã¤ãããã
- æ´¾çããã°ã©ã ãåé å¸ãã
- 許諾ããã°ã©ã ããã®ã¾ã¾ã®ç¶æ ã§æ¹å¤ãããã¨ãªãåé å¸ãã
- ãã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ã«ã¤ãã¦è¤è£½ãã®ä»ã®å©ç¨ããã
ã±ã¼ã¹1ã¯2æ¡4é ã¾ãã¯2æ¡7é ã«è©²å½ãã¦è¨±è«¾ãä»ä¸ãããã±ã¼ã¹ã§ã3æ¡1é ã®å¶éãæºããå¿ è¦ããããã±ã¼ã¹2ã¯2æ¡6é ã«è©²å½ããã±ã¼ã¹ã§ã3æ¡2é ã®å¶éãæºããå¿ è¦ããããã±ã¼ã¹3ã¯2æ¡2é ã3é ããã³5é ã«è©²å½ããã±ã¼ã¹ã§ããã®ã±ã¼ã¹ã§ã¯3æ¡1é ããã³2é ã®å¶éãæºããå¿ è¦ããªãã
Webãã©ã³ãã¨ãã¦ã®å©ç¨ããããã®ã±ã¼ã¹ã«è©²å½ããã«ãã¦ããããããã®ã±ã¼ã¹ã«ã¤ãã¦å¿ è¦ãªå¶éãæºããã¦ããã°ãã¨ãããWebãã©ã³ãã¨ãã¦å©ç¨å¯è½ã ã
3æ¡3é ããã³4é ã«ç¤ºããã¦ããã®ã¯å 責æ¡é ãªã®ã§ã以ä¸è°è«ããªãã
ã±ã¼ã¹1 æ´¾çããã°ã©ã ãåé å¸ããã
1ã®ã±ã¼ã¹ã«è©²å½ããå ´åã¯æ¡ä»¶ãå¤ãã
- 3æ¡1é (1)ãæ´¾çããã°ã©ã ãåé å¸ããéã«ã¯ãä¸è¨ãã¾ããå½è©²æ´¾çããã°ã©ã ã¨ä¸ç·ã«åé å¸ããããªã³ã©ã¤ã³ã§æä¾ãããã¾ãã¯ãéµéè²»ã»åªä½åã³åæ±ææ°æã®åè¨ãè¶ ããªãå®è²»ã¨å¼ãæãã«åªä½ãéµéããæ¹æ³ã«ããæä¾ãããªããã°ãªãã¾ãããã該å½ãããã¼ã¿ãæä¾ããã°ããã
- 3æ¡1é (2)ãæ´¾çããã°ã©ã ã®åé è ããæ´¾çããã°ã©ã ãããã®ã©ã¤ã»ã³ã¹ã®ä¸ã§æåã«ãªãªã¼ã¹ããã許諾ããã°ã©ã ï¼ä»¥ä¸ãããªãªã¸ãã«ã»ããã°ã©ã ãã¨ããã¾ããï¼ã«ç½®ãæãããã¨ãã§ããæ¹æ³ãåé å¸ãããã®ã¨ãã¾ãããããæ¹æ³ã¯ããªãªã¸ãã«ã»ãã¡ã¤ã«ããã®å·®åãã¡ã¤ã«ã®æä¾ãã¾ãã¯ãæ´¾çããã°ã©ã ããªãªã¸ãã«ã»ããã°ã©ã ã«ç½®ãæããæ¹æ³ã示ãæ示ã®æä¾ãªã©ãèãããã¾ããããã®æ¡é ã¯ãå ·ä½çã«ä½ãæãã¦ãç½®ãæãããã¨è¨ã£ã¦ããã®ããããåãããªããã¢ããªã±ã¼ã·ã§ã³ä¸ã§ã®è¡¨ç¤ºãã©ã³ããç½®ãæãããã¨ããæå³ã§ããã°ããµãã»ããåããWebãã©ã³ãã¨ãã¼ã«ã«ã«ã¤ã³ã¹ãã¼ã«ããIPAmjãã©ã³ãã¨ã§ã表示ãåãæ¿ãããã¨ãã§ããããã«ããæ©æ§ãå ¥ãã¦ããã°æ¸ãã¨æãããã
- 3æ¡1é (3)ãæ´¾çããã°ã©ã ããæ¬å¥ç´æ¸ã«å®ããããæ¡ä»¶ã®ä¸ã§ã©ã¤ã»ã³ã¹ããªããã°ãªãã¾ããããã©ã¤ã»ã³ã¹ããã°ããã
- 3æ¡1é (4)ãæ´¾çããã°ã©ã ã®ããã°ã©ã åããã©ã³ãåã¾ãã¯ãã¡ã¤ã«åã¨ãã¦ã許諾ããã°ã©ã ãç¨ãã¦ããã®ã¨åä¸ã®å称ãã¾ãã¯ãããå«ãå称ã使ç¨ãã¦ã¯ãªãã¾ãããã該å½ç®æãé©å½ã«ãªãã¼ã ããã°ããã
- 3æ¡1é (5)ãæ¬é ã®è¦ä»¶ãæºããããã«ãªã³ã©ã¤ã³ã§æä¾ããã¾ãã¯åªä½ãéµéããæ¹æ³ã§æä¾ããããã®ã¯ããã®æä¾ãå¸æãããããªãè ã«ãã£ã¦ãæä¾ãå¯è½ã§ãããå¶ç´ã«é¢ããæ¡é ãªã®ã«ãæããå¯è½ã§ããã§çµãã£ã¦ããã®ã¯ä¸å¯è§£ã ããæå³ãã¨ããªããããã®æä¾ãå¸æãããããªãè ãã¨ããã®ã¯ãæä¾ãè¡ããã¨ãå¸æããè ãªã®ããããã¨ãæä¾ãåãããã¨ãå¸æãããã®ãªã®ãããããåãããªãã3æ¡1é (1)ã§ç¤ºããã¦ããæä¾ãããªããã°ãªããªããã®ã®æä¾æ¹æ³ã¯ãã®æä¾ã®ä¸»ä½ãåãããä»è ããæä¾ãåãããã¨ãã§ããããã«ããã°ããã§æ¡ä»¶ãæºããã¦ããã¨ããä½ãæ¸ããªã®ã ãããã
3æ¡1é (2), 3æ¡1é (5)ã®æå³ã«ä¸å¯è§£ãªé¨åã¯ããããæºãããã¨ã¯å¯è½ãªæ¡ä»¶ã ã¨æãããã
ã±ã¼ã¹2 許諾ããã°ã©ã ããã®ã¾ã¾ã®ç¶æ ã§æ¹å¤ãããã¨ãªãåé å¸ãã
- 3æ¡2é (1)ã許諾ããã°ã©ã ã®å称ãå¤æ´ãã¦ã¯ãªãã¾ãããã
- 3æ¡2é (2)ã許諾ããã°ã©ã ã«å å·¥ãã®ä»ã®æ¹å¤ãå ãã¦ã¯ãªãã¾ãããã
- 3æ¡2é (3)ãæ¬å¥ç´ã®åãã許諾ããã°ã©ã ã«æ·»ä»ããªããã°ãªãã¾ãããã
ãæ¬å¥ç´ã®åãã許諾ããã°ã©ã ã«æ·»ä»ãã®é¨åã®è§£éãå¾®å¦ã ããããZIPã¢ã¼ã«ã¤ãåã§ããã°ãåä¸ã¢ã¼ã«ã¤ãå ã«ã©ã¤ã»ã³ã¹æ¬æãå«ã¾ãã¦ããã°ãããã¯ç¢ºå®ã«æ·»ä»ããã¨è¨ããã ãããã§ã¯ãOpenTypeãã©ã³ããã¡ã¤ã«ããªãªã¸ãã«ã®å½¢å¼ã§Webãµã¼ãã¼ä¸ã«ã¢ãããã¼ããã¦ããå ´åã¯ã©ãã ãããï¼ ãã©ã³ããã¡ã¤ã«ãWebãã©ã³ãã¨ãã¦åç §ãããã¼ã¸èªä½ã«è¨±è«¾ããã°ã©ã ãè¨è¼ããã¦ããã°ãããã¯æ·»ä»ã¨è¨ããã ãããï¼ ãããã¯ã©ã¤ã»ã³ã¹æ¡æã¸ã®ãªã³ã¯ãè¨è¼ããã¦ããå ´åã¯ã©ããï¼ ããã§ãã¢ã¼ã«ã¤ãã«å«ã¾ãã¦ããã®ã¯æ·»ä»ã ããã©ã¤ã»ã³ã¹æ¡æã¸ã®ãªã³ã¯ã¯æ·»ä»ã§ã¯ãªãã¨ãããã¨ã«ãªãã¨ãããã¯ç´æçã«ã¯ä¸æ¡çãªå¶éã ããOSD 10æ¡ãã©ã¤ã»ã³ã¹ã¯æè¡ä¸ç«çã§ãªããã°ãªããªããã«æµè§¦ãããããããªããããã®é¨åãæ確ã§ããã°ãOpenTypeãã©ã³ãããµãã»ããåãããã®ã¾ã¾ã¦ã§ããã©ã³ãã¨ãã¦ä½¿ããã¨ã¯ã容éã®åé¡ã¯åå¨ããã«ãããæè¡çã«å¯è½ãªã¯ãã ã
ã±ã¼ã¹3 ãã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ã«ã¤ãã¦è¤è£½ãã®ä»ã®å©ç¨ããã
ãã®ã±ã¼ã¹ã«è©²å½ããå ´åã¯ãä¸è¨3æ¡1é ããã³2é ã®å¶éã«å¾ãå¿ è¦ããªãã
Webã¢ããªã±ã¼ã·ã§ã³ã«ãããWebãã©ã³ãã¨ãã¦ã®å©ç¨ã¯ãã©ã®ã±ã¼ã¹ã«è©²å½ããã®ã
ã©ã¤ã»ã³ã¹ã§ã¯ããã¸ã¿ã«ã»ã³ã³ãã³ãããã³ãã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ã¯ä»¥ä¸ã®ãããªå®ç¾©ã«ãªã£ã¦ããã
- 1æ¡4é ãããã¸ã¿ã«ã»ã³ã³ãã³ããã¨ã¯ããã¸ã¿ã«ã»ãã¼ã¿å½¢å¼ã«ãã£ã¦ã¨ã³ãã»ã¦ã¼ã¶ã«æä¾ãããå¶ä½ç©ã®ãã¨ããããåç»ã»éæ¢ç»çã®æ åã³ã³ãã³ãããã³ãã¬ãçªçµçã®æ¾éã³ã³ãã³ãããªãã³ã«æåããã¹ããç»åãå³å½¢çãå«ãã§æ§æãããå¶ä½ç©ãå«ã¿ã¾ããã
- 1æ¡5é ãããã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ãã¨ã¯ãPDFãã¡ã¤ã«ãã®ä»ãå種ã½ããã¦ã§ã¢ï½¥ããã°ã©ã ã«ãã£ã¦è£½ä½ããããã¸ã¿ã«ã»ã³ã³ãã³ãã§ãã£ã¦ããã®ä¸ã«ãã©ã³ãã表示ããããã«è¨±è«¾ããã°ã©ã ã®å ¨é¨ã¾ãã¯ä¸é¨ãåãè¾¼ã¾ããï¼ã¨ã³ããããããï¼ãã®ãããã¾ãããã©ã³ãããã¨ã³ãããããããã¨ã¯ãå½è©²ãã©ã³ããåãè¾¼ã¾ããç¹å®ã®ããã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ãã«ããã¦ã®ã¿è¡¨ç¤ºãããããã«ä½¿ç¨ããã¦ããç¶æ ãæãããã®ç¹å®ã®ããã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ã以å¤ã§ãã©ã³ãã表示ããããã«ä½¿ç¨ã§ãããã¸ã¿ã«ã»ãã©ã³ãã»ããã°ã©ã ã«å«ã¾ãã¦ããå ´åã¨åºå¥ããã¾ããã
Webã¢ããªã±ã¼ã·ã§ã³ã¯ãå®ç¾©ä¸ã¯ããã¸ã¿ã«ã»ãã¼ã¿å½¢å¼ã«ãã£ã¦ã¨ã³ãã»ã¦ã¼ã¶ã«æä¾ãããå¶ä½ç©ãã«è©²å½ããããããã¸ã¿ã«ã»ã³ã³ãã³ããã§ããããããã«ãã©ã³ããåãè¾¼ãã°ãããã¯ããã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ãã¨ãªãã¨æããããããããããã¯æ¬æ¥ã©ã¤ã»ã³ã¹ãæå³ããå®ç¾©ã§ã¯ãªããããããªããããªãã¡ãWebã¢ããªã±ã¼ã·ã§ã³èªä½ã¯ã¨ãããå¶ä½ç©ã§ããã«ãããããã«ãã£ã¦è¡¨ç¤ºãããããã¹ãã¯Webã¢ããªã±ã¼ã·ã§ã³ã«ç±æ¥ããã¨ã¯éããããã¨ãã°ãã£ããã¢ããªã¨ãã¦ãéä¿¡ãããããã¹ããIPAmjãã©ã³ãã§è¡¨ç¤ºããã¨ãããããªã±ã¼ã¹ã§ã¯ãã¢ããªã«å«ã¾ããªãããã¹ãã表示ããããã«ãã©ã³ãã使ããããã¨ã«ãªãããã®ãããªã¢ããªã±ã¼ã·ã§ã³ã¯ãå¶ä½ç©ã§ãããªããã¡ãã£ã¢ãªã®ã ãããIPAãã©ã³ãã©ã¤ã»ã³ã¹å¶å®è ã®æå³ã¨ãã¦ã¯ã±ã¼ã¹3ããé¤å¤ããããã®ã®ããã«æ¨å¯ãããããããã«ãã¦ã¯ãã©ã¤ã»ã³ã¹ä¸ã®å®ç¾©ã¯ä¸é©åã ã¨æãããã
ããã¸ã¿ã«ã»ã³ã³ãã³ããããã³ããã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ãã®å®ç¾©ãããããä¸é©åãªã®ã§ããã©ã³ããåãè¾¼ã¾ããWebã¢ããªã±ã¼ã·ã§ã³ã¯ãããã±ã¼ã¹3ã«è©²å½ãã¦ãã¾ãã¨ãã解éã¯ã§ããããããããã解éããªãã«ãã¦ããæ¬æ¥æ³å®ããã¦ããã§ãããå¤é¨ã®ããã¹ãã®è¡¨ç¤ºã«ãã©ã³ããç¨ããªããçã«ããã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ãã¨å¼ã¹ãWebã¢ããªã±ã¼ã·ã§ã³ãåå¨ããããããããHTMLã¨ããã®ã¯ã¢ããªã±ã¼ã·ã§ã³ä»¥åã«ãææ¸ã表ç¾ããããã®ãã©ã¼ãããã§ããã¯ããªã®ã ãããWebã¢ããªã±ã¼ã·ã§ã³ã®ãã¡ãçã«ããã¸ã¿ã«ã»ããã¥ã¡ã³ãã»ãã¡ã¤ã«ãã§ãããã®ã¯åå¨ããã
Webãã©ã³ããHTMLãã¡ã¤ã«ã®å¤é¨ã«ä¿åããã¦ãã¦ããã®ãã¡ã¤ã«ã«ãªã³ã¯ããã¦ããå ´åã¯ãæ¡æä¸ã®ãã¨ã³ããããã«è©²å½ããªãå¯è½æ§ãæ®ã£ã¦ã¯ãããããããWebãã©ã³ããdata URLã®å½¢ã§HTMLãã¡ã¤ã«ä¸ã«åãè¾¼ããã¨ãå¯è½ã§ããããã®å ´åã¯ãã¨ã³ããããã«è©²å½ãããã¨ã«äºãä½å°ã¯ãªãã ããã
ï¼ããããç´°ãããã¨ãè¨ãã°ããªã³ã¯ã®å ´åã¯ã¨ã³ãããã«è©²å½ããªãã¨ãã解éãåããã¨ã¯ãã©ããªã®ã ããï¼ HTMLãã¡ã¤ã«ã«data URLããåãè¾¼ããã¨ã¨ãåãªããªã³ã¯ã«ãããã¨ã®éã§ããã©ã³ãæ½åºã®é£ããã¯ã»ã¨ãã©å·®ããªããå¥ã®ææ¸ã§ã®åå©ç¨ãç°¡åã ãããã§ãdata URLã®å ´åã¯åãè¾¼ã¿ã§ããªã³ã¯ã®å ´åã¯åãè¾¼ã¿ã§ã¯ãªãã¨ãããã¨ã«ããåçæ§ã¯ã©ãã»ã©åå¨ããã ãããï¼ï¼
2. IPAmjææãWOFFåãããµã¼ãã¹ã¯ãIPAãã©ã³ãã©ã¤ã»ã³ã¹ä¸åé¡ã¨ãªãã®ãã
IPAmjææã®WOFFåã¯ãã±ã¼ã¹1ã«è©²å½ããã®ã ããã3æ¡1é ã®æ¡ä»¶ãæºããã°ãIPAmjææãWOFFåãããµã¼ãã¹ã¯å¯è½ã ã¨æãããããã®ãµã¼ãã¹ããæä¾ãããWOFFãã©ã³ããWebææ¸ã«åãè¾¼ãã§å©ç¨ããå ´åãããã¯ã±ã¼ã¹3ã«è©²å½ãã3æ¡1é ããã³2é ã®æ¡ä»¶ã«ããããå©ç¨ã§ããããã®ã¨ããåã«WOFFãã¡ã¤ã«ã¸ã®ãªã³ã¯ãåãè¾¼ãå½¢ã§ã¯ææ¸ã¸ã®åãè¾¼ã¿ã«è©²å½ããªãã¨ãã解éãããããããããã¯ã¨ã³ããµã¼ãã¼ã§WOFFãµãã»ããåãµã¼ãã¼ãããã©ã³ããåå¾ãã¦ææ¸ã«åãè¾¼ãã¨ããå¦çãè¡ããã¨ã§ãã確å®ã«ã±ã¼ã¹3ã«è©²å½ããå½¢ã§Webãã©ã³ããå©ç¨ã§ããããããããä»ã®ãã©ã¦ã¶ã¼ã®ä»çµã¿ã§ã¯ã»ãã¥ãªãã£ä¸ã®åé¡ã§ãç°ãªããµã¤ã5 6éã§ã¯ãã¯ãWebãã©ã³ãã®ãã£ãã·ã¥ã¯å ±æãããªã7 8ã®ã ããããªã³ã¯ã使ã£ãWebãã©ã³ãæä¾ãµã¼ãã¹ã¨ããã®ã¯ããã¯ããã£ãã·ã¥å¹çã®ç¹ã§ã¯ä¾¡å¤ããªãã®ã§ããã®ææ¸ã»ãã®ãã¼ã¸ã§ä½¿ããããã©ã³ããç´æ¥HTMLã«åãè¾¼ãï¼ã¤ã³ã©ã¤ã³åããï¼ã¨ããé¸æãåããã¨ãããã ããã¨æãã
- IPAフォントライセンスv1.0 | 一般社団法人 文字情報技術促進協議会↩
- The Open Source Definition – Open Source Initiative↩
- IPAexフォントおよびIPAフォントについて | 一般社団法人 文字情報技術促進協議会↩
- オープンソースの定義 (v1.9) 注釈付 – Open Source Group Japan – オープンソース・グループ・ジャパン↩
- Public Suffix List の用途と今起こっている問題について | blog.jxck.io↩
- 「same-site」と「same-origin」を理解する | Articles | web.dev↩
- Say goodbye to resource-caching across sites and domains | Stefan Judis Web Development↩
- キャッシュをパーティショニングすることでセキュリティとプライバシーを確保 | Blog | Chrome for Developers↩
MJæåæ å ±ä¸è¦§ é¨é¦ã»å ç»æ°ã®èª¤ãã«ã¤ãã¦
MJæåæ å ±ä¸è¦§ã®é¨é¦ã»å ç»æ°ã«èª¤ããããã®ã§ãç¾æç¹ã§æ°ã¥ãã¦ãããã®ãããã«ã¡ã¢ãã¦ãããï¼é¨é¦ãç°ä½åã®é¨é¦ã«ãªã£ã¦ãããã®ã®ãã¡ãå ç»æ°ã¨ç·ç»æ°ãä¸è´ãã¦ãããã®ãå«ããå ç»æ°ã«-ãæå®ããã¦ãããã®ã¯å«ãã§ããªããï¼
MJ000026 ã äº é¨6ç» å¹¿é¨8ç» MJ000499 ã åé¨7ç» éé¨10ç» MJ000946 ã ¯ó 人é¨5ç» å·±é¨2ç» MJ001318 㦲 å£é¨8ç» æé¨4ç» MJ003904 ä 人é¨18ç» è£é¨12ç» MJ003925 ä¨ æ¨é¨11ç» èé¨5ç» MJ006832 åó 人é¨9ç» ç¬é¨11ç» MJ007269 å ©ó 人é¨6ç» å ¥é¨8ç» MJ007496 å¦ åé¨5ç» åé¨7ç» MJ007952 å©ó åé¨12ç» å¹¿é¨14ç» MJ009348 å£ó çé¨17ç» MJ010288 ð¡ å°é¨2ç» ç»é¨1ç» MJ010857 帰ó åé¨8ç» å·¾é¨7ç» å½é¨7ç» æ¢é¨10ç» MJ013046 æ æé¨6ç» ç¤ºé¨10ç» MJ016562 çó ç«é¨10ç» éé¨14ç» MJ016795 çó çé¨11ç» ç©´é¨15ç» MJ019072 ç¨ó 禾é¨7ç» ç±³é¨12ç» MJ019186 穤 禾é¨14ç» ç±³é¨19ç» MJ019768 ç± ó 竹é¨16ç» èé¨16ç» MJ019851 粦ó ç«é¨12ç» ç±³é¨6ç» MJ021301 è¯ ç½é¨12ç» èªé¨6ç» MJ021531 èó åé¨9ç» è¸é¨3ç» MJ023019 èó 禾é¨18ç» è¸é¨14ç» MJ024216 è¦ó ç½é¨25ç» è¥¾é¨19ç» MJ024997 è² å£é¨9ç» è²é¨2ç» MJ026090 é¡ æ°´é¨14ç» è¾µé¨10ç» MJ026250 é¨ó æ¨é¨7ç» éé¨4ç» MJ028027 é¸ é©é¨11ç» éé¨20ç» MJ028062 éó é©é¨12ç» éé¨3ç» MJ029194 é¯ó å®é¨16ç» éé¨8ç» é¹¿é¨8ç» MJ029360 é± éé¨12ç» éº»é¨12ç» MJ029862 麿ó éé¨7ç» éº»é¨7ç» MJ030124 é¾ó ç«é¨0ç» é¾é¨0ç» MJ033043 ð¡ó éé¨10ç» MJ059404 ð ¼ éé¨10ç» MJ059587 ð«¸ó 彡é¨9ç» ç«é¨4ç» MJ059875 ð¤ó ç«é¨13ç» æ¥é¨13ç» MJ060005 ð® æ°´é¨13ç» MJ060014 𮿠ç«é¨30ç» MJ060316 ð« éé¨8ç» è¶³é¨11ç»
ã¿ã®ãã¹ããªã¼
- 2017-06-09 天çã®éä½çã«é¢ããçå®¤å ¸ç¯ç¹ä¾æ³ æç«å¤©çã®éä½çã«é¢ããçå®¤å ¸ç¯ç¹ä¾æ³ã«ã¤ãã¦
- 2017-12-08 çåéä½ã®ã¹ã±ã¸ã¥ã¼ã«ãé£è°æ±ºå®ããããæ°ããçµæ¸æ¿çããã±ã¼ã¸åã³å¤©çã®éä½çã«é¢ããçå®¤å ¸ç¯ç¹ä¾æ³ã®æ½è¡ææ¥ãå®ããæ¿ä»¤ã®é£è°æ±ºå®ã«ã¤ãã¦ã®ä¼è¦
- 2017-12-19 æ¥æ¬NBãISO/IEC JTC1/SC2ã¨UTCã«å å·ç¨ã®ã³ã¼ãã®äºç´ãè¦è«ãããL2/17-429 Request to reserve the code point for square Japanese new era name
- 2018-01-22 UTC #154 㧠U+32FF ãæ¿èªãããæ°ææ¡æåãã¤ãã©ã¤ã³ã«è¿½å ãããã Approved Minutes of UTC Meeting 154 ï¼Wayback Machine 2018-02-03æç¹ï¼
- 2018-07-10 UTC #155 Minutes of UTC Meeting 155
- 2018-07-16 æ°å å·ã®ããã« Unicode 12.1 ããªãªã¼ã¹ããè¨ç»ã®èæ ®äºé L2/18-220 Unicode 12.1 Planning Considerations
- 2018-09-11 IUC42 ã§æ°å å·å¯¾å¿ã«ã¤ãã¦ããã«ãã£ã¹ã«ãã·ã§ã³ãå¬ããããã¹ã©ã¤ã: Preparing for May 1, 2019: Japanâs New Era Name
- 2018-09-20 UTC #156 Approved Minutes of UTC Meeting 156
- 2019-04-01 æ°å å·ã®çºè¡¨ãæ¥æ¬NBããSC2, UTCã«å å·ãéç¥ããããL2/19-094 Announcement of Japanese new era name
- 2019-05-07 Unicode 12.1.0çºè¡ãã¿ãUnicodeã«è¿½å ãããã
ããã¯ã¨ãã¸ã¿ã«ç¤¾ä¼
ã³ã³ãã¥ã¼ã¿ã¼ã§ä½ãããã·ã¹ãã ã«åé¡ããã£ã¦ãå°ã£ã¦ããã¨ããããã·ã¹ãã ãä½ã£ã人ã¯ããã«ããªãããä¸ããä½ãç´ãæéã¯ãªãã£ããããããã触ã権éããªãã£ãããããããããã·ã¹ãã ããã©ãã«ããã¾ã使ããããã«ãããã¨ããããã¯ã¨ããã
ããã§ãããããã¯ãã¯ãã³ã³ãã¥ã¼ã¿ã¼ãå£ãã¨ããã·ã¹ãã ã«ä¾µå ¥ããã¨ããæå³ã§ã¯ãªãããåç´ã«ã³ã³ãã¥ã¼ã¿ã¼ã«ç²¾éããã¨ãããã¥ã¢ã³ã¹ã§ããªãã責任ã®å¢çãè¶ è¶ãã¦ãã·ã¹ãã ããã¾ãåãããã«ãã¦ãã¾ãè¡çºã®ãã¨ãè¨ã£ã¦ããããããããã°ãä»äººã«ä¾é ¼ãã¦ç´ãã¦ãããããã©ããããåé¿ãã¦ãèªåã§ã·ã¹ãã ãç´ãã¦ãã¾ããã¨ã ã
ãã¨ãã°ãmacOSã®æ¨æºãã©ã¦ã¶ã¼ã®Safariã«ã¯ããµã¤ãåºæã®ããã¯ãç¡å¹ã«ãããã¨ããéçºè åãã®è¨å®é ç®ããããããã¯ãã©ãããæå³ã ãããï¼
ä¸ã®ä¸ã®Webãµã¤ãã¯ãã³ã³ãã³ããé ä¿¡ããWebãµã¼ãã¼ã¨ããããåãåã£ã¦è¡¨ç¤ºãããã©ã¦ã¶ã¼ã®çµã¿åããã§ã§ãã¦ãããWebãµã¼ãã¼ã¨ãã©ã¦ã¶ã¼ã§ã©ããã£ã¦ããã¨ããããã¯åã決ãããã£ã¦ãããã«å¾ããã¨ã§ãã·ã¹ãã ã¯æ©è½ãã¦ãããã ãã©ãã°ããã«ãã£ã¦ã¯ãWebãµã¼ãã¼ã¨ãã©ã¦ã¶ã¼ã®ã©ã¡ããã«åé¡ããã£ã¦ãWebãµã¤ããå£ããå ´åãããã
ãããµã¼ãã¼ã«åé¡ãããã¨ãã¦ããSafariã使ã£ã¦ãã人ã¯Safariãå£ãã¦ããã¨æãã ããããSafariãä½ã£ã¦ãã人ãã¡ãä¸ã®ä¸ã®Webãµã¼ãã¼ãç´ãã¦ã¾ããããã«ããããªããæã£åãæ©ãããµã¤ããã¨ã«ç¹æ®ãªåãæ±ãã追å ãããã¨ã§ç´ãã¦ãã¾ããã¨ããããã§ã¯ããµã¤ãåºæã®ããã¯ãã¨å¼ãã§ããã®ã ã
人é社ä¼ã¯è²¬ä»»ã®å¢çãããããããã社ä¼ã§ã·ã¹ãã ãç´ããã¾ã£ã¨ããªæ¹æ³ãã¯ã責任ããã£ã¦ãã人ã«å¯¾ãã¦ãã¾ã交æ¸ãè¡ã£ã¦ãç´ãã¦ãããã¨ãããã¨ã ãããã§ããä¸ã®ä¸ã«ã¯ã誰ã責任ãæã£ã¦ããã®ãåãããªãã·ã¹ãã ãã誰ã責任ãæã£ã¦ããªãã·ã¹ãã ã¨ãããã®ãããã交æ¸ãã¦ãã失æãã¦ç®çãéæã§ããªããããããªããã¨ããä¸å®ããããã§ãããããè¿åãã¦ããããã¯ããè¡ã£ã¦ãã¾ãã°è©±ã¯ç°¡åã«ãªããã ããä»äººã®é¡è²ããããããã¨ãªããç®çãéæã§ãã¦ãã¾ãã®ã§ã楽ã ããå¹ççã§ãå®ãã¤ããããããã³ã³ããã®ã³ã¼ãã¼ã¡ã¼ã«ã¼ã®ãã¶ã¤ã³ãåããã¥ãããã¦ãããã©ã®ä¿®æ£ã¾ã¿ãã«ãªã£ããã¨ããã£ããã¤ã¾ãããããããã¨ã§ããã
ã½ããã¦ã§ã¢ã®ããã¯ã«ã¯ãã½ã¼ã¹ã³ã¼ããå ±æããæåãéè¦ã ãããã©ãããããç°¡åã«è£½åã®æè¨ãä¿®æ£ã§ããã®ã¨åãããã«ãã½ã¼ã¹ã³ã¼ãããããããã½ããã¦ã§ã¢ãç°¡åã«ä¿®æ£ã§ãããã½ã¼ã¹ã³ã¼ãããªããã°ãªãã§ãã¾ãããæ¹æ³ã¯ãããã©ãé£ãããªã£ã¦ãããã½ã¼ã¹ã³ã¼ãããªã¼ãã³ã½ã¼ã¹ã®å½¢ã§å ¬éãããã¨ã¯ãç§ã®äºæ¿ãªã©åããã¨ãèªç±ã«ããã¯ãã¦ãã ããã¨ãã表æã§ããã®ããã«ãã¦ããã¯ãèªç±ã«ãããããã¨ããçµæçã«ã¯æç¨ã§ãããã¨ãçµé¨çã«ç¥ã£ã¦ãããããã¦ãããã¯ãèªç±ã«ãããæåã¯ããããããªä¾¡å¤è¦³ã¨çµã³ã¤ãã¦ããã
ããã«ã¼æåã¯ãç§ãã¡ã¯åé¡ã«å¯¾ãã¦ã責任ã®å¢çãæ°ã«ããç´æ¥çã«åãçµããã¨ãã§ãããã¨ããæè¦ã«æ¯ãããã¦ããããã®ä¸æ¹ã§ããåé¡ã®è§£æ±ºæ¹æ³ã¯ãå ã®è²¬ä»»è ã«å¯¾ãã¦ãã£ã¼ãããã¯ãããã¹ãã ãã¨ããæè¦ãå ¼ãåãã¦ãããç¡ç§©åºãªããã¯ã¯ãããªã追å ã®ããã¯ãå°é£ã«ãã¦ãã¾ãããã½ããã¦ã§ã¢æ´æ°ã®ãã³ã«ãããã¯ãé©ç¨ããã®ã¯å¤§å¤ãªã®ã§ãæçµçã«ã¯ããªã¼ãã³ã½ã¼ã¹ã½ããã¦ã§ã¢ã®éçºã§ãã¢ããã¹ããªã¼ã ãã¨å¼ã°ãããå ã®éçºè²¬ä»»è ã«å¯¾ãã¦ãèªåã®è¡ãªã£ãå¤æ´ãé©ç¨ãã¦ãããããã«ä¾é ¼ãããããã©ã®ä¾ãã§ããã°ãããã©ãè²¼ã£ã¦ããã§ããã¨ããã®ã§ã¯ãªãããã¨ã®ã³ã¼ãã¼ã¡ã¼ã«ã¼ã®ãã¶ã¤ã³ã«åæ ãã¦ããããããªæãã ããã®éç¨ã§ãçµå±ã¯äº¤æ¸ãå¿ è¦ã«ãªã£ã¦ãããã ãããã©ã交æ¸ãã¦ä»äººã«ç´ãã¦ãããã®ã¨ãèªåã§ç´ããå¾ã«åæ ãã¦ãããããã交æ¸ããã®ã¨ã ã£ãããå¾è ã®æ¹ãç°¡åãªå ´åãå¤ãããç´ãã¦ãã§ã¯ãªãããç´ãã¾ãããã¨ããå½¢ã§ãææ¡ãè¡ãã®ã ãä½ããåã決ãã¦ãã課é¡ã«åãçµãã®ã§ã¯ãªãã課é¡ã«åãçµãã§ããåã決ããã¨ããé åºã®é転ã許容ãããã¨ããããè¿ éã§å¹æçãªèª²é¡è§£æ±ºã«ã¤ãªãã£ã¦ããã
ã¤ã³ã¿ã¼ãããã®æ ¹å¹¹ã¯ããã¯ã«æ¯ãããã¦ãããä¸ã®ä¸ã®ç¡æ°ã«åå¨ããã責任è ã®ä¸æãªã·ã¹ãã ã©ããããã¾ãç¹ãã¦éä¿¡ã§ããããã«ããå¿ è¦ãããããã§ããã®æè¡ã¯ä¸ããä¸ã¾ã§ãæåããèãããã¦è¨è¨ããã¦ããããã§ã¯ãªããããã©ã®ä¿®æ£ã®ãããªå¾ä»ãã®æè¡ã«ããµãã¦ããããã¡ãããã¤ã³ã¿ã¼ãããã«ããããããªæ¨æºè¦æ ¼ãåå¨ãã¦ãããã©ãè¦æ ¼ã§æ±ºãããã¨ä»¥ä¸ã«å®éã«åããã¨ã大äºã ãããè¦æ ¼ã«åããã¦ã·ã¹ãã ãç´ãã¨ããåã ãã§ã¯ãªããã·ã¹ãã ã«åããã¦è¦æ ¼ã«ç´ãã¨ããåãåããã¨ã«ãªããASCIIããæ³å®ãã¦ããªãå¤ãã·ã¹ãã ãç½®ãæããã«ä¸çä¸ã®æåãæ±ããããããUTF-8ã ã¨ãããã¼ã»ã³ãã¨ã³ã³ã¼ãã£ã³ã°ã ã¨ããããããæè¡ãçã¿åºããã¦ãããããããããã®ããè¦æ ¼ã«ãªã£ã¦ãããã¤ã³ã¿ã¼ãããã®ä¸çã§ä½¿ãããè¦æ ¼ã¨ããã®ã¯ãå½ãå£ä½ãè°è«ãå°½ããã¦ãã¬ã¤ãªè¦æ ¼ãå®ããããåºã¾ãã¨ããããã¯ãæ¢åã®ã¨ã³ã·ã¹ãã ã«é©å¿ãããåªç§ãªããã¯ã§ãããã©ããã¨ããç¹ãæå©ã«åãããã«ã¿ããã
ããããããã¯ãæ¯ããæè¡ãæåãèæ¯ç¥èã¨ãã¦ããã¨ãç»å¤§éã®ããããããããè¶ æ£çµ±æ´¾ã¤ã³ãããã¨ãããã¼ã¯ã¼ããããªã¼ããªã¼ã»ã¿ã³ãã¬ãã¼ãã»ã³ã¼ã¨ã³ã®Anthemãå¼ç¨ãã¦ãã "There is a crack, a crack in everything. That's how the light gets in." ã¨ãããã¬ã¼ãºã«ã¤ãã¦ã®ç解ããæ·±ã¾ãã®ã§ã¯ãªãã ãããã責任å¢çã®è¶ è¶ãåé¡ã¨ãããèªç±ã«èª²é¡ã«åãçµããªããã¨ãåé¡ã¨ããææ³ãåé¡ããã¤ã¾ã§ã解決ããã絶æããã®ã§ã¯ãªããåé¡ãèªåã§è§£æ±ºã«ã¤ãªããããã¨ããå¸æãã·ã¹ãã ãå£ããªããã人éã管çããã®ã§ã¯ãªãã人éãèªçºçã«ã·ã¹ãã ãç´ããããèªç±ã«ããã¨ããæèããããã£ããã¨ãè¨ã£ã¦ããã®ã§ããããããã£ããããã¯ã«è¦ªåçãªèããä¼æ¥ã社ä¼ã«åãå ¥ããéè¦æ§ãããããã®èãæ¹ã«è¡¨ãã¦ããããã«ãç§ã¯æãã
ãã¸ã¿ã«ç¤¾ä¼ã®å®ç¾ã«ã¯ãæè¡ã«ç²¾éããåªç§ãªããã«ã¼ãå¿ è¦ãªããã§ã¯ãªããå¿ è¦ãªã®ã¯ãæè¡ã¸ã®ç²¾éã§ã¯ãªãã課é¡ã¸ã®ã¢ã¯ã»ã·ããªãã£ã ãæè¡ã¸ã®ç²¾éã¯ã課é¡ã«åãçµã¿ãããã¯ããçµæã¨ãã¦å¾ããããã®ã§ãã£ã¦ãããã¯ããåã«å¿ è¦ãªã®ã§ã¯ãªããããã¯ã¯ãæåã¯èº«è¿ã§ç°¡åãªã¨ããããã¯ããã¦ããã°ããã
ãã¸ã¿ã«ç¤¾ä¼ãå½¢æããããã¯ã¨ããèãæ¹ã¯ããã®ã¾ã¾ã§ã»ãã®åéã«ã¯é©ç¨ã§ããªããããããªãããªã¹ã¯ãé«ãé åã ããèªç±ã«ãããããªãã¨ããã·ã¹ãã ã¯å ¥æã§èª¿éããããåã決ããåã«åãçµã¾ããã®ã¯é£ããã¨ããããããã¨èª²é¡ã¯ããã¨æãããããããããã£ã課é¡ã ã£ã¦ã解決ããæ¹æ³ã¯åå¨ããã®ã§ã¯ãªãã ãããï¼ ããã¯ã¨ããè¡çºã社ä¼ã«çµã¿è¾¼ãã¨ããã¡ã¿ãªèª²é¡ã«ã¤ãã¦ãããã¯ãã¦ã¿ãã¹ããããããªãã
æå¨è¡¨ç¾ã¨ææ表ç¾
ããã¯ã 位置の外延的表現・内包的表現の区別と考察ノート ã®ç¶ãã®ãããªè©±ã§ãæ°å¦ã¨ããã°ã©ãã³ã°ã¯ãã¨ãã«ããããã¿ã§ã¯ãç©äºãã¾ã£ãããã¹ãã¹ã«æãã¦ããã®ã§ã¯ãªãã ãããï¼ ã¨ãã話ãæ¸ãã
ååã®è©±ã«ã¤ãã¦ç°¡åã«èª¬æããã¨ãããã°ã©ãã³ã°ã§ã¯ãä½ç½®ã表ç¾ããæ¹æ³ã«ã¯ãå¤å»¶ç表ç¾ãã¨ãå
å
ç表ç¾ããããã¨ãã話ããããJSONã§æ¸ãã° { "8": { "4": "çå°" } }
ããå¤å»¶ç表ç¾ãã { "çå°": [4, 8] }
ããå
å
ç表ç¾ãã§ããã®éã«ã©ãããéãããããç°¡åã«èå¯ãè¡ãªã£ã¦ããã
話ãããä¸è¬çã«ããã¨ãä½ç½®ã®è¡¨ç¾ã«éãããæ å ±ã®è¡¨ç¾å ¨è¬ã«ã¯ãä½ç½®ã使ã£ããæå¨è¡¨ç¾ï¼å¤å»¶ç表ç¾ï¼ãã¨ãå±æ§ã使ã£ããææ表ç¾ï¼å å ç表ç¾ï¼ããèãããããã³ã³ãã¥ã¼ã¿ã¼ã§ããã°ãã¡ã¢ãªã¢ãã¬ã¹ã«ãã£ã¦è¡¨ç¾ãããä½ç½®ã¨ããã®ä½ç½®ã§ããããããã»ã«ã«æ ¼ç´ãããé»è·ãªã©ã®å±æ§ã®çµã¿åããã使ã£ã¦æ å ±ã表ç¾ãã¦ããã®ã ããã表ãããæ å ±ã®ããããã¯ä½ç½®ã«ãã£ã¦ãæ®ãã®æ å ±ã¯å±æ§ã«ãã£ã¦ã表ç¾ããã¦ããã
æ å ±ã®è¡¨ç¾ã«ã¯æå¨è¡¨ç¾ã¨ææ表ç¾ãããèããã¨ã次ã®å³ã2éãã«ãæå¨ã¨ææããããã®è§£éã§èªã¿è§£ãããã¨ã«æ°ã¥ãã
ãã®å³ã¯ããªã¤ã©ã¼å³ã§ããããã«è¦ãããããã¯ã*Xã¯*Bã§ãããã¨ããå½é¡ããXãBã«ãããå³å½¢ã§è¡¨ããæå¨è¡¨ç¾ã ãããã¦ãAã®å é¨ã«BããBã®å é¨ã«Cãé ç½®ãããã¨ã§ã*Cãªãã°*Bã§ããã*Bãªãã°*Aã§ããããã¨ã表ç¾ãããï¼ããã§ãAã¨æ¸ããã®ã¯å³ã®é åã®ãã¨ã§ã*Aã¨æ¸ããã®ã¯ãé åã表ãç©äºã ãããã§ã®ã¢ã¹ã¿ãªã¹ã¯è¨å·ã*ãã¯ãè¨å·ã®ãããã¼ã·ã§ã³ã表ããã®ã ã¨èãã¦ã»ãããï¼
ãããããã®å³ãéãã¾ã«ææ表ç¾ã¨ãã¦èªãã§ããXãBããã¤ãå³å½¢ãã*Xã¯*Bã§ãããã¨ããå½é¡ã表ãã¨è¦ãã°ã©ãããAã®å é¨ã«BããBã®å é¨ã«Cãé ç½®ãããã¨ã§ã*Aãªãã°*Bã§ããã*Bãªãã°*Cã§ããããã¨ã表ç¾ãã¦ãããã¨èªãããããã§ããã¤ãã¤ã¾ã¯ãã£ã¦ãããã¾ããããã¯ãããã°ã©ãã³ã°ã«ããããªãã¸ã§ã¯ãã®è¡¨ç¾ã«ããä¼¼ã¦ããã
type A = { b: B } type B = { c: C } type C = {} const p: (a: A) => B = (a) => a.b const q: (b: B) => C = (b) => b.c const r: (a: A) => C = (a) => a.b.c
æ¥å¸¸çæ´»ã§èããã°ãã*Xã§ãããã¨ããæ å ±ããXããããã¨ããå½¢ã§è¡¨ç¾ãããã¨ã¯å¤ãããç§ã¯å¼è·å£«ã§ãããã¨ããæ å ±ããç§ã¯å¼è·å£«ããã¸ãæã£ã¦ãããã¨ããå½¢ã§ç¤ºããã¨ãããã ããããããã®ãã«æ票ãããã¨ããæ å ±ããæ票ç¨ç´ã«ããã®ããã¨æ¸ããã¨ããå½¢ã§ç¤ºããã¨ãããã ããããã¡ãããã*Xã§ãããã¨ããæ å ±ããXã«ãããã¨ããå½¢ã§è¡¨ç¾ãããã¨ãå¤ãããããç§ã®ååã¯å¼è·å£«ä¼ã®åç°¿ã«ãããã¨ããããã®ããã¨æ¸ãã¦ããæ ã«ã·ã¼ã«ãè²¼ããã¨ããä¾ãèããããã
ããã¾ã§ã®è©±ã¯æ½è±¡çã ããUIãã¶ã¤ã³ããã¼ã¿ã®å¯è¦åã«ããã¦ã¯ãèæ ®ãã¹ããã¨ã«æããããã¨ãã°æ£å¸å³ãªã©ã¯ã¾ãã«å±æ§ãä½ç½®ã«å¤æãã¦è¡¨ç¾ãããã®ã ã¨è¨ããã人éã«ã¨ã£ã¦ç解ãããã表ç¾ãè¡ãããã«ã¯ãã©ã®ããã«ä¸¡è ã®å¤æãè¡ãã®ãã®èå¯ã¯éè¦ã«ãªãã ããã
æ¼¢åãã¼ã¿ãã¼ã¹ã使ã£ã¦æ¼¢åãã³å³ãä½åãã
æ¼¢åãã³å³ã¯ãQuizKnockããã£ã¦ããæ¼¢åã¯ã¤ãºã§ããæ¡ä»¶ã3ã¤ä¸ããããã®ã§ãè¤æ°ã®æ¡ä»¶ã«å½ã¦ã¯ã¾ãæ¼¢åãçãã¦ããã¾ãã
ãã®è¨äºã§ã¯ãæ¼¢åæ å ±ãã¼ã¿ãã¼ã¹ Mojidata ãæ´»ç¨ãã¦ãæ¼¢åãã³å³ãä½åãã¦ã¿ããã¨æãã¾ãã
Mojidataã¯SQLiteã¨ãããã¼ã¿ãã¼ã¹ã¨ã³ã¸ã³ã§ä½¿ããã¨ãã§ãããã¼ã¿ãã¼ã¹ã«ãªã£ã¦ãã¦ãæ å ±ãSQLã§åå¾ãããã¨ãã§ãã¾ãã
ãã¼ã¿ãã¼ã¹ã使ãæºå
Mojidataã使ãã«ã¯ãNode.jsã¨SQLiteãã¤ã³ã¹ãã¼ã«ãã¦ããã¨æ¥½ã§ãã
ãã®å¾ãã¿ã¼ããã«ã§æ¬¡ã®ã³ãã³ããå®è¡ãã¦ãmoji.dbããã¦ã³ãã¼ãããsqlite3ãèµ·åãã¦ãã ããã
# ä½æ¥ç¨ã®ãã£ã¬ã¯ããªãä½ã mkdir kanji-venn # ã«ã¬ã³ããã£ã¬ã¯ããªãå¤æ´ãã cd kanji-venn # npm ããã±ã¼ã¸ã®åæåï¼node_modulesãä½æ¥ç¨ãã£ã¬ã¯ããªã«ä½æããããï¼ npm init -y # mojidataããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã« npm install @mandel59/mojidata # SQLiteã®èµ·å sqlite3 node_modules/@mandel59/mojidata/dist/moji.db
SQLiteãèµ·åããã¨ã次ã®ãããªããã³ããã表示ããã¾ãã
SQLite version 3.40.0 2022-11-16 12:10:08 Enter ".help" for usage hints. sqlite>
å人çã«ã¯SQLiteã¯CLIããã ã¨å°ã使ãã¥ããã¨æãã®ã§ãæ®æ®µã¯èªä½ã®Erqã¨ãããã¼ã«ã使ã£ã¦ãã¾ããããã¯è£å®æ©è½ã使ããSQLããç°¡åã«æ¸ããErqã¯ã¨ãªè¨èªã使ã£ã¦æ å ±ãåå¾ã§ãã¾ããéçºéä¸ã§ãããã¥ã¢ã«çã¯ãªãã®ã§ãããErqã使ã£ã¦ã¿ããå ´åã¯ããã¡ããnpmã§ã¤ã³ã¹ãã¼ã«ãã¦ä½¿ããã¨ãã§ãã¾ãã次ã®ã³ãã³ãã§Erqãã¤ã³ã¹ãã¼ã«ãã¾ãã
# Erqã®ã¤ã³ã¹ãã¼ã« npm install github:mandel59/erq # Erqã®èµ·å npx erq node_modules/@mandel59/mojidata/dist/moji.db
Erqãèµ·åããã¨ã次ã®ãããªããã³ããã表示ããã¾ãã
Connected to node_modules/@mandel59/mojidata/dist/moji.db erq>
ä»ã«DuckDBã使ã£ã¦èªã¿è¾¼ãæ¹æ³ããGUIã®ãã¼ã«ã使ãæ¹æ³ãããã¾ãã
æ¼¢åæ å ±ãåå¾ãã¦ã¿ã
ä½åããã«ããã£ã¦ãæ¼¢åã®æ¬¡ã®ãããªæ å ±ãåå¾ãããã§ãã
- 常ç¨æ¼¢åã®ä¸è¦§
- æ¼¢åã®èªã¿
- æ¼¢åã®ç·ç»æ°
- æ¼¢åã®é¨é¦
- æ¼¢åã®æ§é
常ç¨æ¼¢åã®ä¸è¦§ã¨èªã¿ã¯ã常ç¨æ¼¢å表ã®ãã¼ã¿ãæ ¼ç´ãã joyo
ãã¼ãã«ã«ä¿åããã¦ãã¾ããã¾ããç·ç»æ°ã¯MJæåæ
å ±ä¸è¦§ã®ãã¼ã¿ãæ ¼ç´ãã mji
ãã¼ãã«ãããé¨é¦ã¯ mji_rsindex
ãã¼ãã«ãããæ¼¢åã®æ§é 㯠ids
ãã¼ãã«ãããããããåå¾ã§ãã¾ãã
erq> joyo limit 10;; select * from joyo limit 10 ["æ¼¢å","é³è¨","ä¾","åè"] ["äº","ã¢","[\"äºæµ\",\"äºéº»\",\"äºç±å¸¯\"]",""] ["å","ã¢ã¤","[\"åæ\",\"åé¡\",\"æ²å\"]",""] ["å","ããã","[\"åã\",\"åããªè©±\",\"åããã\"]",""] ["å","ãããã","[\"åãã\",\"åãã¿\"]",""] ["æ¨","ã¢ã¤","[\"æ¨æ¶\"]",""] ["æ","ã¢ã¤","[\"ææ \",\"æèª\",\"ææ\"]","æåªï¼ãã²ãï¼ç"] ["æ","ã¢ã¤","[\"ææ§\"]",""] ["æª","ã¢ã¯","[\"æªäº\",\"æªæ\",\"éæª\"]",""] ["æª","ãª","[\"æªå¯\",\"好æª\",\"ææª\"]",""] ["æª","ããã","[\"æªã\",\"æªã\",\"æªè \"]",""] 10 rows (0.011s)
èªã¿æ
å ±ãã¥ã¼ kanji_reading
ãå®ç¾©ãã¦ãå¿
è¦ãªæ
å ±ã ãã使ãããããã¾ãã
erq> view temp.kanji_reading = joyo {k: æ¼¢å, r: é³è¨};; create view `temp`.kanji_reading as with kanji_reading as (select æ¼¢å as k, é³è¨ as r from joyo) select * from kanji_reading ok (0.002s) erq> kanji_reading limit 10;; select * from kanji_reading limit 10 ["k","r"] ["ä¸","ã²ã¨"] ["ä¸","ã²ã¨ã¤"] ["ä¸","ã¤ã"] ["ä¸","ã¤ã"] ["ä¸","ãã§ã¦"] ["ä¸","ãã¤"] ["ä¸","ãªãª"] ["ä¸","ãªãªã¤"] ["ä¸","ãªã®"] ["ä¸","ã·ã"] 10 rows (0.000s)
ç·ç»æ°ã¨é¨é¦ãæ§é ãåå¾ãããã¥ã¼ãå®ç¾©ãã¾ãã
ç·ç»æ°æ
å ±ãã¥ã¼ kanji_strokes
ã®å®ç¾©
erq> view temp.kanji_strokes = mji[æ¼¢åæ½ç='常ç¨æ¼¢å']{k: å®è£ ããUCS, s: ç·ç»æ°};; create view `temp`.kanji_strokes as with kanji_strokes as (select å®è£ ããUCS as k, ç·ç»æ° as s from mji where (æ¼¢åæ½ç = '常ç¨æ¼¢å')) select * from kanji_strokes ok (0.000s) erq> kanji_strokes limit 10;; select * from kanji_strokes limit 10 ["k","s"] ["ä¸",1] ["ä¸",2] ["ä¸",2] ["ä¸",3] ["ä¸",3] ["ä¸",3] ["ä¸",3] ["ä¸",3] ["ä¸",4] ["ä¸",3] 10 rows (0.001s)
é¨é¦æ
å ±ãã¥ã¼ kanji_radical
ã®å®ç¾©
erq> view temp.kanji_radical = mji[æ¼¢åæ½ç='常ç¨æ¼¢å'] -:MJæåå³å½¢å:> mji_rsindex -:é¨é¦:> radicals {k: 対å¿ããUCS, rad: é¨é¦æ¼¢å};; create view `temp`.kanji_radical as with kanji_radical as (select 対å¿ããUCS as k, é¨é¦æ¼¢å as rad from mji join mji_rsindex on mji.MJæåå³å½¢å = mji_rsindex.MJæåå³å½¢å join radicals on mji_rsindex.é¨é¦ = radicals.é¨é¦ where (æ¼¢åæ½ç = '常ç¨æ¼¢å')) select * from kanji_radical ok (0.000s) erq> kanji_radical limit 10;; select * from kanji_radical limit 10 ["k","rad"] ["ä¸","ä¸"] ["ä¸","ä¸"] ["ä¸","ä¸"] ["ä¸","ä¸"] ["ä¸","ä¸"] ["ä¸","ä¸"] ["ä¸","ä¸"] ["ä¸","ä¸"] ["ä¸","ä¸"] ["ä¸","ä¸"] 10 rows (0.001s)
æ§é æ
å ±ãã¥ã¼ kanji_ids
ã®å®ç¾©
erq> view temp.kanji_ids = ids[UCS in joyo{æ¼¢å}]{k: UCS, ids: IDS} distinct;; create view `temp`.kanji_ids as with kanji_ids as (select distinct UCS as k, IDS as ids from ids where (UCS in (select æ¼¢å from joyo))) select * from kanji_ids ok (0.000s) erq> kanji_ids limit 10;; select * from kanji_ids limit 10 ["k","ids"] ["ä¸","ä¸"] ["ä¸","⿱ä¸äº "] ["ä¸","ã¾â¿»ä¹ä¸"] ["ä¸","⿸ä¸ð "] ["ä¸","â¿»ð ä¹"] ["ä¸","ä¸"] ["ä¸","⿱âºä¸"] ["ä¸","⿱ä¸å"] ["ä¸","⿸ä¸â¿°ä¸¨ä¸¶"] ["ä¸","â¿»ä¸å"] 10 rows (0.003s)
ã¯ã¤ãºãä½åãã
ããã¾ã§ã§ããã°ããã¨ã¯ãæ¡ä»¶ã«å½ã¦ã¯ã¾ãæ¼¢åãåå¾ããã¯ã¨ãªãä½ãã ãã§ããå
ã®åç»ã®ä¾é¡ã§è¨ãã°ãããããããã9ç»ãããããããå§ã¾ããã¨ãã£ãæ¡ä»¶ã¯ãæ¼¢åãx
ã¨ããã°ãSQLã¨Erqã§ã¯ãããã次ã®ããã«è¡¨ç¾ã§ãã¾ãã
- ãããã
- SQL:
x in (select k from kanji_ids where ids glob 'â¿°æ°µ*')
- Erq:
x in kanji_ids[ids glob 'â¿°æ°µ*']{k}
- SQL:
- 9ç»
- SQL:
x in (select k from kanji_strokes where s = 9)
- Erq:
x in kanji_strokes[s = 9]{k}
- SQL:
- ãããããå§ã¾ã
- SQL:
x in (select k from kanji_reading where r glob 'ã*' or r glob 'ã»*')
- Erq:
x in kanji_reading[r glob 'ã*' or r glob 'ã»*']{k}
- SQL:
å常ç¨æ¼¢å x
ã«ã¤ãã¦ããããå¤å®ããè¤æ°ã®æ¡ä»¶ã«å½ã¦ã¯ã¾ããã®ã表示ããã°ä½åãã§ãããã§ããErqã§ã¯ã¨ãªãä½ã£ã¦ã¿ã¾ãã
/* 常ç¨æ¼¢åã x ã¨ããååã§åãåºã */ joyo {x: æ¼¢å} distinct /* åæ¼¢åã«ã¤ãã¦ãæ¡ä»¶ãå¤å®ãã */ { x, `ãããã`: x in kanji_ids[ids glob 'â¿°æ°µ*']{k}, `9ç»`: x in kanji_strokes[s = 9]{k}, `ãããããå§ã¾ã`: x in kanji_reading[r glob 'ã*' or r glob 'ã»*']{k} } /* è¤æ°ã®æ¡ä»¶ã«ãã¦ã¯ã¾ãæ¼¢åã®ã¿æ®ã */ [`ãããã` + `9ç»` + `ãããããå§ã¾ã` >= 2] /* ãã¦ã¯ã¾ãæ¡ä»¶ã§ã°ã«ã¼ãå */ { `ãããã`, `9ç»`, `ãããããå§ã¾ã` => group_concat(x) } ;;
ãããå ¥åããã¨:
erq> /* 常ç¨æ¼¢åã x ã¨ããååã§åãåºã */ joyo {x: æ¼¢å} distinct ...> /* åæ¼¢åã«ã¤ãã¦ãæ¡ä»¶ãå¤å®ãã */ ...> { ...> x, ...> `ãããã`: x in kanji_ids[ids glob 'â¿°æ°µ*']{k}, ...> `9ç»`: x in kanji_strokes[s = 9]{k}, ...> `ãããããå§ã¾ã`: x in kanji_reading[r glob 'ã*' or r glob 'ã»*']{k} ...> } ...> /* è¤æ°ã®æ¡ä»¶ã«ãã¦ã¯ã¾ãæ¼¢åã®ã¿æ®ã */ ...> [`ãããã` + `9ç»` + `ãããããå§ã¾ã` >= 2] ...> /* ãã¦ã¯ã¾ãæ¡ä»¶ã§ã°ã«ã¼ãå */ ...> { `ãããã`, `9ç»`, `ãããããå§ã¾ã` => group_concat(x) } ...> ;; select `ãããã`, `9ç»`, `ãããããå§ã¾ã`, group_concat(x) from (select x, x in (select k from kanji_ids where (ids glob 'â¿°æ°µ*')) as `ãããã`, x in (select k from kanji_strokes where (s = 9)) as `9ç»`, x in (select k from kanji_reading where (r glob 'ã*' or r glob 'ã»*')) as `ãããããå§ã¾ã` from (select distinct æ¼¢å as x from joyo) where (`ãããã` + `9ç»` + `ãããããå§ã¾ã` >= 2)) group by (`ãããã`), (`9ç»`), (`ãããããå§ã¾ã`) ["ãããã","9ç»","ãããããå§ã¾ã","group_concat(x)"] [0,1,1,"宣,å°,æ¿,æ½,æ,æ,æ³,ç²,ç,ç,çª,è"] [1,0,1,"æ¸ ,æ½,ç¬"] [1,1,0,"æ´,æ´,æ´¥,æ´ª,æ´»,æ´¾,æµ,æµ·"] [1,1,1,"æ´,æµ "] 4 rows (0.017s)
ã³ãã³ãã©ã¤ã³ããã¯ã¨ãªãå®è¡ãã
å
ã»ã©ã¯æã§ã¯ã¨ãªãå
¥åãã¦ãã¾ããããæ¯ååãããã«æã§å
¥åããã®ã¯é¢åãªã®ã§ã次ã®ã¯ã¨ãªã kanji-venn.erq
ãã¡ã¤ã«ã«ä¿åãã¦ãããã³ãã³ãã§å®è¡ãã¦ã¿ã¾ãã
view temp.kanji_reading = joyo {k: æ¼¢å, r: é³è¨};; view temp.kanji_strokes = mji[æ¼¢åæ½ç='常ç¨æ¼¢å']{k: å®è£ ããUCS, s: ç·ç»æ°};; view temp.kanji_radical = mji[æ¼¢åæ½ç='常ç¨æ¼¢å'] -:MJæåå³å½¢å:> mji_rsindex -:é¨é¦:> radicals {k: 対å¿ããUCS, rad: é¨é¦æ¼¢å};; view temp.kanji_ids = ids[UCS in joyo{æ¼¢å}]{k: UCS, ids: IDS} distinct;; /* 常ç¨æ¼¢åã x ã¨ããååã§åãåºã */ joyo {x: æ¼¢å} distinct /* åæ¼¢åã«ã¤ãã¦ãæ¡ä»¶ãå¤å®ãã */ { x, p1: x in kanji_ids[ids glob 'â¿°æ°µ*']{k}, p2: x in kanji_strokes[s = 9]{k}, p3: x in kanji_reading[r glob 'ã*' or r glob 'ã»*']{k} } /* è¤æ°ã®æ¡ä»¶ã«ãã¦ã¯ã¾ãæ¼¢åã®ã¿æ®ã */ [p1 + p2 + p3 >= 2] /* ãã¦ã¯ã¾ãæ¡ä»¶ã§ã°ã«ã¼ãå */ {p1, p2, p3 => group_concat(x)} ;;
npx erq node_modules/@mandel59/mojidata/dist/moji.db < kanji-venn.erq
$ npx erq node_modules/@mandel59/mojidata/dist/moji.db < kanji-venn.erq Connected to node_modules/@mandel59/mojidata/dist/moji.db view temp.kanji_reading = joyo {k: æ¼¢å, r: é³è¨};; view temp.kanji_strokes = mji[æ¼¢åæ½ç='常ç¨æ¼¢å']{k: å®è£ ããUCS, s: ç·ç»æ°};; view temp.kanji_radical = mji[æ¼¢åæ½ç='常ç¨æ¼¢å'] -:MJæåå³å½¢å:> mji_rsindex -:é¨é¦:> radicals {k: 対å¿ããUCS, rad: é¨é¦æ¼¢å};; view temp.kanji_ids = ids[UCS in joyo{æ¼¢å}]{k: UCS, ids: IDS} distinct;; /* 常ç¨æ¼¢åã x ã¨ããååã§åãåºã */ joyo {x: æ¼¢å} distinct /* åæ¼¢åã«ã¤ãã¦ãæ¡ä»¶ãå¤å®ãã */ { x, p1: x in kanji_ids[ids glob 'â¿°æ°µ*']{k}, p2: x in kanji_strokes[s = 9]{k}, p3: x in kanji_reading[r glob 'ã*' or r glob 'ã»*']{k} } /* è¤æ°ã®æ¡ä»¶ã«ãã¦ã¯ã¾ãæ¼¢åã®ã¿æ®ã */ [p1 + p2 + p3 >= 2] /* ãã¦ã¯ã¾ãæ¡ä»¶ã§ã°ã«ã¼ãå */ {p1, p2, p3 => group_concat(x)} ;; create view `temp`.kanji_reading as with kanji_reading as (select æ¼¢å as k, é³è¨ as r from joyo) select * from kanji_reading ok (0.024s) create view `temp`.kanji_strokes as with kanji_strokes as (select å®è£ ããUCS as k, ç·ç»æ° as s from mji where (æ¼¢åæ½ç = '常ç¨æ¼¢å')) select * from kanji_strokes ok (0.000s) create view `temp`.kanji_radical as with kanji_radical as (select 対å¿ããUCS as k, é¨é¦æ¼¢å as rad from mji join mji_rsindex on mji.MJæåå³å½¢å = mji_rsindex.MJæåå³å½¢å join radicals on mji_rsindex.é¨é¦ = radicals.é¨é¦ where (æ¼¢åæ½ç = '常ç¨æ¼¢å')) select * from kanji_radical ok (0.000s) create view `temp`.kanji_ids as with kanji_ids as (select distinct UCS as k, IDS as ids from ids where (UCS in (select æ¼¢å from joyo))) select * from kanji_ids ok (0.000s) select p1, p2, p3, group_concat(x) from (select x, x in (select k from kanji_ids where (ids glob 'â¿°æ°µ*')) as p1, x in (select k from kanji_strokes where (s = 9)) as p2, x in (select k from kanji_reading where (r glob 'ã*' or r glob 'ã»*')) as p3 from (select distinct æ¼¢å as x from joyo) where (p1 + p2 + p3 >= 2)) group by (p1), (p2), (p3) ["p1","p2","p3","group_concat(x)"] [0,1,1,"宣,å°,æ¿,æ½,æ,æ,æ³,ç²,ç,ç,çª,è"] [1,0,1,"æ¸ ,æ½,ç¬"] [1,1,0,"æ´,æ´,æ´¥,æ´ª,æ´»,æ´¾,æµ,æµ·"] [1,1,1,"æ´,æµ "] 4 rows (0.032s)
æ°åã®å å çè¨æ³ã«ã¤ãã¦
å ¬ççéåè«ã«ã¤ãã¦ã»ã¨ãã©ãªã«ãç¥ããªãããããããæ¸ããã¨ã¯ééã£ã¦ããã®ãããããªããã©ãå¤å ¸çãªã¯ã©ã¹ãéåã®è¨æ³ã¯å ¬ççéåè«ã®å ã§ã¯è¤æ°ã®å ¬çã«å¯¾å¿ãã¦ããã¨ç解ãã¦ãããZFå ¬çç³»ã®ååºå ¬çã«å¯¾å¿ããè¨æ³ã¨ãã¦
ã¨ãããããªè¨æ³ãèãããããããããµã¤ãã¯å å çè¨æ³ã¨å¼ã°ãã¦ãããã ãã©ãå¥ã®ç½®æå ¬çã«æ ¹æ ãæã¤è¨æ³ãèãããã¦ã
ã®ãããªæ¸ãæ¹ãã§ããããã®ä¸¡è ãå å çè¨æ³ã¨å¼ã¶ã®ã¯ç´ãããããããååºå ¬çã«åºã¥ãè¨æ³ãååºè¨æ³ãç½®æå ¬çã«åºã¥ãè¨æ³ãç½®æè¨æ³ãç½®æè¨æ³ã¨å¼ã¶ãã¨ã«ãããï¼ã¯å½é¡ã§ããã¨èããã°ãå½é¡ãå·¦å´ã«æ¥ãååºè¨æ³ã¯å æ¥ã®ã¯ã©ã¹ã®è¨æ³ã®ã«ã¼ã«ãç ´ã£ã¦ããããã«æãããã左辺ã«æ¥ãã¯ååºè¨æ³ã®ä¸é¨ã¨ãã¦æ±ããããããã¨åæ§ã«ãç½®æè¨æ³ã®å³è¾ºã«æ¥ããå½é¡ã§ã¯ãªããç½®æè¨æ³ã®ä¸é¨ã¨ãã¦æ±ããããï¼
ã¨ããã§ãæ°åããã£ãã¨ãã¦ããã®æ°åã®åé ã2åããæ°åãã©ãæ¸ãã°ããã ãããã
ã¾ããµã¤ãã«
ã§ãããã®ã ããå å çè¨æ³ã®ããã«ãç°¡åã«æ¸ããããPythonã§ããã°ã
a = [1, 2, 3] b = [2*x for x in a]
ã¨æ¸ãã®ã ãããæ°å¼ã§ã
ã¨ãããã¨ãæãããããããã¨ããã®ã¯æ°æã¡ãæªãã¨è¨ãããaã¯æ°åã§ãããæ°åã¯ååãªã®ã ãããã¨æ¸ããã¨ãã®xã¯ãaã®æ°åã¨ãã¦ã®é ã§ã¯ãªãaã®éåã¨ãã¦ã®å ã§ãããaã®éåã¨ãã¦ã®å ã¨ã¯æ·»ãåã¨é ã®ãã¢ã§ããã®ã§ã¯ãã¨ããæ°æã¡ããããããããã¨
ã¨æ¸ãã®ããããã¾ã§ããã®ãªãããã£ã
ã¨æ¸ãã¦ãã¾ã£ã¦ããµã¤ãã«éåã®ç½®æè¨æ³ã§æ¸ãã¦ãã¾ã£ã¦ãããæ°ããããããããæä½ãããã®ã¯æ°åãªã®ã«ãããã§ã¯æ°åã表ãååã表ãéåãæä½ãã¦ãããã¨ã«ãªã£ã¦ãã¾ããã®æ°æã¡æªããåé¡ã§ããã°ãç¢å°ã«ãã¦ãã¾ã£ã¦
ã§ãããããªãããããã¥ãããã
Tutorial Dã¨Erqã®æ¯è¼
Tutorial Dã¨Erqã¯é¨åçã«ä¼¼ãææ³ãæã£ã¦ãããããã®ç®çã¯ç°ãªã£ã¦ãããTutorial Dã¯ããã®ç®çãæ°å¦çã«ããç´ç²ãªé¢ä¿ä»£æ°ãå®ç¾ãããã¨ã§ããã®ã«å¯¾ããErqã¯SQLã®ã»ãã³ãã£ã¯ã¹ãä¿ã£ãã¾ã¾ææ³ãç°ãªããã®ã«ãã¦ããã
ãã®è¨äºã§ã¯ãTutorial Dã¨Erqãç°¡åã«æ¯ã¹ãããªãããã®è¨äºã§Tutorial Dã¨ãã¦ä¾ç¤ºãããã¯ãProject:M36 Relational Algebra Engineãå®è£ ãã¦ããè¨æ³ã§ããã
ï¼Project:M36ãå®éã«åããã¦è©¦ãããã£ãããæå ã®ç°å¢ã§ãã«ãã«å¤±æãã¦è©¦ãã¦ããªããï¼
ã»ãã³ãã£ã¯ã¹ã®éã
ç´ç²ãªé¢ä¿ããå¤éé¢ä¿ã
Tutorial Dã¯é¢ä¿ä»£æ°ã«å¿ å®ãªã»ãã³ãã£ã¯ã¹ãæã£ã¦ãããããã§æ±ãããé¢ä¿ã¯ã¿ãã«ã®éåã§ãã£ã¦ãéè¤ããã¿ãã«ãæããªãããå±æ§ã®é çªã¯éè¦ã§ã¯ãªãããé¢ä¿ã«å«ã¾ããã¿ãã«ã®éã«æé»ã®é åºã¯ãªãã
ä¸æ¹ã§Erqã®ã»ãã³ãã£ã¯ã¹ã¯åºæ¬çã«ã¯SQLã¨åãã§ãã£ã¦ãæ±ããããã¼ãã«ã¯ç´ç²ãªé¢ä¿ã¨ã¯éãããéè¤ããã¬ã³ã¼ãã許ãããã«ã©ã ã®é çªã¯éè¦ã§ãæé»ã®é åºãæã£ã¦ããã
NULLã»ä¸å¤è«çãæ¡ç¨ããã
SQLã¯TRUE/FALSE/UNKNOWNã®ä¸å¤è«çãæ¡ç¨ãã¦ãããï¼SQLiteã®å ´åãUNKNOWNã®ä»£ããã«NULLã使ããï¼ãã®ããã§ãå¤ã«NULLã絡ãã§ããå ´åã®å¯¾å¿ãé¢åãªãã¨ã«ãªã£ã¦ããã
æ¼ç®ã®æ¯è¼
Tutorial Dã¨Erqã§ãåã ã®æ¼ç®ãæ¯è¼ãã¦ã¿ãããã¼ã¿ã¨ãã¦ãTutorialD Tutorial for Project:M36ã§ä½¿ããã¦ãããã®ã¨åããChris Dateã®ãµã³ãã«é¢ä¿ãã¼ã¿ãç¨ããã
é¢ä¿ï¼ãã¼ãã«ï¼s
(suppliers) ã®å
容
s#,sname,status,city S3,Blake,30,Paris S4,Clark,20,London S5,Adams,30,Athens S1,Smith,20,London S2,Jones,10,Paris
é¢ä¿ï¼ãã¼ãã«ï¼p
(products) ã®å
容
p#,pname,color,weight,city P6,Cog,Red,19,London P5,Cam,Blue,12,Paris P1,Nut,Red,12,London P4,Screw,Red,14,London P3,Screw,Blue,17,Oslo P2,Bolt,Green,17,Paris
é¢ä¿ï¼ãã¼ãã«ï¼ sp
(supplierProducts) ã®å
容
s#,p#,qty S1,P1,300 S1,P2,200 S1,P3,400 S1,P4,200 S1,P5,100 S1,P6,100 S2,P1,300 S2,P2,400 S3,P2,200 S4,P2,200 S4,P4,300 S4,P5,400
Erq/SQLã§ã¯å¤ã«NULLãå ¥ãå ´åããããããããèæ ®ããã¨è¤éã«ãªã£ã¦ãã¾ãã®ã§ãããã§ã¯NULLãå ¥ããªãå ´åã ãã«ã¤ãã¦èãããã¨ã«ããã
é¢ä¿èªä½ã®è¡¨ç¤º
Tutorial DãErqããé¢ä¿ããèªä½ã表ãã®ã«ä½è¨ãªãã¼ã¯ã¼ããå¿
è¦ã¨ããªããé¢ä¿ï¼ãã¼ãã«ï¼ p
ã表示ãããã®ã§ããã°ãåã« p
ãã¯ã¨ãªããã°ããã
å±æ§ã®æ¹å
Tutorial Dã®å ´åã¯å±æ§ï¼ã«ã©ã ï¼ã®æ¹åã®ã·ã³ã¿ãã¯ã¹ãåå¨ãã¦ã
s rename {city as town}
ã®ããã«ããã¨ãå±æ§cityãtownã«æ¹åã§ããã
Erqã¯ãå°ãªãã¨ãç¾ç¶ã§ã¯ã«ã©ã ã®æ¹åã®è¨æ³ã¯åå¨ããªãã®ã§ããã¬ã¼ã¹è¨æ³ã§æ®ãã®ã«ã©ã ãé¸æããå¿ è¦ãããã
s{`s#`,sname,status,town: city}
å°å½±
Tutorial Dã¨Erqã§ãå°å½±ã®è¨æ³ã¯ä¼¼ã¦ãããã©ã¡ãããã¬ã¼ã¹ã使ã£ã¦ãå±æ§ãé¸æãããã¨ãã§ããã
p{color,city}
ãããTutorial Dã¯é¢ä¿ä»£æ°ã«å¿ å®ã§ããã®ã«å¯¾ããErqã¯SQLã¨åãã»ãã³ãã£ã¯ã¹ãæã£ã¦ãããããªãã¡ãTutorial Dã®å ´åã¯ã¿ãã«ã®éè¤ã¯é¤å»ãããã®ã§ããã®çµæã¯4件ã«ãªãä¸æ¹ã§ãErqã®å ´åã¯éè¤ãé¤å»ããããçµæã¯6件ã«ãªãã
Erqã§éè¤ã¿ãã«ãé¤å»ããã«ã¯ãæ示çã«distinct
ãã¤ããå¿
è¦ãããã
p{color,city} distinct
çµå
Tutorial Dã§ã¯join
ã¯èªç¶çµåã®ãã¨ã
s join sp
Erqã§ã¯SQLåæ§natural join
ã使ãã
s natural join sp
å°å½±ã®ç¥è¨
s join sp
ããé¢ä¿ s
ã«å«ã¾ããå±æ§ãã¹ã¦ã®å°å½±ãã¨ãã¨ããTutorial Dã§ã¯ {all from s}
ã¨æ¸ããErqã§ã¯ {s.*}
ã¨æ¸ãã
(s join sp){all from s}
s natural join sp {s.*} distinct
æ¡å¼µ
Tutorial Dã§ã¯ããæ¸ãã@
ã¯å±æ§ã表ãã
s:{status2:=add(10,@status)}
Erqã§ã¯å°å½±ã¨åºå¥ãããåããã¬ã¼ã¹è¨æ³ã使ãã°ããã
s{s.*, status2: status + 10}
ã¦ããªã³
Tutorial Dã§ã¯union
æ¼ç®åã使ãã
s union s
Erqã§ã¯ ;
ã§SQLã®union allç¸å½ã«ãªãã
s; s
distinct
ãæå¾ã«ã¤ããã¨ãunionã«ãªãã
s; s distinct
å·®
s minus s
Erqã«ã¯ç¾ç¶SQLã®exceptç¸å½ã®æ§æãåå¨ããªããããã¼ã¿ã«nullãå
¥ã£ã¦ããªããã° not in
ã使ã£ã¦å¯¾å¦ã§ããã
s[{`s#`, sname, status, city} not in s];;
ã»ãã¸ã§ã¤ã³
Tutorial D ã® s semijoin sp
㯠(s join sp){all from s}
ã¨åãã
s semijoin sp
Erqã«ã»ãã¸ã§ã¤ã³ã®è¨æ³ã¯ãªããããã©ã±ããè¨æ³ï¼whereå¥ï¼ã¨in
æ¼ç®åã§ã»ãã¸ã§ã¤ã³ã表ç¾ã§ããã
s[{`s#`} in sp{`s#`}]
ãã ããå¤ééåã許ãErq/SQLã®ã»ãã³ãã£ã¯ã¹ä¸ã§ã¯ãx natural join y {x.*} distinct
㨠x[{c} in y{c}]
ã¯åãçµæã«ãªãã¨ã¯éããªãã
ã¢ã³ãã¸ã§ã¤ã³
s
ã®ã¿ãã«ã®ãã¡ãã»ãã¸ã§ã¤ã³ s semijoin sp
ã«å«ã¾ããªããã®ãããªãé¢ä¿ã s antijoin sp
ã
s antijoin sp
ããªãã¡
s minus (s semijoin sp)
ã¨åãã
Erqã§ã¯
s[{`s#`} not in sp{`s#`}]
ã¨æ¸ãã°ããã
å¶é
Tutorial D
s where lt(@status, 30)
Erq
s[status < 30]
ã°ã«ã¼ãã»ã¢ã³ã°ã«ã¼ã
Tutorial Dã§ã¯ãã°ã«ã¼ãåããã¨ãµããªã¬ã¼ã·ã§ã³ãå¤ã«æã£ãå±æ§ãä½ããããAggregate Queries
s group ({s#,sname,status} as subrel)
ãµããªã¬ã¼ã·ã§ã³ã«å¯¾ãã¦ã¢ã³ã°ã«ã¼ããè¡ãã¨å ã«æ»ãã
s group ({s#,sname,status} as subrel) ungroup subrel
ï¼å人çã«ã¯ãã°ã«ã¼ãåã®åºæºã«ãªãcityãé½ã«æå®ãããé½å¸ä»¥å¤ã®å±æ§ãåæãããã¨ã«ãªãã®ãæ°ã«ãªãã{all but city}ã¨æ¸ããããå¥ã«ããã®ã ããããï¼
Erq/SQLiteã§ã¯ãµããªã¬ã¼ã·ã§ã³ã¯åå¨ããªãã代ããã«json_group_arrayã使ã£ãã°ã«ã¼ãåãè¡ããã
s{city => subrel: json_group_array(json_array(`s#`, sname, status))}
JSONããã®ã¢ã³ã°ã«ã¼ãããé·ããªãããä¸å¿å¯è½ã¨ãªã£ã¦ããã
s{city => subrel: json_group_array(json_array(`s#`, sname, status))} join j: json_each(subrel) {`s#`: j.value->>0, sname: j.value->>1, status: j.value ->> 2, city}
éç´
Tutorial Dã§ã¯ãªã¬ã¼ã·ã§ã³é¢æ°ãç¨æããã¦ããã®ã§ãã°ã«ã¼ãåããå¾ã«ããªã¬ã¼ã·ã§ã³é¢æ°ãé©ç¨ããå±æ§ã追å ããã°ããã
s group ({s#,sname,status} as subrel):{citycount:=count(@subrel)}
Erqã§ã¯ãéç´é¢æ°ã使ãã
s{city => citycount: count(*), subrel: json_group_array(json_array(`s#`, sname, status))}
ç°¡åé¢ä¿ç §ä¼è¨èª Erq ã§å¿«é©ãªãã¼ã¿ãã¼ã¹åæçæ´»ãéã
Erqï¼ã¢ã¼ã¯ï¼ã¯ãSQLã®ä»£ããã«ã¢ãããã¯ãªãã¼ã¿åæã«ç¨ãããã¨ã主ç®çã¨ãããæ°ãããã¼ã¿ãã¼ã¹è¨èªã§ãããªã¬ã¼ã·ã§ãã«ãã¼ã¿ãã¼ã¹ã¯ä¾¿å©ã§ãããã¢ãããã¯ãªãã¼ã¿åæãè¡ãä¸ã§ãSQLã®ææ³ã¯é¢åãªãã®ã§ããErqã¯ãSQLã®ã»ãã³ãã£ã¯ã¹ã¯æ¥µåãã®ã¾ã¾ã«ç°ãªãææ³ãæ¡ç¨ãããã¨ã§ãç°¡åã«ã¯ã¨ãªãæ¸ããããã«ãªã£ã¦ãã¾ãã
SQLã¯ã¨ãªã®å®ä¾
ç§ã¯SQLiteãã¼ã¿ãã¼ã¹ã«æ¼¢åã®æåæ å ±ãå ¥ãã¦ãè¤éãªæ¤ç´¢ãåæãã§ããããã«ãã¦ããã®ã§ãããå®éã«ãã®ãã¼ã¿ãã¼ã¹ã使ã£ãã¯ã¨ãªä¾ãè¦ã¦ã¿ã¾ãããã使ã£ã¦ããMojidataãã¼ã¿ãã¼ã¹ã¯ã次ã®ãªãã¸ããªãããã«ãã§ãã¾ãã
ã¾ããæ¼¢åã®èªã¿ãéããmji_readingãã¼ãã«ã®å
容ãå
¨é¨è¡¨ç¤ºããããã«ãSQLã§æ¬¡ã®ããã«ç
§ä¼ãã¾ããï¼æ«å°¾ã®ã»ãã³ãã³ ;
ã¯ãSQLite CLIã«ãããæã®çµç«¯è¨å·ã§ããï¼
select * from mji_reading;
ãã¼ã¿ã¯å ¨é¨ã§122148件ããã®ã§ãããåé ã®ãã¼ã¿ã¯ãããªæãã«ãªã£ã¦ãã¾ããMJæåå³å½¢åã¯ãæåæ å ±åºç¤ã«ãããå³å½¢çªå·ã§ãã
"MJæåå³å½¢å","èªã¿" MJ000001,"ããªã" MJ000001,"ããããã" MJ000001,"ã®ã¾" MJ000002,"ãã" MJ000004,"ãã¥ã¦" MJ000004,"ãã" MJ000005,"ãã³" MJ000006,"ã" MJ000006,"ãããã¶" MJ000007,"ã«"
ããã§ãç°¡åãªåæã¨ãã¦ãèªã¿ãã¨ã«ä»¶æ°ãã«ã¦ã³ãããå¤ãé ã«10件表示ãã¦ã¿ã¾ãããã
select èªã¿, count(*) from mji_reading group by èªã¿ order by count(*) desc limit 10;
"èªã¿",count(*) "ã³ã¦",2775 "ã·ã§ã¦",1985 "ã½ã¦",1732 "ã·",1730 "ãã¦",1675 "ã",1536 "ã«ã³",1515 "ã»ã³",1476 "ãã§ã¦",1437 "ã±ã³",1279
ã«ã©ã ã追å ããèªã¿ã«å¯¾å¿ããæ¼¢åã®ä¾ãããã¤ã表示ãã¦ã¿ã¾ããããmji_readingã«æ ¼ç´ããã¦ããã®ã¯Unicodeã§ã¯ãªãMJæåå³å½¢åãªã®ã§ãUnicodeã®æ¼¢åã表示ããã«ã¯ãå¥ã®ãã¼ãã« mji ã¨çµåãã¦ç
§ä¼ããå¿
è¦ãããã¾ããUnicodeã¨MJæåå³å½¢åã¯1対å¤å¯¾å¿ãªã®ã§ãéè¤ããUnicodeãæé¤ããããã«ãselectå¥ã«distinctãã¼ã¯ã¼ãã使ãã¾ããã¾ãã表示ããæ¼¢åãæ大5ã¤ã«å¶éããããã«ããµãã¯ã¨ãªãäºéã«ä½¿ã£ã¦ãlimitå¥ã§å¶éãããããã¼ã¿ã«å¯¾ãã¦group_concat()
éç´é¢æ°ã§éç´ãè¡ããã¨ã«ãã¾ããããããã¨ãã¯ã¨ãªã¯ãã®ããã«ãªãã¾ãã
select èªã¿, count(*), ( select group_concat(c) from ( select distinct 対å¿ããUCS as c from mji natural join mji_reading as r where r.èªã¿ = mji_reading.èªã¿ limit 5 ) ) as ä¾ from mji_reading group by èªã¿ order by count(*) desc limit 10;
"èªã¿",count(*),"ä¾" "ã³ã¦",2775,"ã¬,ã¶,ã,ã,ã" "ã·ã§ã¦",1985,"ã®,ã®,ã¼,ã±,ã" "ã½ã¦",1732,"ã®,ã¿,ã,ã,ã¿" "ã·",1730,"ã¥,ã,ã¾,ã¨,ã¼" "ãã¦",1675,"ã½,ã,ã±,ã¸,ã" "ã",1536,"ã,ã§,ã¶,ã«,ã³" "ã«ã³",1515,"ã,ã§,ã,ã¶,ã¤" "ã»ã³",1476,"ã,ã,ã¨,ã°,ã" "ãã§ã¦",1437,"ã©,ã,ã,ã,ã³" "ã±ã³",1279,"ã¸,ã½,ã©,ãº,ã"
ä¸è¨ã®ä¾ã¯åç´ã§ãããSQLã®åé·æ§ã»ç ©éæ§ããã表ãã¦ãã¾ãã
- selectå¥ã¨group byå¥ãorder byå¥ã«éè¤ãã¦æ¸ããã¨ã«ãªãã
- selectå¥ã¯ã¯ã¨ãªã®å é ãgroup byå¥ãorder byå¥ã¯ã¯ã¨ãªã®æ«å°¾ã«ããã®ã§ãã«ã¼ã½ã«ç§»åãé¢åãããã
- ãµãã¯ã¨ãªã«ãé½åº¦selectãã¼ã¯ã¼ããæ¸ãã®ã§ãå¤éã®ãµãã¯ã¨ãªã¯è¨è¿°éããããå¤ããªã£ã¦ãã¾ãã
- å¦çã®æµãä¸ã¯å¾ã«ããselectå¥ãå é ã«ããã®ã§ãå¦çã®æµããã¯ã¨ãªä¸ã§è¡ã£ããæ¥ãããã¦ãã¾ãã
- ãã¼ãã«åãã«ã©ã åã®å¥åãå¼ã®å¾ã«æ¸ãã®ã§ãå¾ããèªãã¨ããç¹ã«é·ãå¼ã®å ´åã«ãè¦ã¥ããã
Erqã¯ã¨ãªã®å®ä¾
ä»åº¦ã¯åãåæãErqã§è¡ã£ã¦ã¿ã¾ãããããã¼ãã«ã®å ¨ä»¶åå¾ã¯ãErqã§ã¯ãã¼ãã«åãæ¸ãã ãã§ããï¼Erq CLIã§ã¯ãæã®çµç«¯è¨å·ã«";;"ã使ã£ã¦ãã¾ããï¼
mji_reading;;
èªã¿ãã¨ã«ä»¶æ°ãã«ã¦ã³ãããå¤ãé ã«10件表示ããã«ã¯ã次ã®ããã«æ¸ãã¾ãã
mji_reading {èªã¿ => count(*) desc} limit 10;;
ãã¬ã¼ã¹ã»ã¢ãã¼è¨æ³ { ... => ... }
ã¯Erqã«ãããéç´ã¯ã¨ãªã®æ¸ãæ¹ã§ãã¢ãã¼ã®å·¦å´ã«ã°ã«ã¼ãã«ä½¿ãã«ã©ã ããã¢ãã¼ã®å³å´ã«éç´é¢æ°ã®ã«ã©ã ãæ¸ãã¾ããã¾ããã«ã©ã ã®å¾ã« asc
/desc
ãæå®ãããã¨ãã§ãã¾ãããã®è¨æ³ã«ãã£ã¦ãSQLã®selectå¥ã»group byå¥ã»order byå¥ã®æå®ãä¸åº¦ã«è¡ããã®ã§ãErqã§ã¯éç´ãæ¸ãã®ãç°¡åã«ãªã£ã¦ãã¾ãã
ãµãã¯ã¨ãªã¯ã©ãã§ãããããSQLã®ã¨ãã¨åæ§ã«ãæ¼¢åã®ä¾ã®ã«ã©ã ã追å ãã¦ã¿ã¾ãã
mji_reading { èªã¿ => count(*) desc, ä¾: from mji natural join r: mji_reading [r.èªã¿ = mji_reading.èªã¿] {c: 対å¿ããUCS} distinct limit 5 {group_concat(c)} } limit 10;;
- Erqã§ã¯ããµãã¯ã¨ãªã®å
é ã«
from
ãæ¸ãã¾ãããµãã¯ã¨ãªãæ¬å¼§ã§æ¬ãå¿ è¦ã¯ããã¾ãããï¼ãããã¬ãã«ã®ã¯ã¨ãªã«ãfrom
ãã¤ãã¦è¯ãã®ã§ãããçç¥ã§ãã¾ãããµãã¯ã¨ãªã§ã¯ãã¼ãã«åã¨ã«ã©ã åã®åºå¥ã®ãããåºæ¬çã«ã¯from
ãã¼ã¯ã¼ããå¿ è¦ã§ããï¼ - ã«ã©ã åããã¼ãã«åã®å¥åã¯ãå¼ã®åã«æ¸ãã¾ãã
- ãã©ã±ããè¨æ³
[...]
ã¯whereå¥ã»havingå¥ã«ç¸å½ãã¾ãã - ãã¬ã¼ã¹è¨æ³
{...}
ã¯selectå¥ã«ç¸å½ãã¾ãããfromå¥ã®å¾ã«æ¸ãã¾ãã - distinctãã¼ã¯ã¼ãã¯ãErqã§ã¯ç¬ç«ããdistinctå¥ã§ãã
- ãã©ã±ããè¨æ³ããã¬ã¼ã¹è¨æ³ã¯ãã¯ã¨ãªã«è¤æ°æ¸ãã¦ãåé¡ããã¾ããã
Erqã®ãããã®ç¹å¾´ã«ãããSQLã§ã¯äºéã®ãµãã¯ã¨ãªã¨ãã¦æ¸ãã¦ããã¯ã¨ãªãããã£ããã¨ããç´åçãªãµãã¯ã¨ãªã¨ãã¦è¨è¿°ã§ãã¾ããã
ãã®ã»ãã®ã¯ã¨ãªä¾
ä»ã«ãããã¤ãã¯ã¨ãªä¾ãè¼ãã¦ã¿ã¾ããErq CLIã§ã¯Erqã¯ã¨ãªããå¤æãããSQLãåºåããã®ã§ãã©ãããå¤æãè¡ããããåããããã«ãªã£ã¦ãã¾ãã
ãã©ã±ããè¨æ³ãhavingå¥ã«å¤æãããä¾
erq> unihan_variant[property='kTraditionalVariant']{s: UCS => t: group_concat(value, '')}[count(*)>1] limit 10;; select UCS as s, group_concat(value, '') as t from unihan_variant where (property = 'kTraditionalVariant') group by (UCS) having (count(*) > 1) limit 10 ["s","t"] ["ä´","é·é·"] ["ä´","é·¿é¸"] ["ä¹","幺麼麽"] ["äº","äºé²"] ["伪","å½å"] ["ä½","ä½é¤"] ["å²","æ²è¡"] ["åº","åºé½£"] ["å","ææ·"] ["å","ç¼é«®"] 10 rows (0.015s)
å ±éãã¼ãã«å¼ã¨ã¦ããªã³
erq> with t(a, b) as (`kdpv_cjkvi/non-cognate`{subject, object}) (t{a, b}; t{b, a}) join unihan_kTotalStrokes on a = UCS {a, b, s: cast(value as integer) asc}[s = 1];; with t(a, b) as (select subject, object from `kdpv_cjkvi/non-cognate`) select a, b, cast(value as integer) as s from (select a, b from t union all select b, a from t) join unihan_kTotalStrokes on a = UCS where (s = 1) order by (cast(value as integer)) asc ["a","b","s"] ["ä¹","ä¹",1] ["ä¹","ð¯ ",1] ["ä¹","ð¯ ",1] ["ä¹","ð ",1] ["ä¹","ä¹",1] ["ð ","ä¹",1] ["ð¯ ","ä¹",1] ["ð¯ ","ä¹",1] 8 rows (0.015s)
å ±éãã¼ãã«å¼ã使ã£ãå帰ã¯ã¨ãª
erq> with g(i) as ({i: 1}; g{i + 1} limit 10) g;; with g(i) as (select 1 as i union all select i + 1 from g limit 10) select * from g ["i"] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 10 rows (0.000s)
å帰ã¯ã¨ãªã使ã£ã¦ã°ã©ãã辿ã
erq> with v(a, b) as (mjsm natural join mji {対å¿ããUCS, 縮éUCS}) ...> with w(a, b) as (v; v{b, a}) ...> with g(a, b) as ({null, 'å'}; g join w on g.b = w.a {w.a, w.b} distinct) ...> g {a => group_concat(b)};; with v(a, b) as (select 対å¿ããUCS, 縮éUCS from mjsm natural join mji), w(a, b) as (select * from v union all select b, a from v), g(a, b) as (select distinct null, 'å' union select distinct w.a, w.b from g join w on g.b = w.a) select a, group_concat(b) from g group by (a) ["a","group_concat(b)"] [null,"å"] ["ã¼","å¹"] ["ã","å¹"] ["ä³","ä³,æµ,æ¶,ð£¾,ð£¿,ð£»"] ["ä","å¹,è "] ["å","å,è ,ð «,ð ,ð ,ð"] ["å´","å¹,æ¶"] ["å¹","ã¼,ã,ä,å´,å¹,å,ð ´,ð »"] ["å","å¹"] ["æµ","ä³,æ¶"] ["æ¶","ä³,å´,æµ,æ¶,ð£¾,ð£¿,ð£»"] ["è ","ä,å,è ,ð ,ð«"] ["ð «","å"] ["ð ","å,è "] ["ð ´","å¹"] ["ð »","å¹"] ["ð£¾","ä³,æ¶"] ["ð£¿","ä³,æ¶"] ["ð£»","ä³,æ¶"] ["ð«","è "] ["ð ","å"] ["ð","å"] 22 rows (0.123s)
inæ¼ç®åã¨order byå¥ã®ä¾
erq> mji natural join mji_reading[対å¿ããUCS in joyo{æ¼¢å}]{æ¼¢å: 対å¿ããUCS => èªã¿: group_concat(distinct èªã¿)} order by count(distinct èªã¿) desc limit 10;; select 対å¿ããUCS as æ¼¢å, group_concat(distinct èªã¿) as èªã¿ from mji natural join mji_reading where (対å¿ããUCS in (select æ¼¢å from joyo)) group by (対å¿ããUCS) order by count(distinct èªã¿) desc limit 10 ["æ¼¢å","èªã¿"] ["æ","ã¡ã¤,ãã§ã¦,ãã³,ãã¤,ãã¦,ããã,ãããã,ãããã,ãããã,ãããã,ããã,ãã,ããã,ããã,ã²ãã"] ["ç","ã»ã¤,ã·ã§ã¦,ã½ã¦,ããã,ããã,ããã,ãã¾ãã,ãã,ãã,ã¯ãã,ã¯ãã,ã,ãªã¾,ãã¶"] ["è¡","ã³ã¦,ã®ã§ã¦,ã¢ã³,ã´ã¦,ã«ã³,ã¬ã³,ãã,ãã,ãããªã,ã¾ãã«,ã¿ã¡,ããã,ãã,ãããã"] ["ä¸","ã¸ã§ã¦,ã·ã§ã¦,ãã,ãã,ãã¿,ããã,ããã,ã®ã¼ã,ã®ã¼ãã,ã®ã¼ã,ãã£ã¨ã¶,ãã¦ã¾ã¤ã,ã»ã¨ã"] ["ä¸","ã«,ã²,ã¢,ãã,ãã,ãã¨,ããã,ããã,ãã ã,ãã ã,ãã ãã,ããã,ããã"] ["ç½","ãã¯,ãã£ã¯,ã,ã,ãã£ã¯,ã·,ã¸,ãã,ãã,ããã,ãããã,ããã,ããã"] ["è","ãã¯,ãã,ã,ããã,ãããã,ããã¾ã,ãããã,ãããã,ãã¾ã,ããã,ãã¯,ãã£ã¯,ã"] ["é","ã¸ã¥ã¦,ãã§ã¦,ã¸ã¥,ãº,ãã¦,ã·ã¥ã¦,ã·ã¥,ã,ããã,ãããã,ãããªã,ããããã,ã¯ã°ãã"] ["å","ãã³,ãã³,ã¿ã³,ãã³,ãã³,ãã,ããã,ããã,ããã£ã¦,ããã,ããã,ãã"] ["æ","ã«ã¤,ã¨,ãµã¨ãã,ãªã¤ããã,ãªã¤ããã,ãªã¤ã,ãªã¤ãã,ãã ã,ããã,ããã,ããã,ãµã¨ããã«ãã"] 10 rows (0.021s)
ãã¼ããªã¥ã¼æ¼ç®
erq> with u(s, t) as (unihan_variant[property='kTraditionalVariant']{UCS, value}) ...> u[{s, t} not in tghb_variants{è§èå, ç¹ä½å}] limit 10;; with u(s, t) as (select UCS, value from unihan_variant where (property = 'kTraditionalVariant')) select * from u where ((s, t) not in (select è§èå, ç¹ä½å from tghb_variants)) limit 10 ["s","t"] ["ã·","å"] ["ã¹","ã¶"] ["ã½","å"] ["ã","å²"] ["ã","ã¯"] ["ã©","å¸"] ["ãº","å"] ["ã¥","å"] ["ã","å"] ["ã","å"] 10 rows (0.006s)
Erqå®è£ ã«ã¤ãã¦
ç¾ç¶ã¯Node.js/JavaScriptã§SQLiteã®Erqã¯ã©ã¤ã¢ã³ããå®è£ ããå人çã«å©ç¨ãã¦ãã¾ãã
å°æ¥çã«ã¯Rustãªã©ã§å®è£ ããªããããããã¾ããããç¾ç¶ã§ããããªãã«ä¾¿å©ã«ä½¿ãã¦ãã¾ãããªãã¸ããªã«ã¯å ¬éãã¦ããªãã®ã§ãGitHubããã¤ã³ã¹ãã¼ã«ãã¦ãã ããã次ã®ã³ãã³ããå®è¡ããã¨ãerqã³ãã³ããã¤ã³ã¹ãã¼ã«ããã¾ãã
npm install -g github:mandel59/erq
Unicodeã®Small Kana Extensionã«é¢ããææ¸
Small Kana Extension - Wikipedia ã«è¨è¼ã®ãªãææ¸ã追å ã
- L2/10-468R2/N3987 Lunde, Ken (2011-02-09), Proposal to add two kana characters
- L2/16-334 Sim, Cheon Hyeong (2016-11-04), Hiragana and Katakana (Small Letters)
- L2/16-354 Yamaguchi, Ryusei (2016-11-07), Proposal to add Kana small letters
- L2/16-358R/N4803 Lunde, Ken (2016-11-22), L2/16-334 & L2/16-354 Feedback (small kana)
- L2/16-325 Moore, Lisa (2016-11-18), "C.14 Kana", UTC #149 Minutes
- L2/16-381 Suignard, Michel (2016-12-08), Additional repertoire for ISO/IEC 10646:2016 (5th ed.) Amendment 1.2
- L2/17-016 Moore, Lisa (2017-02-08), "Consensus 150-C18", UTC #150 Minutes
- N4523 The Japan National Body (2017-04-01), Japanese National Body Contribution on Small Kana Characters
- N4953 "M66.07i", Unconfirmed minutes of WG 2 meeting 66, 2018-03-23
- L2/17-353 Anderson, Deborah; Whistler, Ken (2017-10-02), "N.1. Small Kana Extension code block and code point changes", WG2 Consent Docket
- L2/17-362 Moore, Lisa (2018-02-02), "Consensus 153-C13", UTC #153 Minutes