├── .gitignore ├── config.json ├── resources ├── 20180927035700.png └── 20180927035709.csv ├── test.js ├── package.json ├── Readme.md ├── main-sequential.js ├── main.js └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.old -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "grobid_host" : "localhost", 3 | "grobid_port" : "8070", 4 | "sleep_time" : 5000 5 | } -------------------------------------------------------------------------------- /resources/20180927035700.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kermitt2/grobid-client-node/HEAD/resources/20180927035700.png -------------------------------------------------------------------------------- /resources/20180927035709.csv: -------------------------------------------------------------------------------- 1 | "Item Name";"Group label" 2 | 1;230.9 3 | 2;121.6 4 | 3;87.9 5 | 5;66.2 6 | 8;57.7 7 | 10;56.5 8 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | const testPath = 'resources/'; 2 | 3 | testGROBID = function(path) { 4 | console.log("Testing GROBID call with: " + path); 5 | } 6 | 7 | testGROBID(testPath); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grobid-client-node", 3 | "version": "0.1.0", 4 | "description": "Basic client for the GROBID service", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Patrice Lopez", 10 | "license": "Apache 2.0", 11 | "keywords": [ 12 | "grobid" 13 | ], 14 | "dependencies": { 15 | "async": "^2.1.4", 16 | "mkdirp": "^0.5.1", 17 | "request": "^2.74.0", 18 | "form-data": "^2.2.0", 19 | "sleep": "" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Simple node.js client for GROBID REST services 2 | 3 | This node.js module can be used to process in an efficient concurrent manner a set of PDF in a given directory by the [GROBID](https://github.com/kermitt2/grobid) service. Results are written in a given output directory and include the resulting XML TEI representation of the PDF. 4 | 5 | ## Build and run 6 | 7 | You need first to install and start the *grobid* service, latest stable version, see the [documentation](http://grobid.readthedocs.io/). By default, it is assumed that the server will run on the address `http://localhost:8070`. You can change the server address by editing the config file `config.json`. 8 | 9 | Install the present module: 10 | 11 | > npm install 12 | 13 | Usage (GROBID server must be up and running): 14 | 15 | > node main -in *PATH_TO_THE_PDFS_TO_PROCESS* -out *WHERE_TO_PUT_THE_RESULTS* 16 | 17 | Example: 18 | 19 | > node main -in ~/tmp/in -out ~/tmp/out 20 | 21 | Only the files with extension `.pdf` present in the input directory (`-in`) will be processed, the other files will be ignored. Results will be written in the output directory (`-out`), reusing the file name with a different file extension (`.tei.xml`). 22 | 23 | Other parameters 24 | 25 | * `n`: the number of concurrent call to GROBID, default is `10` 26 | 27 | * the service to be called, default being `processFulltextDocument` (full processing of the document body), other possibilities are `processHeaderDocument` (only extracting and structuring the header) and `processReferences` (only extracting and structuring the bibliographical references). 28 | 29 | Example: 30 | 31 | > node main -in ~/tmp/in -out ~/tmp/out -n 20 processHeaderDocument 32 | 33 | This command will extract the header of the PDF files under `~/tmp/in` with 20 concurrent calls to the GROBID server and write the TEI results under `~/tmp/out`. 34 | 35 | ## Benchmarking 36 | 37 | Full text processing of __136 PDF__ (total 3443 pages, in average 25 pages per PDF) on Intel Core i7-4790K CPU 4.00GHz, 4 cores (8 threads), 16GB memory, n being the concurrency parameter: 38 | 39 | | n | runtime (s)| s/PDF | PDF/s | 40 | |----|------------|-------|-------| 41 | | 1 | 230.9 | 1.69 | 0.59 | 42 | | 2 | 121.6 | 0.89 | 1.12 | 43 | | 3 | 87.9 | 0.64 | 1.55 | 44 | | 5 | 66.2 | 0.48 | 2.05 | 45 | | 8 | 57.7 | 0.42 | 2.35 | 46 | | 10 | 56.5 | 0.41 | 2.41 | 47 | 48 | ![Runtime Plot](resources/20180927035700.png) 49 | 50 | As complementary info, GROBID processing of header of the 136 PDF and with `n=10` takes 5.37 s (8 times faster than the complete full text processing because only the two first pages of the PDF are considered), 25.33 PDF/s. In similar conditions, extraction and structuring of bibliographical references takes 27.1 s, 5.02 PDF/s. 51 | 52 | A [variant of this node.js client](https://github.com/istex/grobid-client-istex) for the ISTEX resources (22 million PDF) scaled to around 11 PDF per second with 2 16-CPU servers, processing approx. 950K PDF per day. 53 | 54 | ## Todo 55 | 56 | Benchmarking with more files (e.g. million ISTEX PDF). Also implement existing GROBID services for text input (date, name, affiliation/address, raw bibliographical references, etc.). Better support for parameters (including elements where to put coordinates). 57 | 58 | ## Requirements 59 | 60 | - async 61 | - request 62 | - form-data 63 | - mkdirp 64 | - sleep 65 | 66 | ## License 67 | 68 | Distributed under [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0). 69 | 70 | Main author and contact: Patrice Lopez () 71 | -------------------------------------------------------------------------------- /main-sequential.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* Module Require */ 4 | var mkdirp = require('mkdirp'), 5 | request = require('request'), 6 | FormData = require('form-data'), 7 | async = require('async'), 8 | path = require('path'), 9 | fs = require('fs'), 10 | sleep = require('sleep'); 11 | 12 | // the URL of the GROBID service (to be changed if necessary) 13 | const GROBID_URL = "http://localhost:8070/api/"; 14 | 15 | // for making console output less boring 16 | const green = '\x1b[32m'; 17 | const red = '\x1b[31m'; 18 | const orange = '\x1b[33m'; 19 | const white = '\x1b[37m'; 20 | const blue = `\x1b[34m`; 21 | const score = '\x1b[7m'; 22 | const bright = "\x1b[1m"; 23 | const reset = '\x1b[0m'; 24 | 25 | /** 26 | * List all the PDF files in a directory in a synchronous fashion, 27 | * @return the list of file names 28 | */ 29 | function getFiles(dir) { 30 | var fileList = []; 31 | var files = fs.readdirSync(dir); 32 | for (var i=0; i= listOfFiles.length) { 46 | return; 47 | } 48 | var file = listOfFiles[i]; 49 | console.log("---\nProcessing: " + options.inPath+"/"+file); 50 | 51 | var form = new FormData(); 52 | form.append("input", fs.createReadStream(options.inPath+"/"+file)); 53 | form.append("consolidateHeader", "1"); 54 | form.append("consolidateCitations", "0"); 55 | form.submit(GROBID_URL+"processFulltextDocument", function(err, res, body) { 56 | if (err) { 57 | console.log(err); 58 | return false; 59 | } 60 | 61 | if (!res) { 62 | console.log("GROBID service appears unavailable"); 63 | //return false; 64 | } else { 65 | res.setEncoding('utf8'); 66 | } 67 | 68 | if (res.statusCode == 503) { 69 | // service unavailable, normally it means all the threads for GROBID on the server are currently used 70 | // so we sleep a bit before retrying the process 71 | sleep.sleep(5); 72 | sequentialRequests(options, listOfFiles, i); 73 | } else if (res.statusCode != 200) { 74 | console.log("Call to GROBID service failed with error " + res.statusCode); 75 | // move to next file to be processed 76 | i++; 77 | sequentialRequests(options, listOfFiles, i); 78 | return false; 79 | } 80 | 81 | var body = ""; 82 | res.on("data", function (chunk) { 83 | body += chunk; 84 | }); 85 | 86 | res.on("end", function () { 87 | mkdirp(options.outPath, function(err, made) { 88 | // I/O error 89 | if (err) 90 | return cb(err); 91 | 92 | // first write the TEI reponse 93 | var jsonFilePath = options.outPath+"/"+file.replace(".pdf", ".tei.xml"); 94 | fs.writeFile(jsonFilePath, body, 'utf8', 95 | function(err) { 96 | if (err) { 97 | console.log(err); 98 | } 99 | console.log(white, "TEI response written under: " + jsonFilePath, reset); 100 | } 101 | ); 102 | 103 | // move to next file to be processed 104 | i++; 105 | sequentialRequests(options, listOfFiles, i); 106 | /*} else { 107 | // redo 108 | console.log("(weird bug from formdata/node.js...)"); 109 | console.log("retry..."); 110 | sequentialRequests(options, listOfFiles, i); 111 | }*/ 112 | }); 113 | }); 114 | }); 115 | } 116 | 117 | /** 118 | * Process a PDF file by calling the entity-fishing service and enrich with the resulting 119 | * JSON 120 | * @param {object} options object containing all the information necessary to manage the paths: 121 | * - {object} inPath input directory where to find the PDF files 122 | * - {object} outPath output directory where to write the results 123 | * - {string} profile the profile indicating which filter to use with the entity-fishing service, e.g. "species" 124 | * @return {undefined} Return undefined 125 | */ 126 | function processGROBID(options) { 127 | // get the PDF paths 128 | var listOfFiles = getFiles(options.inPath); 129 | console.log("found " + listOfFiles.length + " files to be processed"); 130 | sequentialRequests(options, listOfFiles, 0); 131 | }; 132 | 133 | /** 134 | * Init the main object with paths passed with the command line 135 | */ 136 | function init() { 137 | var options = new Object(); 138 | //var inPath; // path to the PDF 139 | //var outPath; // path where to write the results 140 | //var nbThread = 1; // number of threads to use when calling entity-fishing 141 | var attribute; // name of the passed parameter 142 | // get the path to the PDF to be processed 143 | for (var i = 1, len = process.argv.length; i < len; i++) { 144 | if (process.argv[i-1] == "-in") { 145 | options.inPath = process.argv[i]; 146 | } else if (process.argv[i-1] == "-out") { 147 | options.outPath = process.argv[i]; 148 | } 149 | } 150 | 151 | if (!options.inPath) { 152 | console.log("Input path is not defines"); 153 | return; 154 | } 155 | 156 | // check the input path 157 | fs.lstat(options.inPath, (err, stats) => { 158 | if (err) 159 | console.log(err); 160 | if (stats.isFile()) 161 | console.log("Input path must be a directory, not a file"); 162 | if (!stats.isDirectory()) 163 | console.log("Input path is not a valid directory"); 164 | }); 165 | 166 | // check the output path 167 | if (options.outPath) { 168 | fs.lstat(options.outPath, (err, stats) => { 169 | if (err) 170 | console.log(err); 171 | if (stats.isFile()) 172 | console.log("Output path must be a directory, not a file"); 173 | if (!stats.isDirectory()) 174 | console.log("Output path is not a valid directory"); 175 | }); 176 | } 177 | return options; 178 | } 179 | 180 | function main() { 181 | var options = init(); 182 | processGROBID(options); 183 | } 184 | 185 | main(); 186 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* Module Require */ 4 | var mkdirp = require('mkdirp'), 5 | request = require('request'), 6 | FormData = require('form-data'), 7 | async = require('async'), 8 | path = require('path'), 9 | fs = require('fs'), 10 | sleep = require('sleep'); 11 | 12 | // the URL of the GROBID service (to be changed if necessary) 13 | //const GROBID_URL = "http://localhost:8070/api/"; 14 | 15 | // for making console output less boring 16 | const green = '\x1b[32m'; 17 | const red = '\x1b[31m'; 18 | const orange = '\x1b[33m'; 19 | const white = '\x1b[37m'; 20 | const blue = `\x1b[34m`; 21 | const score = '\x1b[7m'; 22 | const bright = "\x1b[1m"; 23 | const reset = '\x1b[0m'; 24 | 25 | /** 26 | * List all the PDF files in a directory in a synchronous fashion, 27 | * @return the list of file names 28 | */ 29 | function getFiles(dir) { 30 | var fileList = []; 31 | var files = fs.readdirSync(dir); 32 | for (var i=0; i { 176 | if (err) 177 | console.log(err); 178 | if (stats.isFile()) 179 | console.log("Input path must be a directory, not a file"); 180 | if (!stats.isDirectory()) 181 | console.log("Input path is not a valid directory"); 182 | }); 183 | 184 | // check the output path 185 | if (options.outPath) { 186 | fs.lstat(options.outPath, (err, stats) => { 187 | if (err) 188 | console.log(err); 189 | if (stats.isFile()) 190 | console.log("Output path must be a directory, not a file"); 191 | if (!stats.isDirectory()) 192 | console.log("Output path is not a valid directory"); 193 | }); 194 | } 195 | return options; 196 | } 197 | 198 | function end() { 199 | var this_is_the_end = new Date() - start 200 | console.info('Execution time: %dms', this_is_the_end) 201 | } 202 | 203 | var start; 204 | 205 | function main() { 206 | var options = init(); 207 | start = new Date() 208 | processGROBID(options); 209 | } 210 | 211 | main(); 212 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright 2008-2018 GROBID's contributors 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | 204 | 205 | Apache CouchDB Subcomponents 206 | 207 | The Apache CouchDB project includes a number of subcomponents with separate 208 | copyright notices and license terms. Your use of the code for the these 209 | subcomponents is subject to the terms and conditions of the following licenses. 210 | 211 | For the m4/ac_check_icu.m4 component: 212 | 213 | Copyright (c) 2005 Akos Maroy 214 | 215 | Copying and distribution of this file, with or without modification, are 216 | permitted in any medium without royalty provided the copyright notice 217 | and this notice are preserved. 218 | 219 | For the share/www/script/jquery.js component: 220 | 221 | Copyright (c) 2009 John Resig, http://jquery.com/ 222 | 223 | Permission is hereby granted, free of charge, to any person obtaining 224 | a copy of this software and associated documentation files (the 225 | "Software"), to deal in the Software without restriction, including 226 | without limitation the rights to use, copy, modify, merge, publish, 227 | distribute, sublicense, and/or sell copies of the Software, and to 228 | permit persons to whom the Software is furnished to do so, subject to 229 | the following conditions: 230 | 231 | The above copyright notice and this permission notice shall be 232 | included in all copies or substantial portions of the Software. 233 | 234 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 235 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 236 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 237 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 238 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 239 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 240 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 241 | 242 | For the share/www/script/jquery-ui-1.8.11.custom.min.js and 243 | share/www/style/jquery-ui-1.8.11.custom.css components: 244 | 245 | Copyright (c) 2011 Paul Bakaus, http://jqueryui.com/ 246 | 247 | This software consists of voluntary contributions made by many 248 | individuals (AUTHORS.txt, http://jqueryui.com/about) For exact 249 | contribution history, see the revision history and logs, available 250 | at http://jquery-ui.googlecode.com/svn/ 251 | 252 | Permission is hereby granted, free of charge, to any person obtaining 253 | a copy of this software and associated documentation files (the 254 | "Software"), to deal in the Software without restriction, including 255 | without limitation the rights to use, copy, modify, merge, publish, 256 | distribute, sublicense, and/or sell copies of the Software, and to 257 | permit persons to whom the Software is furnished to do so, subject to 258 | the following conditions: 259 | 260 | The above copyright notice and this permission notice shall be 261 | included in all copies or substantial portions of the Software. 262 | 263 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 264 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 265 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 266 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 267 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 268 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 269 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 270 | 271 | For the share/www/script/jquery.form.js component: 272 | 273 | http://malsup.com/jquery/form/ 274 | 275 | Permission is hereby granted, free of charge, to any person obtaining 276 | a copy of this software and associated documentation files (the 277 | "Software"), to deal in the Software without restriction, including 278 | without limitation the rights to use, copy, modify, merge, publish, 279 | distribute, sublicense, and/or sell copies of the Software, and to 280 | permit persons to whom the Software is furnished to do so, subject to 281 | the following conditions: 282 | 283 | The above copyright notice and this permission notice shall be 284 | included in all copies or substantial portions of the Software. 285 | 286 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 287 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 288 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 289 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 290 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 291 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 292 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 293 | 294 | For the share/www/script/json2.js component: 295 | 296 | Public Domain 297 | 298 | No warranty expressed or implied. Use at your own risk. 299 | 300 | For the src/mochiweb component: 301 | 302 | Copyright (c) 2007 Mochi Media, Inc. 303 | 304 | Permission is hereby granted, free of charge, to any person obtaining 305 | a copy of this software and associated documentation files (the 306 | "Software"), to deal in the Software without restriction, including 307 | without limitation the rights to use, copy, modify, merge, publish, 308 | distribute, sublicense, and/or sell copies of the Software, and to 309 | permit persons to whom the Software is furnished to do so, subject to 310 | the following conditions: 311 | 312 | The above copyright notice and this permission notice shall be 313 | included in all copies or substantial portions of the Software. 314 | 315 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 316 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 317 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 318 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 319 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 320 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 321 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 322 | 323 | For the src/ibrowse component: 324 | 325 | Copyright (c) 2006, Chandrashekhar Mullaparthi 326 | All rights reserved. 327 | 328 | Redistribution and use in source and binary forms, with or without 329 | modification, are permitted provided that the following conditions are met: 330 | 331 | * Redistributions of source code must retain the above copyright notice, 332 | this list of conditions and the following disclaimer. 333 | * Redistributions in binary form must reproduce the above copyright notice, 334 | this list of conditions and the following disclaimer in the documentation 335 | and/or other materials provided with the distribution. 336 | * Neither the name of the T-Mobile nor the names of its contributors may be 337 | used to endorse or promote products derived from this software without 338 | specific prior written permission. 339 | 340 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 341 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 342 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 343 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 344 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 345 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 346 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 347 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 348 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 349 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 350 | 351 | For the src/erlang-oauth component: 352 | 353 | Copyright (c) 2008-2009 Tim Fletcher 354 | 355 | Permission is hereby granted, free of charge, to any person 356 | obtaining a copy of this software and associated documentation 357 | files (the "Software"), to deal in the Software without 358 | restriction, including without limitation the rights to use, 359 | copy, modify, merge, publish, distribute, sublicense, and/or sell 360 | copies of the Software, and to permit persons to whom the 361 | Software is furnished to do so, subject to the following 362 | conditions: 363 | 364 | The above copyright notice and this permission notice shall be 365 | included in all copies or substantial portions of the Software. 366 | 367 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 368 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 369 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 370 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 371 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 372 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 373 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 374 | OTHER DEALINGS IN THE SOFTWARE. 375 | 376 | For the src/etap component: 377 | 378 | Copyright (c) 2008-2009 Nick Gerakines 379 | 380 | Permission is hereby granted, free of charge, to any person 381 | obtaining a copy of this software and associated documentation 382 | files (the "Software"), to deal in the Software without 383 | restriction, including without limitation the rights to use, 384 | copy, modify, merge, publish, distribute, sublicense, and/or sell 385 | copies of the Software, and to permit persons to whom the 386 | Software is furnished to do so, subject to the following 387 | conditions: 388 | 389 | The above copyright notice and this permission notice shall be 390 | included in all copies or substantial portions of the Software. 391 | 392 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 393 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 394 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 395 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 396 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 397 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 398 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 399 | OTHER DEALINGS IN THE SOFTWARE. 400 | 401 | --------------------------------------------------------------------------------