Hello community,

here is the log from the commit of package python-Morfessor for 
openSUSE:Factory checked in at 2019-08-19 21:38:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Morfessor (Old)
 and      /work/SRC/openSUSE:Factory/.python-Morfessor.new.22127 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Morfessor"

Mon Aug 19 21:38:12 2019 rev:2 rq:724151 version:2.0.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Morfessor/python-Morfessor.changes        
2018-12-19 13:49:44.763257360 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-Morfessor.new.22127/python-Morfessor.changes 
    2019-08-19 21:38:16.644351037 +0200
@@ -1,0 +2,8 @@
+Fri Aug 16 16:25:22 UTC 2019 - Todd R <toddrme2...@gmail.com>
+
+- Update to 2.0.6
+  * add lru_cache to the segmentation commands
+- Update to 2.0.5
+  * Make scripts executable
+
+-------------------------------------------------------------------

Old:
----
  Morfessor-2.0.4.tar.gz

New:
----
  Morfessor-2.0.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Morfessor.spec ++++++
--- /var/tmp/diff_new_pack.pObbgt/_old  2019-08-19 21:38:18.280350009 +0200
+++ /var/tmp/diff_new_pack.pObbgt/_new  2019-08-19 21:38:18.320349983 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-Morfessor
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-Morfessor
-Version:        2.0.4
+Version:        2.0.6
 Release:        0
 Summary:        Unsupervised and semi-supervised morphological segmentation
 License:        BSD-2-Clause

++++++ Morfessor-2.0.4.tar.gz -> Morfessor-2.0.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Morfessor-2.0.4/LICENSE new/Morfessor-2.0.6/LICENSE
--- old/Morfessor-2.0.4/LICENSE 2018-02-15 08:24:03.000000000 +0100
+++ new/Morfessor-2.0.6/LICENSE 2019-07-31 14:31:55.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright (c) 2012-2018, Sami Virpioja, Peter Smit, and Stig-Arne Grönroos.
+Copyright (c) 2012-2019, Sami Virpioja, Peter Smit, and Stig-Arne Grönroos.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Morfessor-2.0.4/Morfessor.egg-info/PKG-INFO 
new/Morfessor-2.0.6/Morfessor.egg-info/PKG-INFO
--- old/Morfessor-2.0.4/Morfessor.egg-info/PKG-INFO     2018-02-15 
08:29:41.000000000 +0100
+++ new/Morfessor-2.0.6/Morfessor.egg-info/PKG-INFO     2019-07-31 
14:34:06.000000000 +0200
@@ -1,12 +1,11 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: Morfessor
-Version: 2.0.4
+Version: 2.0.6
 Summary: Morfessor
 Home-page: http://morpho.aalto.fi
 Author: Sami Virpioja, Peter Smit, Stig-Arne Grönroos
 Author-email: mor...@aalto.fi
 License: BSD
-Description-Content-Type: UNKNOWN
 Description: UNKNOWN
 Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
@@ -15,3 +14,4 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Topic :: Scientific/Engineering
+Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Morfessor-2.0.4/PKG-INFO new/Morfessor-2.0.6/PKG-INFO
--- old/Morfessor-2.0.4/PKG-INFO        2018-02-15 08:29:41.000000000 +0100
+++ new/Morfessor-2.0.6/PKG-INFO        2019-07-31 14:34:06.000000000 +0200
@@ -1,12 +1,11 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: Morfessor
-Version: 2.0.4
+Version: 2.0.6
 Summary: Morfessor
 Home-page: http://morpho.aalto.fi
 Author: Sami Virpioja, Peter Smit, Stig-Arne Grönroos
 Author-email: mor...@aalto.fi
 License: BSD
-Description-Content-Type: UNKNOWN
 Description: UNKNOWN
 Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
