Functions | Variables
mycroft.util.lang.format_de Namespace Reference

Functions

def nice_number_de (number, speech, denominators)
 
def nice_ordinal_de (text)
 
def nice_response_de (text)
 
def nice_time_de (dt, speech=True, use_24hour=False, use_ampm=False)
 
def pronounce_number_de (num, places=2)
 
def pronounce_ordinal_de (num)
 

Variables

string EXTRA_SPACE = ""
 
dictionary FRACTION_STRING_DE
 
list months
 
list NUM_POWERS_OF_TEN
 
dictionary NUM_STRING_DE
 

Function Documentation

def mycroft.util.lang.format_de.nice_number_de (   number,
  speech,
  denominators 
)
German helper for nice_number
This function formats a float to human understandable functions. Like
4.5 becomes "4 einhalb" for speech and "4 1/2" for text
Args:
    number (int or float): the float to format
    speech (bool): format for speech (True) or display (False)
    denominators (iter of ints): denominators to use, default [1 .. 20]
Returns:
    (str): The formatted string.

Definition at line 100 of file format_de.py.

def mycroft.util.lang.format_de.nice_ordinal_de (   text)

Definition at line 368 of file format_de.py.

def mycroft.util.lang.format_de.nice_response_de (   text)

Definition at line 351 of file format_de.py.

def mycroft.util.lang.format_de.nice_time_de (   dt,
  speech = True,
  use_24hour = False,
  use_ampm = False 
)
Format a time to a comfortable human format

For example, generate 'five thirty' for speech or '5:30' for
text display.

Args:
    dt (datetime): date to format (assumes already in local timezone)
    speech (bool): format for speech (default/True) or display (False)=Fal
    use_24hour (bool): output in 24-hour/military or 12-hour format
    use_ampm (bool): include the am/pm for 12-hour format
Returns:
    (str): The formatted time string

Definition at line 267 of file format_de.py.

def mycroft.util.lang.format_de.pronounce_number_de (   num,
  places = 2 
)
Convert a number to its spoken equivalent
For example, '5.2' would return 'five point two'
Args:
    num(float or int): the number to pronounce (set limit below)
    places(int): maximum decimal places to speak
Returns:
    (str): The pronounced number

Definition at line 138 of file format_de.py.

def mycroft.util.lang.format_de.pronounce_ordinal_de (   num)

Definition at line 248 of file format_de.py.

Variable Documentation

string mycroft.util.lang.format_de.EXTRA_SPACE = ""

Definition at line 97 of file format_de.py.

dictionary mycroft.util.lang.format_de.FRACTION_STRING_DE
Initial value:
1 = {
2  2: 'halb',
3  3: 'drittel',
4  4: 'viertel',
5  5: u'fünftel',
6  6: 'sechstel',
7  7: 'siebtel',
8  8: 'achtel',
9  9: 'neuntel',
10  10: 'zehntel',
11  11: 'elftel',
12  12: u'zwölftel',
13  13: 'dreizehntel',
14  14: 'vierzehntel',
15  15: u'fünfzehntel',
16  16: 'sechzehntel',
17  17: 'siebzehntel',
18  18: 'achtzehntel',
19  19: 'neunzehntel',
20  20: 'zwanzigstel'
21 }

Definition at line 67 of file format_de.py.

list mycroft.util.lang.format_de.months
Initial value:
1 = ['januar', 'februar', 'märz', 'april', 'mai', 'juni',
2  'juli', 'august', 'september', 'oktober', 'november',
3  'dezember']

Definition at line 21 of file format_de.py.

list mycroft.util.lang.format_de.NUM_POWERS_OF_TEN
Initial value:
1 = [
2  '', 'tausend', 'Million', 'Milliarde', 'Billion', 'Billiarde', 'Trillion',
3  'Trilliarde'
4 ]

Definition at line 62 of file format_de.py.

dictionary mycroft.util.lang.format_de.NUM_STRING_DE

Definition at line 25 of file format_de.py.



mycroft_ros
Author(s):
autogenerated on Mon Apr 26 2021 02:35:41