This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum | |
from typing import Dict, List, Tuple | |
from jaconv import kata2hira | |
import unicodedata | |
def generate_possible_kanji_reading_pairs( | |
text: str, reading: str | |
) -> List[List[Tuple[str, str]]]: | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// part of https://github.com/Calvin-Xu/Allegorical-Lisp-Machine | |
// that does not disclose CS 107E assignment implementations | |
// based on The Roots of Lisp by Paul Graham that follows closely McCarthy's original paper | |
// Lisp in 99 lines of C and how to write one yourself by Robert van Engele | |
#include "lisp.h" | |
#include "printf.h" | |
#include "utils.h" | |
#include "strings.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// uses only elementary methods | |
// guarantees none of speed, precision or accuracy | |
// I didn't read the specs | |
// does not handle any errors | |
// might be educational; definitely not practical | |
#include "math.h" | |
// double has 53 bits mantissa | |
// precision is log_10(2^53) = 15.9546 |