Socket
Socket
Sign inDemoInstall

chinese-seg

Package Overview
Dependencies
6
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

12

lib/middleware/punctuation.js

@@ -28,3 +28,3 @@ var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

isToken = function(text, index) {
var halfChar, nextChar, oriChar, prevChar, result, _i, _ref1, _ref2, _ref3, _results;
var halfChar, nextChar, oriChar, prevChar, result, _i, _j, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _results, _results1;
oriChar = text.charAt(index);

@@ -39,8 +39,12 @@ halfChar = oriChar.toHalfwidth().toHalfwidthSpace();

break;
case ".":
result = !(_ref1 = nextChar.charCodeAt(), __indexOf.call((function() {
case '.':
result = !((_ref1 = nextChar.charCodeAt(), __indexOf.call((function() {
_results = [];
for (var _i = _ref2 = '0'.charCodeAt(), _ref3 = '9'.charCodeAt(); _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); }
return _results;
}).apply(this), _ref1) >= 0);
}).apply(this), _ref1) >= 0) && (_ref4 = prevChar.charCodeAt(), __indexOf.call((function() {
_results1 = [];
for (var _j = _ref5 = '0'.charCodeAt(), _ref6 = '9'.charCodeAt(); _ref5 <= _ref6 ? _j <= _ref6 : _j >= _ref6; _ref5 <= _ref6 ? _j++ : _j--){ _results1.push(_j); }
return _results1;
}).apply(this), _ref4) >= 0));
break;

@@ -47,0 +51,0 @@ default:

{
"name": "chinese-seg",
"version": "0.0.2",
"version": "0.0.3",
"description": "Implement Chinese text segmentation algorithm",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc