mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -46,8 +46,6 @@ Command line::
|
|||||||
|
|
||||||
$ num2words 10001
|
$ num2words 10001
|
||||||
ten thousand and one
|
ten thousand and one
|
||||||
$ num2words 10123123 --lang es
|
|
||||||
diez millones ciento veintitrés mil ciento veintitrés
|
|
||||||
$ num2words 24,120.10
|
$ num2words 24,120.10
|
||||||
twenty-four thousand, one hundred and twenty point one
|
twenty-four thousand, one hundred and twenty point one
|
||||||
$ num2words 24,120.10 -l es
|
$ num2words 24,120.10 -l es
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
"""num2words: convert numbers into words.
|
"""num2words: convert numbers into words.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
@@ -23,9 +39,6 @@ Examples:
|
|||||||
$ num2words 10001
|
$ num2words 10001
|
||||||
ten thousand and one
|
ten thousand and one
|
||||||
|
|
||||||
$ num2words 10123123 --lang es
|
|
||||||
diez millones ciento veintitrés mil ciento veintitrés
|
|
||||||
|
|
||||||
$ num2words 24,120.10
|
$ num2words 24,120.10
|
||||||
twenty-four thousand, one hundred and twenty point one
|
twenty-four thousand, one hundred and twenty point one
|
||||||
|
|
||||||
@@ -35,6 +48,7 @@ Examples:
|
|||||||
$num2words 2.14 -l es --to currency
|
$num2words 2.14 -l es --to currency
|
||||||
dos euros con catorce centimos
|
dos euros con catorce centimos
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function, unicode_literals
|
from __future__ import print_function, unicode_literals
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
version: '3.0'
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
image: python:3-alpine
|
||||||
|
command: python3 -m http.server 8080
|
||||||
|
volumes:
|
||||||
|
- .:/num2words
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2016, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
|
||||||
from decimal import ROUND_HALF_UP, Decimal
|
from decimal import ROUND_HALF_UP, Decimal
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .base import Num2Word_Base
|
from .base import Num2Word_Base
|
||||||
@@ -130,6 +131,10 @@ class Num2Word_CZ(Num2Word_Base):
|
|||||||
i = len(chunks)
|
i = len(chunks)
|
||||||
for x in chunks:
|
for x in chunks:
|
||||||
i -= 1
|
i -= 1
|
||||||
|
|
||||||
|
if x == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
n1, n2, n3 = get_digits(x)
|
n1, n2, n3 = get_digits(x)
|
||||||
|
|
||||||
if n3 > 0:
|
if n3 > 0:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# encoding: UTF-8
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# encoding: UTF-8
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# encoding: UTF-8
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import print_function, unicode_literals
|
from __future__ import print_function, unicode_literals
|
||||||
|
|
||||||
from .lang_FR import Num2Word_FR
|
from .lang_FR import Num2Word_FR
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -94,9 +94,11 @@ def int2word(n):
|
|||||||
i = len(chunks)
|
i = len(chunks)
|
||||||
for x in chunks:
|
for x in chunks:
|
||||||
i -= 1
|
i -= 1
|
||||||
n1, n2, n3 = get_digits(x)
|
|
||||||
|
|
||||||
# print str(n3) + str(n2) + str(n1)
|
if x == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
|
n1, n2, n3 = get_digits(x)
|
||||||
|
|
||||||
if n3 > 0:
|
if n3 > 0:
|
||||||
if n3 <= 2:
|
if n3 <= 2:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
# License as published by the Free Software Foundation; either
|
# License as published by the Free Software Foundation; either
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
# TODO: replace WINDOWS line endings to UNIX?
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .base import Num2Word_Base
|
from .base import Num2Word_Base
|
||||||
@@ -149,6 +149,10 @@ class Num2Word_LT(Num2Word_Base):
|
|||||||
|
|
||||||
for x in chunks:
|
for x in chunks:
|
||||||
i -= 1
|
i -= 1
|
||||||
|
|
||||||
|
if x == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
n1, n2, n3 = get_digits(x)
|
n1, n2, n3 = get_digits(x)
|
||||||
|
|
||||||
if n3 > 0:
|
if n3 > 0:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
# TODO: replace WINDOWS line endings to UNIX?
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .base import Num2Word_Base
|
from .base import Num2Word_Base
|
||||||
@@ -157,6 +157,10 @@ class Num2Word_LV(Num2Word_Base):
|
|||||||
i = len(chunks)
|
i = len(chunks)
|
||||||
for x in chunks:
|
for x in chunks:
|
||||||
i -= 1
|
i -= 1
|
||||||
|
|
||||||
|
if x == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
n1, n2, n3 = get_digits(x)
|
n1, n2, n3 = get_digits(x)
|
||||||
|
|
||||||
if n3 > 0:
|
if n3 > 0:
|
||||||
@@ -176,7 +180,7 @@ class Num2Word_LV(Num2Word_Base):
|
|||||||
elif n1 > 0 and not (i > 0 and x == 1):
|
elif n1 > 0 and not (i > 0 and x == 1):
|
||||||
words.append(ONES[n1][0])
|
words.append(ONES[n1][0])
|
||||||
|
|
||||||
if i > 0 and x != 0:
|
if i > 0:
|
||||||
words.append(self.pluralize(x, THOUSANDS[i]))
|
words.append(self.pluralize(x, THOUSANDS[i]))
|
||||||
|
|
||||||
return ' '.join(words)
|
return ' '.join(words)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .base import Num2Word_Base
|
from .base import Num2Word_Base
|
||||||
@@ -66,7 +67,7 @@ HUNDREDS = {
|
|||||||
6: ('sześćset',),
|
6: ('sześćset',),
|
||||||
7: ('siedemset',),
|
7: ('siedemset',),
|
||||||
8: ('osiemset',),
|
8: ('osiemset',),
|
||||||
9: ('dziewęćset',),
|
9: ('dziewięćset',),
|
||||||
}
|
}
|
||||||
|
|
||||||
THOUSANDS = {
|
THOUSANDS = {
|
||||||
@@ -141,6 +142,10 @@ class Num2Word_PL(Num2Word_Base):
|
|||||||
i = len(chunks)
|
i = len(chunks)
|
||||||
for x in chunks:
|
for x in chunks:
|
||||||
i -= 1
|
i -= 1
|
||||||
|
|
||||||
|
if x == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
n1, n2, n3 = get_digits(x)
|
n1, n2, n3 = get_digits(x)
|
||||||
|
|
||||||
if n3 > 0:
|
if n3 > 0:
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -15,7 +14,6 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import division, unicode_literals
|
from __future__ import division, unicode_literals
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .base import Num2Word_Base
|
from .base import Num2Word_Base
|
||||||
@@ -209,6 +210,10 @@ class Num2Word_RU(Num2Word_Base):
|
|||||||
i = len(chunks)
|
i = len(chunks)
|
||||||
for x in chunks:
|
for x in chunks:
|
||||||
i -= 1
|
i -= 1
|
||||||
|
|
||||||
|
if x == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
n1, n2, n3 = get_digits(x)
|
n1, n2, n3 = get_digits(x)
|
||||||
|
|
||||||
if n3 > 0:
|
if n3 > 0:
|
||||||
@@ -223,7 +228,7 @@ class Num2Word_RU(Num2Word_Base):
|
|||||||
ones = ONES_FEMININE if i == 1 or feminine and i == 0 else ONES
|
ones = ONES_FEMININE if i == 1 or feminine and i == 0 else ONES
|
||||||
words.append(ones[n1][0])
|
words.append(ones[n1][0])
|
||||||
|
|
||||||
if i > 0 and x != 0:
|
if i > 0:
|
||||||
words.append(self.pluralize(x, THOUSANDS[i]))
|
words.append(self.pluralize(x, THOUSANDS[i]))
|
||||||
|
|
||||||
return ' '.join(words)
|
return ' '.join(words)
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .lang_EU import Num2Word_EU
|
from .lang_EU import Num2Word_EU
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .base import Num2Word_Base
|
from .base import Num2Word_Base
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
# Copyright (c) 2017, Tufan Kaynak, Framras. All Rights Reserved.
|
# Copyright (c) 2017, Tufan Kaynak, Framras. All Rights Reserved.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .base import Num2Word_Base
|
from .base import Num2Word_Base
|
||||||
@@ -147,6 +148,10 @@ class Num2Word_UK(Num2Word_Base):
|
|||||||
i = len(chunks)
|
i = len(chunks)
|
||||||
for x in chunks:
|
for x in chunks:
|
||||||
i -= 1
|
i -= 1
|
||||||
|
|
||||||
|
if x == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
n1, n2, n3 = get_digits(x)
|
n1, n2, n3 = get_digits(x)
|
||||||
|
|
||||||
if n3 > 0:
|
if n3 > 0:
|
||||||
@@ -162,7 +167,7 @@ class Num2Word_UK(Num2Word_Base):
|
|||||||
ones = ONES_FEMININE if i == 1 or feminine and i == 0 else ONES
|
ones = ONES_FEMININE if i == 1 or feminine and i == 0 else ONES
|
||||||
words.append(ones[n1][0])
|
words.append(ones[n1][0])
|
||||||
|
|
||||||
if i > 0 and ((n1 + n2 + n3) > 0):
|
if i > 0:
|
||||||
words.append(self.pluralize(x, THOUSANDS[i]))
|
words.append(self.pluralize(x, THOUSANDS[i]))
|
||||||
|
|
||||||
return ' '.join(words)
|
return ' '.join(words)
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
def splitbyx(n, x, format_int=True):
|
def splitbyx(n, x, format_int=True):
|
||||||
length = len(n)
|
length = len(n)
|
||||||
if length > x:
|
if length > x:
|
||||||
|
|||||||
24
setup.py
24
setup.py
@@ -1,4 +1,22 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
from io import open
|
||||||
|
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
@@ -17,8 +35,8 @@ CLASSIFIERS = [
|
|||||||
'Topic :: Text Processing :: Linguistic',
|
'Topic :: Text Processing :: Linguistic',
|
||||||
]
|
]
|
||||||
|
|
||||||
LONG_DESC = open('README.rst', 'rt').read() + '\n\n' + \
|
LONG_DESC = open('README.rst', 'rt', encoding="utf-8").read() + '\n\n' + \
|
||||||
open('CHANGES.rst', 'rt').read()
|
open('CHANGES.rst', 'rt', encoding="utf-8").read()
|
||||||
|
|
||||||
|
|
||||||
def find_version(fname):
|
def find_version(fname):
|
||||||
@@ -26,7 +44,7 @@ def find_version(fname):
|
|||||||
Returns str or raises RuntimeError
|
Returns str or raises RuntimeError
|
||||||
"""
|
"""
|
||||||
version = ''
|
version = ''
|
||||||
with open(fname, 'r') as fp:
|
with open(fname, 'r', encoding="utf-8") as fp:
|
||||||
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
|
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
|
||||||
for line in fp:
|
for line in fp:
|
||||||
m = reg.match(line)
|
m = reg.match(line)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
@@ -13,7 +14,6 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
# from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|||||||
@@ -1,5 +1,20 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# encoding: UTF-8
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# encoding: UTF-8
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# encoding: UTF-8
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
@@ -13,7 +14,6 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from num2words import num2words
|
from num2words import num2words
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copetright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This libraret is free software; etou can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modifet it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
# License as published bet the Free Software Foundation; either
|
# License as published by the Free Software Foundation; either
|
||||||
# version 2.1 of the License, or (at etour option) anet later version.
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
# This libraret is distributed in the hope that it will be useful,
|
# This library is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warrantet of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
# Lesser General Public License for more details.
|
# Lesser General Public License for more details.
|
||||||
# You should have received a copet of the GNU Lesser General Public
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
# License along with this libraret; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
@@ -13,7 +14,6 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
|
|||||||
@@ -1,4 +1,20 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
@@ -53,9 +69,6 @@ class Num2WordsLTTest(TestCase):
|
|||||||
'minus penki tūkstančiai kablelis dvidešimt du',
|
'minus penki tūkstančiai kablelis dvidešimt du',
|
||||||
)
|
)
|
||||||
|
|
||||||
# print(fill(n2w(1000000000000000000000000000000)))
|
|
||||||
# naintilijonas
|
|
||||||
|
|
||||||
def test_to_ordinal(self):
|
def test_to_ordinal(self):
|
||||||
# @TODO: implement to_ordinal
|
# @TODO: implement to_ordinal
|
||||||
with self.assertRaises(NotImplementedError):
|
with self.assertRaises(NotImplementedError):
|
||||||
|
|||||||
@@ -1,4 +1,20 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
@@ -48,9 +64,6 @@ class Num2WordsLVTest(TestCase):
|
|||||||
'mīnus pieci tūkstoši komats divdesmit divi',
|
'mīnus pieci tūkstoši komats divdesmit divi',
|
||||||
)
|
)
|
||||||
|
|
||||||
# >>> print(fill(n2w(1000000000000000000000000000000)))
|
|
||||||
# nontiljons
|
|
||||||
|
|
||||||
self.assertEqual(num2words(0, lang='lv'), 'nulle')
|
self.assertEqual(num2words(0, lang='lv'), 'nulle')
|
||||||
self.assertEqual(num2words(5, lang='lv'), "pieci")
|
self.assertEqual(num2words(5, lang='lv'), "pieci")
|
||||||
self.assertEqual(num2words(15, lang='lv'), "piecpadsmit")
|
self.assertEqual(num2words(15, lang='lv'), "piecpadsmit")
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
@@ -45,6 +46,10 @@ class Num2WordsPLTest(TestCase):
|
|||||||
"miliard dwieście trzydzieści cztery miliony pięćset "
|
"miliard dwieście trzydzieści cztery miliony pięćset "
|
||||||
"sześćdziesiąt siedem tysięcy osiemset dziewięćdzisiąt"
|
"sześćdziesiąt siedem tysięcy osiemset dziewięćdzisiąt"
|
||||||
)
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
num2words(10000000001000000100000, lang='pl'),
|
||||||
|
"dziesięć tryliardów bilion sto tysięcy"
|
||||||
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
num2words(215461407892039002157189883901676, lang='pl'),
|
num2words(215461407892039002157189883901676, lang='pl'),
|
||||||
"dwieście piętnaście kwintylionów czterysta sześćdziesiąt jeden "
|
"dwieście piętnaście kwintylionów czterysta sześćdziesiąt jeden "
|
||||||
@@ -52,7 +57,7 @@ class Num2WordsPLTest(TestCase):
|
|||||||
"dziewięćdzisiąt dwa tryliardy trzydzieści dziewięć trylionów "
|
"dziewięćdzisiąt dwa tryliardy trzydzieści dziewięć trylionów "
|
||||||
"dwa biliardy sto pięćdziesiąt siedem bilionów sto osiemdziesiąt "
|
"dwa biliardy sto pięćdziesiąt siedem bilionów sto osiemdziesiąt "
|
||||||
"dziewięć miliardów osiemset osiemdziesiąt trzy miliony "
|
"dziewięć miliardów osiemset osiemdziesiąt trzy miliony "
|
||||||
"dziewęćset jeden tysięcy sześćset siedemdziesiąt sześć"
|
"dziewięćset jeden tysięcy sześćset siedemdziesiąt sześć"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
num2words(719094234693663034822824384220291, lang='pl'),
|
num2words(719094234693663034822824384220291, lang='pl'),
|
||||||
@@ -66,19 +71,15 @@ class Num2WordsPLTest(TestCase):
|
|||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
num2words(
|
num2words(
|
||||||
963301000001918264129471042047146102350812074235000101020000120324,
|
963301000001918264129471001047146102 * 10**30 + 1007,
|
||||||
lang='pl'
|
lang='pl'
|
||||||
),
|
),
|
||||||
"dziewięćset sześćdziesiąt trzy decyliardy trzysta jeden "
|
"dziewięćset sześćdziesiąt trzy decyliardy trzysta jeden "
|
||||||
"decylionów nonylion dziewięćset osiemnaście oktyliardów dwieście "
|
"decylionów nonylion dziewięćset osiemnaście oktyliardów dwieście "
|
||||||
"sześćdziesiąt cztery oktyliony sto dwadzieścia dziewięć "
|
"sześćdziesiąt cztery oktyliony sto dwadzieścia dziewięć "
|
||||||
"septyliardów czterysta siedemdziesiąt jeden septylionów "
|
"septyliardów czterysta siedemdziesiąt jeden septylionów "
|
||||||
"czterdzieści dwa sekstyliardy czterdzieści siedem sekstylionów "
|
"sekstyliard czterdzieści siedem sekstylionów sto czterdzieści "
|
||||||
"sto czterdzieści sześć kwintyliardów sto dwa kwintyliony trzysta "
|
"sześć kwintyliardów sto dwa kwintyliony tysiąc siedem"
|
||||||
"pięćdziesiąt kwadryliardów osiemset dwanaście kwadrylionów "
|
|
||||||
"siedemdziesiąt cztery tryliardy dwieście trzydzieści pięć "
|
|
||||||
"trylionów sto jeden bilionów dwadzieścia miliardów sto "
|
|
||||||
"dwadzieścia tysięcy trzysta dwadzieścia cztery"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_to_ordinal(self):
|
def test_to_ordinal(self):
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|||||||
@@ -1,4 +1,19 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
# Copyright (c) 2017, Tufan Kaynak, Framras. All Rights Reserved.
|
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02110-1301 USA
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from num2words.utils import splitbyx
|
from num2words.utils import splitbyx
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2015, Savoir-faire Linux inc. All Rights Reserved.
|
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
|
||||||
|
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
Reference in New Issue
Block a user