File: use-system-wordnet.patch

package info (click to toggle)
python-pattern 2.6%2Bgit20180818-2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 93,888 kB
  • sloc: python: 28,119; xml: 15,085; makefile: 194
file content (13 lines) | stat: -rw-r--r-- 830 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
Index: python-pattern-2.6+git20180818/pattern/text/en/wordnet/__init__.py
===================================================================
--- python-pattern-2.6+git20180818.orig/pattern/text/en/wordnet/__init__.py
+++ python-pattern-2.6+git20180818/pattern/text/en/wordnet/__init__.py
@@ -411,7 +411,7 @@ def map32(id, pos=NOUN):
     """
     global _map32_cache
     if not _map32_cache:
-        _map32_cache = open(os.path.join(MODULE, "dict", "index.32"), encoding="latin-1").readlines()
+        _map32_cache = open(os.path.join("/", "usr", "share", "wordnet", "index.32"), encoding="latin-1").readlines()
         _map32_cache = (x for x in _map32_cache if x[0] != ";") # comments
         _map32_cache = dict(x.strip().split(" ") for x in _map32_cache)
     k = pos in _map32_pos2 and pos or _map32_pos1.get(pos, "x")