@@ -15,3 +14,4 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Topic :: Scientific/Engineering
+Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Morfessor-2.0.4/morfessor/__init__.py 
new/Morfessor-2.0.6/morfessor/__init__.py
--- old/Morfessor-2.0.4/morfessor/__init__.py   2018-02-15 08:24:03.000000000 
+0100
+++ new/Morfessor-2.0.6/morfessor/__init__.py   2019-07-31 14:31:55.000000000 
+0200
@@ -10,7 +10,7 @@
            'BaselineModel', 'main', 'get_default_argparser', 'main_evaluation',
            'get_evaluation_argparser']
 
-__version__ = '2.0.4'
+__version__ = '2.0.6'
 __author__ = 'Sami Virpioja, Peter Smit, Stig-Arne Grönroos'
 __author_email__ = "mor...@aalto.fi"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Morfessor-2.0.4/morfessor/cmd.py 
new/Morfessor-2.0.6/morfessor/cmd.py
--- old/Morfessor-2.0.4/morfessor/cmd.py        2018-02-15 08:24:03.000000000 
+0100
+++ new/Morfessor-2.0.6/morfessor/cmd.py        2019-07-31 14:31:55.000000000 
+0200
@@ -27,6 +27,8 @@
 
 _logger = logging.getLogger(__name__)
 
+LRU_MAX_SIZE = 1000000
+
 
 def get_default_argparser():
     import argparse
@@ -36,7 +38,7 @@
         description="""
 Morfessor %s
 
-Copyright (c) 2012-2018, Sami Virpioja, Peter Smit, and Stig-Arne Grönroos.
+Copyright (c) 2012-2019, Sami Virpioja, Peter Smit, and Stig-Arne Grönroos.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -325,6 +327,16 @@
     return console_level
 
 
+@utils.lru_cache(maxsize=LRU_MAX_SIZE)
+def _viterbi_segment(model, atoms, smooth, maxlen):
+    return model.viterbi_segment(atoms, smooth, maxlen)
+
+
+@utils.lru_cache(maxsize=LRU_MAX_SIZE)
+def _viterbi_nbest(model, atoms, nbest, smooth, maxlen):
+    return model.viterbi_nbest(atoms, nbest, smooth,maxlen)
+
+
 def main(args):
 
     console_level = initialize_logging(args)
@@ -524,9 +536,9 @@
                 else:
                     clogprob = 0
                 if args.nbest > 1:
-                    nbestlist = model.viterbi_nbest(atoms, args.nbest,
-                                                    args.viterbismooth,
-                                                    args.viterbimaxlen)
+                    nbestlist = _viterbi_nbest(
+                        model, atoms, args.nbest, args.viterbismooth,
+                        args.viterbimaxlen)
                     for constructions, logp in nbestlist:
                         analysis = io.format_constructions(constructions,
                                                            csep=csep)
@@ -535,8 +547,8 @@
                                                     count=count, logprob=logp,
                                                     clogprob=clogprob))
                 else:
-                    constructions, logp = model.viterbi_segment(
-                        atoms, args.viterbismooth, args.viterbimaxlen)
+                    constructions, logp = _viterbi_segment(
+                        model, atoms, args.viterbismooth, args.viterbimaxlen)
                     analysis = io.format_constructions(constructions, 
csep=csep)
                     fobj.write(outformat.format(analysis=analysis,
                                                 compound=compound,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Morfessor-2.0.4/morfessor/utils.py 
new/Morfessor-2.0.6/morfessor/utils.py
--- old/Morfessor-2.0.4/morfessor/utils.py      2018-02-15 08:24:03.000000000 
+0100
+++ new/Morfessor-2.0.6/morfessor/utils.py      2019-07-31 14:31:55.000000000 
+0200
@@ -9,6 +9,25 @@
 import types
 
 
+PY3 = sys.version_info[0] == 3
+
+
+def _dummy_lru_cache(*args, **kwargs):
+    return lambda func: func
+
+
+if PY3:
+    from functools import lru_cache
+else:
+    try:
+        # Backport for lru_cache
+        from backports.functools_lru_cache import lru_cache
+    except ImportError:
+        logging.warning(
+            "LRU cache disabled, install backports.functools_lru_cache to 
enable.")
+        lru_cache = _dummy_lru_cache
+
+
 LOGPROB_ZERO = 1000000
 
 


Reply via email to