LangSC 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/__version__.py +1 -1
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/bcc.py +27 -1
- langsc-2.0.2/LangSC/bcclib.dll +0 -0
- langsc-2.0.2/LangSC/libbcclib.so +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC.egg-info/PKG-INFO +1 -1
- {langsc-2.0.0 → langsc-2.0.2}/LangSC.egg-info/SOURCES.txt +0 -1
- {langsc-2.0.0 → langsc-2.0.2}/PKG-INFO +1 -1
- {langsc-2.0.0 → langsc-2.0.2}/setup.cfg +1 -1
- langsc-2.0.0/LangSC/BCC0.py +0 -4
- langsc-2.0.0/LangSC/bcclib.dll +0 -0
- langsc-2.0.0/LangSC/libbcclib.so +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LICENSE +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/BCCconfig.txt +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/GPFconfig.txt +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/Pathplan.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/cdt.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/cgraph.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/config6 +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/dot.exe +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/fontconfig.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/fontconfig_fix.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/freetype6.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/gvc.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/gvplugin_core.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/gvplugin_dot_layout.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/gvplugin_gd.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/gvplugin_pango.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/iconv.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/intl.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/jpeg62.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libcairo-2.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libexpat-1.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libexpat.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libfontconfig-1.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libfreetype-6.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libgdk_pixbuf-2.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libglade-2.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libglib-2.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libgmodule-2.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libgobject-2.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libgthread-2.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libgtkglext-win32-1.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libpango-1.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libpangocairo-1.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libpangoft2-1.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libpangowin32-1.0-0.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libpng14-14.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/librsvg-2-2.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/libxml2.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/ltdl.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Graph/zlib1.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Parser.lua +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/Segment.dat +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/__init__.py +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/_utils.py +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/base.lex +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/gpf.py +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/gpflib.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/idxPOS.dat +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/jss.py +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/jsslib.dll +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/libbcclib.dylib +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/libgpflib.dylib +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/libgpflib.so +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/libjsslib.dylib +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC/libjsslib.so +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC.egg-info/dependency_links.txt +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC.egg-info/not-zip-safe +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC.egg-info/requires.txt +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/LangSC.egg-info/top_level.txt +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/MANIFEST.in +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/README.md +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/pyproject.toml +0 -0
- {langsc-2.0.0 → langsc-2.0.2}/setup.py +0 -0
|
@@ -151,8 +151,33 @@ class BCC:
|
|
|
151
151
|
command = Others.get("Command", Others.get("Output", "Freq"))
|
|
152
152
|
if command == "Context":
|
|
153
153
|
ret = self._clean_source_id(ret)
|
|
154
|
+
elif command == "Freq":
|
|
155
|
+
ret = self._clean_freq_source(ret)
|
|
154
156
|
return ret
|
|
155
157
|
|
|
158
|
+
def _clean_freq_source(self, ret):
|
|
159
|
+
"""Format Source field in Freq results for readability.
|
|
160
|
+
|
|
161
|
+
Replaces \\ with / in paths, and puts each source:count on its own line.
|
|
162
|
+
"""
|
|
163
|
+
try:
|
|
164
|
+
data = json.loads(ret)
|
|
165
|
+
if isinstance(data, dict) and "Source" in data:
|
|
166
|
+
source = data["Source"]
|
|
167
|
+
if isinstance(source, dict):
|
|
168
|
+
for key in source:
|
|
169
|
+
val = source[key]
|
|
170
|
+
if isinstance(val, str):
|
|
171
|
+
val = val.replace("\\", "/")
|
|
172
|
+
parts = val.split(" ")
|
|
173
|
+
source[key] = "\n".join(parts)
|
|
174
|
+
ret = json.dumps(data, ensure_ascii=False, indent=2)
|
|
175
|
+
# Make newlines in Source values display as actual line breaks
|
|
176
|
+
ret = ret.replace("\\n", "\n")
|
|
177
|
+
return ret
|
|
178
|
+
except (json.JSONDecodeError, TypeError):
|
|
179
|
+
return ret
|
|
180
|
+
|
|
156
181
|
def _clean_source_id(self, ret):
|
|
157
182
|
"""Remove SourceID fields from Context results."""
|
|
158
183
|
try:
|
|
@@ -168,7 +193,8 @@ class BCC:
|
|
|
168
193
|
for item in v:
|
|
169
194
|
if isinstance(item, dict):
|
|
170
195
|
item.pop("SourceID", None)
|
|
171
|
-
|
|
196
|
+
ret = json.dumps(data, ensure_ascii=False, indent=2)
|
|
197
|
+
return ret.replace("\\\\", "/")
|
|
172
198
|
except (json.JSONDecodeError, TypeError):
|
|
173
199
|
return ret
|
|
174
200
|
|
|
Binary file
|
|
Binary file
|
langsc-2.0.0/LangSC/BCC0.py
DELETED
langsc-2.0.0/LangSC/bcclib.dll
DELETED
|
Binary file
|
langsc-2.0.0/LangSC/libbcclib.so
DELETED
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|