WordNetã¨Wiktionaryãçµ±åããè¾æ¸ãä½ã£ã¦ãããããKindleç¨ã®è¾æ¸ãçæãã¦ããããã®éã«ã¯ãWordNetç±æ¥ã®èªç¾©ã¨Wiktionaryã®èªç¾©ã®ä¸¡æ¹ãæ²è¼ããã¨é·ããªããããã®ã§ãWordNetã®èªç¾©ãããã°ããã使ããããã§ãªãå ´åã«ã®ã¿Wiktionaryã®èªç¾©ã使ã£ã¦ããããã®ç¾ç¶ãã䏿©è¸ã¿è¾¼ãã§ãã¦ã¼ã¶æºè¶³åº¦ãæå¤§åããè¡¨ç¤ºæ¹æ³ãæ¤è¨ããã
WordNetã¯åºæ¬èªå½ã®åºæ¬èªç¾©ãååã«ã«ãã¼ãã¦ããã¦ç´ æ´ããããWiktionaryã¯ãã¤ãã¼ãªèªå½ã®ãã¤ãã¼ãªèªç¾©ã¾ã§ãã«ãã¼ãã¦ããã¦ç´ æ´ãããããããããã®2ã¤ãåãæ¿ããæ¹æ³ã ã¨ãåºæ¬èªå½ã®ãã¤ãã¼ãªèªç¾©ãæ¼ãã¦ãã¾ãã¨ããåé¡ããããä¾ãã°ããset forthãã¨ããè¦åºãèªã«ã¯ä»¥ä¸ã®ãããªæ å ±ãã¤ãã¦ããã
- WordNet: leave
- WordNet: state
- Wiktionary: To state; describe; give an account of.
- Wiktionary: To present for consideration; to propose.
- Wiktionary: To begin a journey or expedition.
- Wiktionary: To start.
WordNetã®èªç¾©ã ããKindleè¾æ¸ã«åé²ãããªãããleaveããstateãã®ã¿ã使ããããã¨ã«ãªããWiktionaryã«ã¯ããstartãã¨ãproposeããæå³ããèªç¾©ãåé²ããã¦ããããããã¯æ¨ã¦ããã¦ãã¾ããã¨ã«ãªãã
WordNetã®èªç¾©èª¬æã¯é常ã«ç°¡æ½ã§èªã¿ãããå¾åã«ããããæã«ç°¡æ½ããã¦ç©è¶³ããªãã£ãããæã«ç°å¸¸ã«è©³ãããã¦åé·ã«æãããã¨ãããã䏿¹ã§Wiktionaryã¯é常ã«è©³ç´°ãªèªç¾©ã¾ã§å«ããå¾åã«ããããæã«ææãã ã£ãããèªã¿ã«ããã£ãããããã¨ããããWordNetã¨Wiktionaryã®ã©ã¡ããè¯ããã¯ä¸æ¦ã«ã¯è¨ãããå ´åã«ããã¨ããè¨ãããããªãããããã15ä¸èªä»¥ä¸ãããè¦åºãèªãå®éã«è¦ã¦å¤æãããã¨ã¯ã§ããªããããã§ã簡便æ³ã¨ãã¦ãåéãã¡ããã©è¯ããã®ãé¸ã¶ã¨ãã使¦ãæãã¤ããã
Kindle宿©ï¼Papaerwhite 2021å¹´çï¼ã®ãããã¢ããè¾æ¸ã¯ãåé ã«æããåçã®ããã«8è¡ã®è¡¨ç¤ºç¯å²ãæã¤ãã¹ã¯ãã¼ã«ããã°ä½è¡ã§ãé²è¦§ã§ããããåè¦ã§å¿ è¦ãªæ å ±ãç¶²ç¾ ããã®ãæã¾ããã®ã§ãæåã®8è¡ã«æãæç¨ãªæ å ±ãè©°ãè¾¼ãã¨ããã®ãç®æ¨ã«ããã
çµ±åè±åè¾æ¸ã«ããã¦ã¯ãè¦åºãèªã¨çºé³ã§1è¡ä½¿ãã訳èªã®ãªã¹ãã«1è¡ä½¿ããå¤èªéèªã®éã«ã¯ãã®äºã¤ã®æ å ±ãããéè¦ãªã®ã§ããã®é¨åã¯è²ããªããã¨ãªãã¨ãæ®ãã¯6è¡ã ãååãããã®èªç¾©ã¯2è¡ã«ã¾ããããã¨ãèããã¨ã4é ç®ãããªãèªç¾©ãæåã¨ãããã¨ã«ãªããã¾ããåã ã®é ç®ã®èªç¾©èª¬æã¯é·ããã¦ãçããã¦ãè¯ããªãã1è¡ã«ã¡ããã©åã¾ãããããèªã¿ãããã®ã§ã8åèªããããæåã ã¨æãããã
以ä¸ã®æ å ±ããã©ã¡ã¼ã¿ã¨ãã¦ããèªã¿ã«ããããã³ã¹ã颿°ã¨ãã¦è¡¨ç¾ãã¦ããããæå°ã®ãã®ãé¸ã¶ãã¨ã«ãããã以ä¸ã®ãããªã³ã¼ãã«ãªãããªã
item_cost = abs(log(4) - log(len(items)) length_cost = sum(items, key=lambda x: log(8) - log(num_words(x))) / len(items) quality_cost = 1.0 if is_wordnet() else 1.2 cost = (item_cost + 0.5) * (length_cost + 1.0)
é ç®æ°ã®ã³ã¹ãã¯ã対æ°å°ºåº¦ã§ã®4ããã®ããã«åºã¥ãã¦ç®åºãããã¤ã¾ãã1é ç®ãªã1.38ã2ãªã0.69ã3ãªã0.28ã4ãªã0.00ã5ãªã0.22ã6ãªã0.40ã7ãªã0.55ã8ãªã0.69ã¨ãã£ãå ·åã ãå°ãªãããå ´åã®ã³ã¹ãã®æ¹ãå¤ãããå ´åã®ã³ã¹ããããå³ãããªãããããåèªæ°ã®ã³ã¹ãã¯ãåé ç®ã®èªç¾©èª¬æã®åèªæ°ã®å¯¾æ°å°ºåº¦ã§ã®8ããã®ããã®ç®è¡å¹³åã«åºã¥ãã¦ç®åºããããããçãããå ´åã®ã³ã¹ãã®æ¹ã大ãããªããæå¾ã«ãå質ã³ã¹ãã¨ããã®ãå®ç¾©ãããç ç©¶è ãä½ã£ãã®ã§å¤å°ä¿¡ç¨ã®ãããWordNetãè´å±ããããã®è¨å®ã§ãããWordNet以å¤ã®å ´åã«ã³ã¹ããå°ãä¸ããããã«ãªã£ã¦ãããããã¦ãé ç®æ°ã®ã³ã¹ãã¨åèªæ°ã®ã³ã¹ãã®åã ã«ã¹ã ã¼ã¶ãè¶³ãã¦ãããåè¦ç´ ãä¹ç®ããå¤ãæçµçãªã³ã¹ãã¨ãªãã
ä¸è¿°ãããset forthãã®ä¾ãèããããWordNetã¯2é ç®ãªã®ã§ãé ç®æ°ã®ã³ã¹ãã¯0.69ã ãåèªæ°ã®ã³ã¹ãã¯(2.07+2.07) / 2 = 2.07ã ãå質ã³ã¹ãã¯1.0ã ãæçµçãªã³ã¹ã㯠(0.67 + 0.5) * (2.07 + 1.0) * 1.0 = 3.59ã ãWiktionaryã¯4é ç®ãªã®ã§ãé ç®æ°ã®ã³ã¹ãã¯0.00ã ãåèªæ°ã®ã³ã¹ã㯠(0.13 + 0.28 + 0.28 + 0.38) / 4 = 1.07ã ãå質ã³ã¹ãã¯1.2ã ãæçµçãªã³ã¹ã㯠(0 + 0.5) * (1.07 + 1.0) * 1.2 = 1.24ã ãã¤ã¾ããWiktionaryã®ã³ã¹ãã®æ¹ãä½ãã®ã§ãWiktionaryãé¸ã¶ãã¨ã«ãªããç´°ãããã©ã¡ã¼ã¿ã«èª¿æ´ã®ä½å°ã¯ããããã ãããç´æã«æ²¿ã£ãã¢ã«ã´ãªãºã ã«ãªã£ã¦ããã¨æãã
çµæã¨ãã¦ãWordNetãã58093èªãWiktionaryãã119053èªã®è¦åºãèªã®èªç¾©ãæ¡ç¨ãããã¨ã«ãªã£ããWordNetã¨Wiktionaryãåãè¦åºãèªã§éè¤ãã¦åè² ããå ´åã®æ¡ç¨æ°ã¯ãWordNetã43235ä»¶ãWikipediaã99132ä»¶ã ã£ãã®ã§ãWiktionaryã70%ãããã®ç¢ºçã§åã¤ããããã ãããäºæ³éãã ããªããå質ã³ã¹ããæããå ´åã®Wiktionaryã®åçã¯78%ãããã§ãã£ãã
WordNetã¨Wiktionaryã®ãã¡ã®ãã·ãªæ¹ãé¸ã¹ãããã«ã¯ãªã£ãããåã ã1é ç®ã¨ããããªãå ´åã«ã¯ä¸¡æ¹è¼ãã¦ãè¯ããããªããã ãä¾ãã°ãmaharajaãã¨ããèªã®èªç¾©ã¯ä»¥ä¸ã®ããã«ãªãã
- Wiktionary: A Hindu monarch ranking above a raja, an emperor.
- WordNet: a great raja; a Hindu prince or king in India ranking above a raja
Wiktionaryã¨WordNetã§ä¼¼ããããªèª¬æããã¦ããã®ã§åé·ã§ã¯ããããå¤å°ä»å çãªæ å ±ãããã®ã§ãå ´æãä½ã£ã¦ãããªãäºçªç®ã®èªç¾©èª¬æãè¼ãã¦ããã¦ãæã¯ãªãããã ããèªç¾©ãäºã¤ããããã§ã¯ãªããåãèªç¾©ã«é¢ãã¦å¥ã®è¨ãæ¹ããã¦ããã ãã§ãããããæ®éã«ä¸¦åã«è¡¨ç¤ºããã®ã¯éåæãããããªã®ã§ãä¸¦ã³æ¿ãã§è² ããæ¹ã®è¡¨ç¤ºã¯ããã¾ãæ å ±ãã ã¨åããããã«ãã»ããåç½®ãã¦è¡¨ç¤ºãããã以ä¸ã®ãããªæ§é ã«ãªãã
maharaja /ËmÉ.hÉËɹÉË.dÊÉ/ 大ç, è©ç, ããã©ã¸ã£, ããã¼ã©ã¼ã¸ã£ [å] A Hindu monarch ranking above a raja, an emperor. ã»[å] a great raja; a Hindu prince or king in India ranking above a raja
鏿ããè¾æ¸ããæ¡ç¨ãããèªç¾©ã3å以ä¸ã®å ´åã6åã«ãªãã¾ã§äºçªç®ä»¥éã®è¾æ¸ãããåèæ å ±ã¨ãã¦èªç¾©ãè£ããã¨ã«ãããããããã»ã¨ãã©ä¼¼ããããªèªç¾©ã2å表示ããã®ã¯å¿ã³ãªããä¾ãã°ãaeroliteãã®èªç¾©ã¯ä»¥ä¸ã®ããã«ãªãã
- WordNet: a stony meteorite consisting of silicate minerals
- Wiktionary: A meteorite consisting of silicate minerals
2ã¤ã®èªç¾©ã¯ãstonyãã®æç¡ä»¥å¤ã¯åãæã§ããã両æ¹è¡¨ç¤ºãããã¨ãããã«ã¤ã©ãã¨ãããããã§ãäºçªç®ä»¥éã®è¾æ¸ã®èªç¾©ã«å¯¾ãã¦ã¯ãæ¢åºãã®ã¨ä¼¼ããã¦ããå ´åã¯çç¥ããã¨ããå¦çãæ±ããããã
ãã¦ãæã®é¡ä¼¼åº¦ã測ãã¨ããã°BLEUã¹ã³ã¢ã§ãããPythonã§å®è£ ãããªã以ä¸ã®ããã«ãªããå ¥åã¯ãã¼ã¯ã³æååã®ãªã¹ãã¨ãã¦ä¸ãããããã¼ã¯ãã¤ãºã®æ¹æ³ã¯å¤é¨ã«ä»»ããããã©ã¡ã¼ã¿candidateã¨ãã¦åè£ã®æã®ãã¼ã¯ã³ã®ãªã¹ããä¸ãããã©ã¡ã¼ã¿referencesã¨ãã¦ãªãã¡ã¬ã³ã¹æã®ãã¼ã¯ã³ã®ãªã¹ãã®ãªã¹ããä¸ããããªãã¡ã¬ã³ã¹æã¯è¤æ°ä¸ããããããã«ãã¦ãããã¾ããngramå¤å®ã®æå¤§ãã¼ã¯ã³æ°ããã©ã¡ã¼ã¿ã¨ãã¦æå®ããããæ®éã¯4ã使ããããã4èªæªæºã®åè£æã調ã¹ãå ´åã«ã¯ãã®èªæ°ã«åããããã¨ãå¤ãã
def ComputeBLEUScore(candidate, references, ngram): if not candidate or not references: return 0.0 ngram = min(ngram, len(candidate)) def GetNGramMap(tokens, n): result = collections.defaultdict(int) for i in range(0, len(tokens) - n + 1): phrase = "\0".join(tokens[i:i + n]) result[phrase] += 1 return result sum_log = 0.0 for n in range(1, ngram + 1): cand_map = GetNGramMap(candidate, n) merged_ref_map = {} for reference in references: for phrase, count in GetNGramMap(reference, n).items(): merged_ref_map[phrase] = max(merged_ref_map.get(phrase) or 0, count) total_count = 0 total_match_count = 0 for phrase, count in cand_map.items(): match_count = min(merged_ref_map.get(phrase) or 0, count) total_count += count total_match_count += match_count if not total_match_count: return 0.0 sum_log += math.log(total_match_count / total_count) mean_precision = math.exp(sum_log / n) cand_len = len(candidate) ref_lens = [len(x) for x in references] ref_len = min(ref_lens, key=lambda x: (abs(x - cand_len), x)) brevity_penalty = min(1.0, math.exp(1.0 - ref_len / cand_len)) return mean_precision * brevity_penalty
ãaeroliteãã®ä¾ã®2çªç®ã®æãåè£æã¨ãã1çªç®ã®æããªãã¡ã¬ã³ã¹æã¨ãã¦BLEUã¹ã³ã¢ãç®åºããã¨ã0.61ã¨ãªããåæã®BLEUã0.3ã¨ããè¶ ããã¨ãããããä¼¼ã¦ãæãã¨è¨ã£ã¦å·®ãæ¯ããªãã®ã§ã2çªç®ã®æã¯æ¨ã¦ã¦ãè¯ãããã ã
ããã§ãæã人éããã¯çªã£è¾¼ã¿ãæ¥ãã ãããBLEUã¹ã³ã¢ã¯ã³ã¼ãã¹åä½ã§å¤æ°ã®ãµã³ãã«ã®å¹³åã¨ãã¦ç®åºããªãã¨æå³ããªãã¨ãå®éããããªã®ã ã4ã°ã©ã ã¾ã§ã®ãã¼ã¯ã³ç²¾åº¦ã®å¹¾ä½å¹³åã使ã£ã¦ããã®ã§ã4ã°ã©ã ã®ä¸è´ãä¸ã¤ããªããµã³ãã«ã¯BLEUã¹ã³ã¢ãã¼ãã«ãªã£ã¦ãã¾ããä¾ãã°ãåè£åã®ãconsistingãããcomposedãã«å¤ããã ãã§ã¼ãã«ãªã£ã¦ãã¾ããã¤ã¾ãããã£ã¡ãä¼¼ã¦ããªãã¨ã¾ã¨ããªã¹ã³ã¢ãåºãªãå¾åã«ããã®ã§ãããããã®æä¾ãèªã¾ãã¦å¹³åãåããªãã¨æå³ã®ããå¤å®ã«ãªããªããå¹¾ä½å¹³åãåãåã«ã¹ã ã¼ã¶ãå ããã¨ããã®ãä¸è¬çã«ããæ¹æ³ã ããå ·ä½çãªå¤ã決ããã®ãã¾ãé£ããã
ç¿»è¨³ç²¾åº¦ãæ¸¬ããããããããªãã®ã§ãé©å½ã«è©ä¾¡é¢æ°ãæ¹å¤ãã¦ãã¾ãããã¾ããå¹¾ä½å¹³åãç®è¡å¹³åã«å¤ãããããã§1ã°ã©ã ãã3ã°ã©ã ã¾ã§ã®çµæããã£ã¨ç©ãè¨ãããã«ãªããã3ã°ã©ã ã4ã°ã©ã ãä¸è´ããªãã¦ãã¹ã³ã¢ãåºãããã«ãªããã¾ãããªãã¡ã¬ã³ã¹æããçãæãç½°ããbrevity_penaltyãçç¥ãããéè¤ãææ¢ãããã¨ãç®çã§ããå ´åãåè£æãçãã¨é«ãã¹ã³ã¢ãåºãã¨ããã®ã¯ãããæè¿ãã¹ãæ§è³ªã ããã ãã¨ãããã¨ã§ã以ä¸ã®ãããªå®è£ ã«ãªãã
def ComputeNGramPresision(candidate, references, ngram): if not candidate or not references: return 0.0 ngram = min(ngram, len(candidate)) def GetNGramMap(tokens, n): result = collections.defaultdict(int) for i in range(0, len(tokens) - n + 1): phrase = "\0".join(tokens[i:i + n]) result[phrase] += 1 return result sum_precision = 0.0 for n in range(1, ngram + 1): cand_map = GetNGramMap(candidate, n) merged_ref_map = {} for reference in references: for phrase, count in GetNGramMap(reference, n).items(): merged_ref_map[phrase] = max(merged_ref_map.get(phrase) or 0, count) total_count = 0 total_match_count = 0 for phrase, count in cand_map.items(): match_count = min(merged_ref_map.get(phrase) or 0, count) total_count += count total_match_count += match_count sum_precision += total_match_count / total_count return sum_precision / n
ãããé©ç¨ããã¨ããaeroliteãã®ä¾ã®ã¹ã³ã¢ã¯0.62ã«ãªãããconsistingãããcomposedãã«å¤ããå ´åã§ã0.27ã«ãªããããã«ãèªç¾©èª¬æã¯æãçãå¾åã«ããã®ã§ãN-gramå¤å®ã3ã¾ã§ã«ãããããããã¨ãå ã®åè£æã§0.66ã1èªæ¹å¤ããå ´åã§0.36ã«ãªãã0.25ããããé¾å¤ã«ãã¦é¡ä¼¼æãæ¨ã¦ãã°ãåé·æ§ãåé¿ãã¤ã¤èªç¾©èª¬æãè£å¼·ã§ãããã ã
é¡ä¼¼å¤å®ã®åå¦çã¨ãªããã¼ã¯ãã¤ãºã®éã«ã¯ãããã¤ãã®æ£è¦åãè¡ããåè©ã®èªç¾©ã®å é ã«ãããtoããåé¤ããå ¨ã¦ã®å±æå½¢ã¯åå½¢ã«æ»ããå è©ãåé¤ããè±åãå°æåã«çµ±ä¸ããè±å以å¤ã®è¨å·ã¯åé¤ãããä¾ãã°ãto give an apple to better Japanese boys.ãã¯ãgive apple to good japanese boyãã«ãªãã
èªç¾©ãè£è¶³ããããã ãã«ããã¾ã§é¢åããããã¨ãå®è£ ããç¾½ç®ã«ãªãã¨ã¯èªåã§ãæããªãã£ãããå®éã«ã©ã®ãããªèªç¾©ãè£è¶³ãããã®ããè¦ã¦ã¿ããã
jabberwocky â/ËdÊæbÉËwÉki/ ç¡æå³, ãã³ã»ã³ã¹, ç¡æå³ãª [å] invented or meaningless language; nonsense [å½¢] meaningless, worthless [å½¢] absurd, nonsense, nonsensical ã» [å] nonsensical language (according to Lewis Carroll)
jackfruit ã¸ã£ãã¯ãã«ã¼ã, æ³¢ç¾ è, ã¸ã£ãã¯, ãã©ãã, æ³¢ç¾ å¯ [å] A tree, Artocarpus heterophyllus, of the Moraceae family, which produces edible fruit. [å] The large fruit from this tree. ã» [å] immense East Indian fruit resembling breadfruit; it contains an edible pulp and nutritious seeds that are commonly roasted ã» [å] East Indian tree cultivated for its immense edible fruit and seeds [è¤æ°] jackfruits
GA ç¥çµã¬ã¹ã®ä¸ç¨®, éºä¼çã¢ã«ã´ãªãºã , å½é£ç·ä¼ [å] General American [å] Georgia [å] US designation for the nerve gas tabun. ã» [å] the first known nerve agent, synthesized by German chemists in 1936; a highly toxic combustible liquid that is soluble in organic solvents and is used as a nerve gas in chemical warfare ã» [å] a state in southeastern United States; one of the Confederate states during the American Civil War
gabble â/ËɡæbÉl/ ãåã, ãããã¹ã, ããã¹ã, ãºããºãããã¹ã, åã, æ¼ãã [å] To talk fast, idly, foolishly, or without meaning. [å] To utter inarticulate sounds with rapidity. [å] Confused or unintelligible speech. ã» [å] speak (about unimportant matters) rapidly and incessantly ã» [å] rapid and indistinct speech [ä¸å] gabbles [ç¾å] gabbling [éå»] gabbled [éå] gabbled
åãèªã«ã¤ãã¦èªã£ã¦ããããå 容çã«ã¯ä¼¼éã£ããã®ã«ãªãããã ãã表ç¾ã¨ãã¦ã¯å¤æ§æ§ã«å¯ãã§ããæ°ããããè¨ãæããã°ãåé·ã«ãªããªãç¯å²ã§è£è¶³æ å ±ãä»å ãããã¨ã«æåãã¦ããã
ã¡ãªã¿ã«ãé¡ä¼¼åº¦å¤å®ã§æ¨ã¦ããããã¿ã¼ã³ã¯ä»¥ä¸ã®ãããªæãã§ãããã¡ããã¨éè¤ãã¦ããã®ãæ¨ã¦ããã¦ãããã¨ã確èªã§ããã
[SCORE] 0.3188552188552189 [CAN] Of, relating to, affecting, or designed for use with two ears. [REF] relating to or having or hearing with two ears
[SCORE] 0.43333333333333335 [CAN] Of or pertaining to biosystematics [REF] of or relating to biosystematics
[SCORE] 1.0 [CAN] the black grouse. [REF] male black grouse
[SCORE] 0.38888888888888884 [CAN] Relating to a blastema. [REF] of or relating to blastemata
[SCORE] 1.0 [CAN] A pupil who lives at school during term time. [REF] a tenant in someone's house [REF] a pupil who lives at school during term time [REF] someone who forces their way aboard ship
[SCORE] 0.5 [CAN] haul with a tackle [REF] To drink excessively and socially; to carouse. [REF] A carouse; a drinking bout; a booze. [REF] To haul or hoist with a tackle.
[SCORE] 0.35000000000000003 [CAN] The Dravidian language of this people. [REF] an isolated Dravidian language spoken by the Brahui in Pakistan [REF] a member of a Dravidian people living in Pakistan
çµæã¨ãã¦å¾ãããKindle辞書はこれã§ãããèªåã§ä½¿ã£ã¦ã¿ã¦ããéããåã®ãã¼ã¸ã§ã³ãããå¤å°ã¯ä½¿ãããããªã£ã¦ããããã«æããã
ã¾ã¨ããè¤æ°ã®è¾æ¸ãã¼ã¿ãçµ±åããã«ããããèªç¾©èª¬æã®åéãããã·ãªæ¹ã鏿ããã¢ã«ã´ãªãºã ãå®è£ ãããã¾ããåéãå°ãªãããå ´åãBLEUã¹ã³ã¢ãæ¹å¤ããN-gram精度ã§åé·æ§ãå¤å®ããªããã表示é ç®ãå¢ããå¦çãå®è£ ããããããã«ãã£ã¦ããããã¢ããè¾æ¸ã®ãã¡ã¼ã¹ããã¥ã¼ã§ã®æ å ±éãæå¤§åããã¨ããç®æ¨ã«è¿ã¥ããã¨ãã§ããã