mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-05 01:26:21 +00:00
6 lines
240 KiB
JavaScript
6 lines
240 KiB
JavaScript
|
/* compromise v11.11.0
|
||
|
github.com/nlp-compromise/compromise
|
||
|
MIT
|
||
|
*/
|
||
|
|
||
|
!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).nlp=t()}(function(){return function i(o,s,u){function l(e,t){if(!s[e]){if(!o[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(c)return c(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[e]={exports:{}};o[e][0].call(a.exports,function(t){return l(o[e][1][t]||t)},a,a.exports,i,o,s,u)}return s[e].exports}for(var c="function"==typeof require&&require,t=0;t<u.length;t++)l(u[t]);return l}({1:[function(h,r,n){(function(e){!function(t){"object"==typeof n&&void 0!==r?r.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).unpack=t()}(function(){return function i(o,s,u){function l(e,t){if(!s[e]){if(!o[e]){var r="function"==typeof h&&h;if(!t&&r)return r(e,!0);if(c)return c(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[e]={exports:{}};o[e][0].call(a.exports,function(t){return l(o[e][1][t]||t)},a,a.exports,i,o,s,u)}return s[e].exports}for(var c="function"==typeof h&&h,t=0;t<u.length;t++)l(u[t]);return l}({1:[function(t,e,r){"use strict";var s=36,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",u=i.split("").reduce(function(t,e,r){return t[e]=r,t},{});e.exports={toAlphaCode:function(t){if(void 0!==i[t])return i[t];for(var e=1,r=s,n="";r<=t;t-=r,e++,r*=s);for(;e--;){var a=t%s;n=String.fromCharCode((a<10?48:55)+a)+n,t=(t-a)/s}return n},fromAlphaCode:function(t){if(void 0!==u[t])return u[t];for(var e=0,r=1,n=s,a=1;r<t.length;e+=n,r++,n*=s);for(var i=t.length-1;0<=i;i--,a*=s){var o=t.charCodeAt(i)-48;10<o&&(o-=7),e+=o*a}return e}}},{}],2:[function(t,e,r){"use strict";var o=t("./unpack");e.exports=function(t){var a=t.split("|").reduce(function(t,e){var r=e.split("¦");return t[r[0]]=r[1],t},{}),i={};return Object.keys(a).forEach(function(t){var e=o(a[t]);"true"===t&&(t=!0);for(var r=0;r<e.length;r++){var n=e[r];!0===i.hasOwnProperty(n)?!1===Array.isArray(i[n])?i[n]=[i[n],t]:i[n].push(t):i[n]=t}}),i}},{"./unpack":4}],3:[function(t,e,r){"use strict";var a=t("../encoding");e.exports=function(t){for(var e=new RegExp("([0-9A-Z]+):([0-9A-Z]+)"),r=0;r<t.nodes.length;r++){var n=e.exec(t.nodes[r]);if(!n){t.symCount=r;break}t.syms[a.fromAlphaCode(n[1])]=a.fromAlphaCode(n[2])}t.nodes=t.nodes.slice(t.symCount,t.nodes.length)}},{"../encoding":1}],4:[function(t,e,r){"use strict";var n=t("./symbols"),p=t("../encoding");e.exports=function(t){var m,d,e={nodes:t.split(";"),syms:[],symCount:0};return t.match(":")&&n(e),m=e,d=[],function t(e,r){var n,a,i,o,s=m.nodes[e];"!"===s[0]&&(d.push(r),s=s.slice(1));for(var u=s.split(/([A-Z0-9,]+)/g),l=0;l<u.length;l+=2){var c=u[l],h=u[l+1];if(c){var f=r+c;","!==h&&void 0!==h?t((n=m,a=h,i=e,(o=p.fromAlphaCode(a))<n.symCount?n.syms[o]:i+o+1-n.symCount),f):d.push(f)}}}(0,""),d}},{"../encoding":1,"./symbols":3}]},{},[2])(2)}),function(t){"object"==typeof n&&void 0!==r?r.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).unpack=t()}(function(){return function i(o,s,u){function l(e,t){if(!s[e]){if(!o[e]){var r="function"==typeof h&&h;if(!t&&r)return r(e,!0);if(c)return c(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[e]={exports:{}};o[e][0].call(a.exports,function(t){return l(o[e][1][t]||t)},a,a.exports,i,o,s,u)}return s[e].exports}for(var c="function"==typeof h&&h,t=0;t<u.length;t++)l(u[t]);return l}({1:[function(t,e,r){"use strict";var i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",s=i.split("").reduce(function(t,e,r){return t[e]=r,t},{});e.exports={toAlphaCode:function(t){if(void 0!==i[t])return i[t];for(var e=1,r=36,n="";r<=t;t-=r,e++,r*=36);for(;e--;){var a=t%36;n=String.fromCharCode((a<10?48:55)+a)+n,t=(t-a)/36}return n},fromAlphaCode:function(t){if(void 0!==s[t])return s[t];for(var e=0,r=1,n=36,a=1;r<t.length;e+=n,r++,n*=36);for(var i=t.length-1;0<
|