@stdlib/datasets-savoy-stopwords-fr-cli 0.1.0

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.
@@ -0,0 +1,165 @@
1
+ #/
2
+ # @license Apache-2.0
3
+ #
4
+ # Copyright (c) 2023 The Stdlib Authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #/
18
+
19
+ # Workflow name:
20
+ name: publish_cli
21
+
22
+ # Workflow triggers:
23
+ on:
24
+ # Allow the workflow to be manually run:
25
+ workflow_dispatch:
26
+ # Workflow inputs:
27
+ inputs:
28
+ version:
29
+ description: 'Version Increment'
30
+ type: choice
31
+ default: 'none'
32
+ options:
33
+ - 'none'
34
+ - 'major'
35
+ - 'minor'
36
+ - 'patch'
37
+ - 'premajor'
38
+ - 'preminor'
39
+ - 'prepatch'
40
+ - 'prerelease'
41
+
42
+ # Workflow jobs:
43
+ jobs:
44
+
45
+ # Define job to publish package to npm:
46
+ publish:
47
+
48
+ # Define display name:
49
+ name: 'Publish CLI package to npm'
50
+
51
+ # Define the type of virtual host machine on which to run the job:
52
+ runs-on: ubuntu-latest
53
+
54
+ # Define environment variables:
55
+ env:
56
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
57
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
58
+
59
+ # Define the sequence of job steps...
60
+ steps:
61
+
62
+ # Checkout cli branch:
63
+ - name: 'Checkout cli branch'
64
+ uses: actions/checkout@v3
65
+ with:
66
+ ref: cli
67
+
68
+ # Install Node.js:
69
+ - name: 'Install Node.js'
70
+ uses: actions/setup-node@v3
71
+ with:
72
+ node-version: 16
73
+ timeout-minutes: 5
74
+
75
+ # Configure git:
76
+ - name: 'Configure git'
77
+ run: |
78
+ git config --local user.email "noreply@stdlib.io"
79
+ git config --local user.name "stdlib-bot"
80
+
81
+ # Increment package version (if requested):
82
+ - name: 'Increment package version (if requested)'
83
+ if: ${{ github.event.inputs.version != 'none' }}
84
+ run: |
85
+ # Save NPM_TOKEN to user's .npmrc:
86
+ echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
87
+
88
+ # Increment package version:
89
+ npm version ${{ github.event.inputs.version }} --no-git-tag-version
90
+
91
+ # Define variable for new version:
92
+ NEW_VERSION=$(node -p "require('./package.json').version")
93
+
94
+ # Replace branch in README.md link definitions for badges with the new version:
95
+ find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/branch([=:])[^ ]+/branch\1v${NEW_VERSION}/g"
96
+
97
+ # Create a new commit and tag:
98
+ git add package.json README.md
99
+ git commit -m "Release v${NEW_VERSION}"
100
+ git tag -a "v${NEW_VERSION}-cli" -m "Release v${NEW_VERSION}"
101
+
102
+ # Push changes to GitHub:
103
+ SLUG=${{ github.repository }}
104
+ git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" --follow-tags
105
+
106
+ # Replace GitHub MathJax equations with SVGs:
107
+ - name: 'Replace GitHub MathJax equations with SVGs'
108
+ run: |
109
+ find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/```math\n([\s\S]+?)\n```\n\n//g'
110
+ find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/<!-- <div class="equation"(.*)(<\/div>\s*-->)/<div class="equation"$1<\/div>/sg'
111
+
112
+ # Replace GitHub links to individual packages with npm links:
113
+ - name: 'Replace all GitHub links to individual packages with npm links'
114
+ run: |
115
+ find . -type f -name '*.md' -print0 | xargs -0 sed -Ei '/tree\/main/b; s/@stdlib\/([^:]*)\]: https:\/\/github.com\/stdlib-js/@stdlib\/\1\]: https:\/\/www.npmjs.com\/package\/@stdlib/g'
116
+ SLUG=${{ github.repository }}
117
+ ESCAPED_SLUG=${SLUG//\//\\\/}
118
+ REPO=${SLUG#*/}
119
+ find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/https:\/\/github.com\/${ESCAPED_SLUG}\/tree\/main/https:\/\/www.npmjs.com\/package\/@stdlib\/${REPO}/g"
120
+
121
+ # Publish package to npm:
122
+ - name: 'Publish package to npm'
123
+ uses: JS-DevTools/npm-publish@v2
124
+ with:
125
+ token: ${{ secrets.NPM_TOKEN }}
126
+ access: public
127
+
128
+ # Discard any uncommitted changes:
129
+ - name: 'Discard any uncommitted changes'
130
+ run: |
131
+ git reset --hard
132
+
133
+ # Send status to Slack channel if job fails:
134
+ - name: 'Send status to Slack channel in case of failure'
135
+ uses: act10ns/slack@v2
136
+ with:
137
+ status: ${{ job.status }}
138
+ steps: ${{ toJson(steps) }}
139
+ channel: '#npm-ci'
140
+ if: failure()
141
+
142
+ # Define job to cancel any running or queued workflow runs...
143
+ cancel:
144
+
145
+ # Define the type of virtual host machine on which to run the job:
146
+ runs-on: ubuntu-latest
147
+
148
+ # Time out the job after 3 minutes:
149
+ timeout-minutes: 3
150
+
151
+ # Define the sequence of job steps...
152
+ steps:
153
+
154
+ # Cancel any running or queued workflow runs:
155
+ - name: 'Cancel running or queued workflow runs'
156
+ uses: styfle/cancel-workflow-action@0.11.0
157
+ with:
158
+ workflow_id: >-
159
+ benchmark.yml,
160
+ examples.yml,
161
+ test.yml,
162
+ test_coverage.yml,
163
+ test_install.yml,
164
+ publish.yml
165
+ access_token: ${{ github.token }}
package/CONTRIBUTORS ADDED
@@ -0,0 +1,39 @@
1
+ # This file is generated by tools/scripts/update_contributors.
2
+ #
3
+ # Contributors listed in alphabetical order.
4
+
5
+ Ali Salesi <ali_sal1381@yahoo.com>
6
+ Amit Jimiwal <amitjimiwal45@gmail.com>
7
+ Athan Reines <kgryte@gmail.com>
8
+ Brendan Graetz <bguiz@users.noreply.github.com>
9
+ Bruno Fenzl <brunofenzl@gmail.com>
10
+ Christopher Dambamuromo <chridam@gmail.com>
11
+ Dan Rose <danoftheroses@gmail.com>
12
+ Dominik Moritz <domoritz@gmail.com>
13
+ Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
14
+ Frank Kovacs <fran70kk@gmail.com>
15
+ Harshita Kalani <harshitakalani02@gmail.com>
16
+ James Gelok <jdgelok@gmail.com>
17
+ Jithin KS <jithinks112@gmail.com>
18
+ Joey Reed <joeyrreed@gmail.com>
19
+ Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
20
+ Joris Labie <joris.labie1@gmail.com>
21
+ Justin Dennison <justin1dennison@gmail.com>
22
+ Marcus Fantham <mfantham@users.noreply.github.com>
23
+ Matt Cochrane <matthew.cochrane.eng@gmail.com>
24
+ Milan Raj <rajsite@users.noreply.github.com>
25
+ Momtchil Momtchev <momtchil@momtchev.com>
26
+ Naresh Jagadeesan <naresh.naresh000@gmail.com>
27
+ Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
28
+ Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
29
+ Philipp Burckhardt <pburckhardt@outlook.com>
30
+ Pranav Goswami <goswami.4@iitj.ac.in>
31
+ Ricky Reusser <rsreusser@gmail.com>
32
+ Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
33
+ Ryan Seal <splrk@users.noreply.github.com>
34
+ Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
35
+ Shraddheya Shendre <shendreshraddheya@gmail.com>
36
+ Stephannie Jiménez Gacha <steff456@hotmail.com>
37
+ Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
38
+ orimiles5 <97595296+orimiles5@users.noreply.github.com>
39
+ rei2hu <reimu@reimu.ws>
package/LICENSE ADDED
@@ -0,0 +1,209 @@
1
+ The data files (databases) and their contents are licensed under a BSD-2-Clause
2
+ license.
3
+
4
+ The software is licensed under Apache License, Version 2.0.
5
+
6
+
7
+
8
+ Apache License
9
+ Version 2.0, January 2004
10
+ http://www.apache.org/licenses/
11
+
12
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
13
+
14
+ 1. Definitions.
15
+
16
+ "License" shall mean the terms and conditions for use, reproduction,
17
+ and distribution as defined by Sections 1 through 9 of this document.
18
+
19
+ "Licensor" shall mean the copyright owner or entity authorized by
20
+ the copyright owner that is granting the License.
21
+
22
+ "Legal Entity" shall mean the union of the acting entity and all
23
+ other entities that control, are controlled by, or are under common
24
+ control with that entity. For the purposes of this definition,
25
+ "control" means (i) the power, direct or indirect, to cause the
26
+ direction or management of such entity, whether by contract or
27
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
28
+ outstanding shares, or (iii) beneficial ownership of such entity.
29
+
30
+ "You" (or "Your") shall mean an individual or Legal Entity
31
+ exercising permissions granted by this License.
32
+
33
+ "Source" form shall mean the preferred form for making modifications,
34
+ including but not limited to software source code, documentation
35
+ source, and configuration files.
36
+
37
+ "Object" form shall mean any form resulting from mechanical
38
+ transformation or translation of a Source form, including but
39
+ not limited to compiled object code, generated documentation,
40
+ and conversions to other media types.
41
+
42
+ "Work" shall mean the work of authorship, whether in Source or
43
+ Object form, made available under the License, as indicated by a
44
+ copyright notice that is included in or attached to the work
45
+ (an example is provided in the Appendix below).
46
+
47
+ "Derivative Works" shall mean any work, whether in Source or Object
48
+ form, that is based on (or derived from) the Work and for which the
49
+ editorial revisions, annotations, elaborations, or other modifications
50
+ represent, as a whole, an original work of authorship. For the purposes
51
+ of this License, Derivative Works shall not include works that remain
52
+ separable from, or merely link (or bind by name) to the interfaces of,
53
+ the Work and Derivative Works thereof.
54
+
55
+ "Contribution" shall mean any work of authorship, including
56
+ the original version of the Work and any modifications or additions
57
+ to that Work or Derivative Works thereof, that is intentionally
58
+ submitted to Licensor for inclusion in the Work by the copyright owner
59
+ or by an individual or Legal Entity authorized to submit on behalf of
60
+ the copyright owner. For the purposes of this definition, "submitted"
61
+ means any form of electronic, verbal, or written communication sent
62
+ to the Licensor or its representatives, including but not limited to
63
+ communication on electronic mailing lists, source code control systems,
64
+ and issue tracking systems that are managed by, or on behalf of, the
65
+ Licensor for the purpose of discussing and improving the Work, but
66
+ excluding communication that is conspicuously marked or otherwise
67
+ designated in writing by the copyright owner as "Not a Contribution."
68
+
69
+ "Contributor" shall mean Licensor and any individual or Legal Entity
70
+ on behalf of whom a Contribution has been received by Licensor and
71
+ subsequently incorporated within the Work.
72
+
73
+ 2. Grant of Copyright License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ copyright license to reproduce, prepare Derivative Works of,
77
+ publicly display, publicly perform, sublicense, and distribute the
78
+ Work and such Derivative Works in Source or Object form.
79
+
80
+ 3. Grant of Patent License. Subject to the terms and conditions of
81
+ this License, each Contributor hereby grants to You a perpetual,
82
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
83
+ (except as stated in this section) patent license to make, have made,
84
+ use, offer to sell, sell, import, and otherwise transfer the Work,
85
+ where such license applies only to those patent claims licensable
86
+ by such Contributor that are necessarily infringed by their
87
+ Contribution(s) alone or by combination of their Contribution(s)
88
+ with the Work to which such Contribution(s) was submitted. If You
89
+ institute patent litigation against any entity (including a
90
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
91
+ or a Contribution incorporated within the Work constitutes direct
92
+ or contributory patent infringement, then any patent licenses
93
+ granted to You under this License for that Work shall terminate
94
+ as of the date such litigation is filed.
95
+
96
+ 4. Redistribution. You may reproduce and distribute copies of the
97
+ Work or Derivative Works thereof in any medium, with or without
98
+ modifications, and in Source or Object form, provided that You
99
+ meet the following conditions:
100
+
101
+ (a) You must give any other recipients of the Work or
102
+ Derivative Works a copy of this License; and
103
+
104
+ (b) You must cause any modified files to carry prominent notices
105
+ stating that You changed the files; and
106
+
107
+ (c) You must retain, in the Source form of any Derivative Works
108
+ that You distribute, all copyright, patent, trademark, and
109
+ attribution notices from the Source form of the Work,
110
+ excluding those notices that do not pertain to any part of
111
+ the Derivative Works; and
112
+
113
+ (d) If the Work includes a "NOTICE" text file as part of its
114
+ distribution, then any Derivative Works that You distribute must
115
+ include a readable copy of the attribution notices contained
116
+ within such NOTICE file, excluding those notices that do not
117
+ pertain to any part of the Derivative Works, in at least one
118
+ of the following places: within a NOTICE text file distributed
119
+ as part of the Derivative Works; within the Source form or
120
+ documentation, if provided along with the Derivative Works; or,
121
+ within a display generated by the Derivative Works, if and
122
+ wherever such third-party notices normally appear. The contents
123
+ of the NOTICE file are for informational purposes only and
124
+ do not modify the License. You may add Your own attribution
125
+ notices within Derivative Works that You distribute, alongside
126
+ or as an addendum to the NOTICE text from the Work, provided
127
+ that such additional attribution notices cannot be construed
128
+ as modifying the License.
129
+
130
+ You may add Your own copyright statement to Your modifications and
131
+ may provide additional or different license terms and conditions
132
+ for use, reproduction, or distribution of Your modifications, or
133
+ for any such Derivative Works as a whole, provided Your use,
134
+ reproduction, and distribution of the Work otherwise complies with
135
+ the conditions stated in this License.
136
+
137
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
138
+ any Contribution intentionally submitted for inclusion in the Work
139
+ by You to the Licensor shall be under the terms and conditions of
140
+ this License, without any additional terms or conditions.
141
+ Notwithstanding the above, nothing herein shall supersede or modify
142
+ the terms of any separate license agreement you may have executed
143
+ with Licensor regarding such Contributions.
144
+
145
+ 6. Trademarks. This License does not grant permission to use the trade
146
+ names, trademarks, service marks, or product names of the Licensor,
147
+ except as required for reasonable and customary use in describing the
148
+ origin of the Work and reproducing the content of the NOTICE file.
149
+
150
+ 7. Disclaimer of Warranty. Unless required by applicable law or
151
+ agreed to in writing, Licensor provides the Work (and each
152
+ Contributor provides its Contributions) on an "AS IS" BASIS,
153
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
154
+ implied, including, without limitation, any warranties or conditions
155
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
156
+ PARTICULAR PURPOSE. You are solely responsible for determining the
157
+ appropriateness of using or redistributing the Work and assume any
158
+ risks associated with Your exercise of permissions under this License.
159
+
160
+ 8. Limitation of Liability. In no event and under no legal theory,
161
+ whether in tort (including negligence), contract, or otherwise,
162
+ unless required by applicable law (such as deliberate and grossly
163
+ negligent acts) or agreed to in writing, shall any Contributor be
164
+ liable to You for damages, including any direct, indirect, special,
165
+ incidental, or consequential damages of any character arising as a
166
+ result of this License or out of the use or inability to use the
167
+ Work (including but not limited to damages for loss of goodwill,
168
+ work stoppage, computer failure or malfunction, or any and all
169
+ other commercial damages or losses), even if such Contributor
170
+ has been advised of the possibility of such damages.
171
+
172
+ 9. Accepting Warranty or Additional Liability. While redistributing
173
+ the Work or Derivative Works thereof, You may choose to offer,
174
+ and charge a fee for, acceptance of support, warranty, indemnity,
175
+ or other liability obligations and/or rights consistent with this
176
+ License. However, in accepting such obligations, You may act only
177
+ on Your own behalf and on Your sole responsibility, not on behalf
178
+ of any other Contributor, and only if You agree to indemnify,
179
+ defend, and hold each Contributor harmless for any liability
180
+ incurred by, or claims asserted against, such Contributor by reason
181
+ of your accepting any such warranty or additional liability.
182
+
183
+ END OF TERMS AND CONDITIONS
184
+
185
+
186
+
187
+ Copyright (c) 2005, Jacques Savoy.
188
+ All rights reserved.
189
+
190
+ Redistribution and use in source and binary forms, with or without
191
+ modification, are permitted provided that the following conditions are met:
192
+
193
+ * Redistributions of source code must retain the above copyright notice, this
194
+ list of conditions and the following disclaimer.
195
+
196
+ * Redistributions in binary form must reproduce the above copyright notice,
197
+ this list of conditions and the following disclaimer in the documentation
198
+ and/or other materials provided with the distribution.
199
+
200
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
201
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
202
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
203
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
204
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
205
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
206
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
207
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
208
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
209
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/NOTICE ADDED
@@ -0,0 +1 @@
1
+ Copyright (c) 2016-2023 The Stdlib Authors.
package/README.md ADDED
@@ -0,0 +1,213 @@
1
+ <!--
2
+
3
+ @license Apache-2.0
4
+
5
+ Copyright (c) 2018 The Stdlib Authors.
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ -->
20
+
21
+
22
+ <details>
23
+ <summary>
24
+ About stdlib...
25
+ </summary>
26
+ <p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
27
+ <p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
28
+ <p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
29
+ <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
30
+ </details>
31
+
32
+ # French Stop Words
33
+
34
+ [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
35
+
36
+ > A list of French [stop words][stopwords].
37
+
38
+ <section class="intro">
39
+
40
+ </section>
41
+
42
+ <!-- /.intro -->
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+ <section class="cli">
53
+
54
+
55
+
56
+ <section class="installation">
57
+
58
+ ## Installation
59
+
60
+ To use as a general utility, install the CLI package globally
61
+
62
+ ```bash
63
+ npm install -g @stdlib/datasets-savoy-stopwords-fr-cli
64
+ ```
65
+
66
+ </section>
67
+
68
+ <!-- CLI usage documentation. -->
69
+
70
+ <section class="usage">
71
+
72
+ ## Usage
73
+
74
+ ```text
75
+ Usage: savoy-stopwords-fr [options]
76
+
77
+ Options:
78
+
79
+ -h, --help Print this message.
80
+ -V, --version Print the package version.
81
+ ```
82
+
83
+ </section>
84
+
85
+ <!-- /.usage -->
86
+
87
+ <section class="examples">
88
+
89
+ ## Examples
90
+
91
+ ```bash
92
+ $ savoy-stopwords-fr
93
+ a
94
+ à
95
+ â
96
+ abord
97
+ ...
98
+ ```
99
+
100
+ </section>
101
+
102
+ <!-- /.examples -->
103
+
104
+ </section>
105
+
106
+ <!-- /.cli -->
107
+
108
+ <section class="references">
109
+
110
+ ## References
111
+
112
+ - Savoy, Jacques. 2005. "IR Multilingual Resources at UniNE." <http://members.unine.ch/jacques.savoy/clef/>.
113
+
114
+ </section>
115
+
116
+ <!-- /.references -->
117
+
118
+ <!-- <license> -->
119
+
120
+ ## License
121
+
122
+ The data files (databases) and their contents are licensed under a [BSD-2-Clause license][bsd-license]. The software is licensed under [Apache License, Version 2.0][apache-license].
123
+
124
+ <!-- </license> -->
125
+
126
+ <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
127
+
128
+ <section class="related">
129
+
130
+ ## See Also
131
+
132
+ - <span class="package-name">[`@stdlib/datasets-savoy-stopwords-fr`][@stdlib/datasets-savoy-stopwords-fr]</span><span class="delimiter">: </span><span class="description">a list of French stop words.</span>
133
+
134
+
135
+ </section>
136
+
137
+ <!-- /.related -->
138
+
139
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
140
+
141
+
142
+ <section class="main-repo" >
143
+
144
+ * * *
145
+
146
+ ## Notice
147
+
148
+ This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
149
+
150
+ For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].
151
+
152
+ ### Community
153
+
154
+ [![Chat][chat-image]][chat-url]
155
+
156
+ ---
157
+
158
+ ## Copyright
159
+
160
+ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
161
+
162
+ </section>
163
+
164
+ <!-- /.stdlib -->
165
+
166
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
167
+
168
+ <section class="links">
169
+
170
+ [npm-image]: http://img.shields.io/npm/v/@stdlib/datasets-savoy-stopwords-fr-cli.svg
171
+ [npm-url]: https://npmjs.org/package/@stdlib/datasets-savoy-stopwords-fr-cli
172
+
173
+ [test-image]: https://github.com/stdlib-js/datasets-savoy-stopwords-fr/actions/workflows/test.yml/badge.svg?branch=v0.1.0
174
+ [test-url]: https://github.com/stdlib-js/datasets-savoy-stopwords-fr/actions/workflows/test.yml?query=branch:v0.1.0
175
+
176
+ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/datasets-savoy-stopwords-fr/main.svg
177
+ [coverage-url]: https://codecov.io/github/stdlib-js/datasets-savoy-stopwords-fr?branch=main
178
+
179
+ <!--
180
+
181
+ [dependencies-image]: https://img.shields.io/david/stdlib-js/datasets-savoy-stopwords-fr.svg
182
+ [dependencies-url]: https://david-dm.org/stdlib-js/datasets-savoy-stopwords-fr/main
183
+
184
+ -->
185
+
186
+ [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
187
+ [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
188
+
189
+ [stdlib]: https://github.com/stdlib-js/stdlib
190
+
191
+ [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
192
+
193
+ [cli-section]: https://github.com/stdlib-js/datasets-savoy-stopwords-fr#cli
194
+ [cli-url]: https://github.com/stdlib-js/datasets-savoy-stopwords-fr/tree/cli
195
+ [@stdlib/datasets-savoy-stopwords-fr]: https://www.npmjs.com/package/@stdlib/datasets-savoy-stopwords-fr
196
+
197
+ [umd]: https://github.com/umdjs/umd
198
+ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
199
+
200
+ [deno-url]: https://github.com/stdlib-js/datasets-savoy-stopwords-fr/tree/deno
201
+ [umd-url]: https://github.com/stdlib-js/datasets-savoy-stopwords-fr/tree/umd
202
+ [esm-url]: https://github.com/stdlib-js/datasets-savoy-stopwords-fr/tree/esm
203
+ [branches-url]: https://github.com/stdlib-js/datasets-savoy-stopwords-fr/blob/main/branches.md
204
+
205
+ [stopwords]: https://en.wikipedia.org/wiki/Stop_words
206
+
207
+ [bsd-license]: https://opensource.org/licenses/bsd-license.html
208
+
209
+ [apache-license]: https://www.apache.org/licenses/LICENSE-2.0
210
+
211
+ </section>
212
+
213
+ <!-- /.links -->
package/bin/cli ADDED
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * @license Apache-2.0
5
+ *
6
+ * Copyright (c) 2018 The Stdlib Authors.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+
21
+ 'use strict';
22
+
23
+ // MODULES //
24
+
25
+ var createReadStream = require( 'fs' ).createReadStream;
26
+ var resolve = require( 'path' ).resolve;
27
+ var readFileSync = require( '@stdlib/fs-read-file' ).sync;
28
+ var stdout = require( '@stdlib/streams-node-stdout' );
29
+ var CLI = require( '@stdlib/cli-ctor' );
30
+
31
+
32
+ // MAIN //
33
+
34
+ /**
35
+ * Main execution sequence.
36
+ *
37
+ * @private
38
+ */
39
+ function main() {
40
+ var flags;
41
+ var fpath;
42
+ var cli;
43
+
44
+ // Create a command-line interface:
45
+ cli = new CLI({
46
+ 'pkg': require( './../package.json' ),
47
+ 'options': require( './../etc/cli_opts.json' ),
48
+ 'help': readFileSync( resolve( __dirname, '..', 'docs', 'usage.txt' ), {
49
+ 'encoding': 'utf8'
50
+ })
51
+ });
52
+
53
+ // Get any provided command-line options:
54
+ flags = cli.flags();
55
+ if ( flags.help || flags.version ) {
56
+ return;
57
+ }
58
+
59
+ // Resolve the data file path:
60
+ fpath = resolve( __dirname, '..', 'data', 'words.txt' );
61
+
62
+ // Print the data to stdout:
63
+ createReadStream( fpath )
64
+ .pipe( stdout )
65
+ .on( 'close', onClose );
66
+
67
+ /**
68
+ * Exits the CLI.
69
+ *
70
+ * @private
71
+ */
72
+ function onClose() {
73
+ cli.close( 0 );
74
+ }
75
+ }
76
+
77
+ main();
package/docs/usage.txt ADDED
@@ -0,0 +1,7 @@
1
+
2
+ Usage: savoy-stopwords-fr [options]
3
+
4
+ Options:
5
+
6
+ -h, --help Print this message.
7
+ -V, --version Print the package version.
@@ -0,0 +1,14 @@
1
+ {
2
+ "boolean": [
3
+ "help",
4
+ "version"
5
+ ],
6
+ "alias": {
7
+ "help": [
8
+ "h"
9
+ ],
10
+ "version": [
11
+ "V"
12
+ ]
13
+ }
14
+ }
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@stdlib/datasets-savoy-stopwords-fr-cli",
3
+ "version": "0.1.0",
4
+ "description": "A list of French stop words.",
5
+ "license": "Apache-2.0",
6
+ "author": {
7
+ "name": "The Stdlib Authors",
8
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
9
+ },
10
+ "contributors": [
11
+ {
12
+ "name": "The Stdlib Authors",
13
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
14
+ }
15
+ ],
16
+ "bin": {
17
+ "savoy-stopwords-fr": "./bin/cli"
18
+ },
19
+ "homepage": "https://stdlib.io",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git://github.com/stdlib-js/datasets-savoy-stopwords-fr.git"
23
+ },
24
+ "bugs": {
25
+ "url": "https://github.com/stdlib-js/stdlib/issues"
26
+ },
27
+ "dependencies": {
28
+ "@stdlib/cli-ctor": "^0.1.0",
29
+ "@stdlib/fs-read-file": "^0.1.0",
30
+ "@stdlib/streams-node-stdout": "^0.1.0"
31
+ },
32
+ "devDependencies": {
33
+ "@stdlib/assert-is-browser": "^0.1.0",
34
+ "@stdlib/assert-is-windows": "^0.1.0",
35
+ "@stdlib/process-exec-path": "^0.1.0",
36
+ "proxyquire": "^2.0.0",
37
+ "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
38
+ "istanbul": "^0.4.1",
39
+ "tap-min": "git+https://github.com/Planeshifter/tap-min.git"
40
+ },
41
+ "keywords": [
42
+ "stdlib",
43
+ "datasets",
44
+ "dataset",
45
+ "data",
46
+ "sample",
47
+ "words",
48
+ "list",
49
+ "stopwords",
50
+ "redundant",
51
+ "lexicon",
52
+ "nlp",
53
+ "language",
54
+ "france",
55
+ "french",
56
+ "fr"
57
+ ],
58
+ "funding": {
59
+ "type": "opencollective",
60
+ "url": "https://opencollective.com/stdlib"
61
+ }
62
+ }
@@ -0,0 +1,168 @@
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2018 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ 'use strict';
20
+
21
+ // MODULES //
22
+
23
+ var resolve = require( 'path' ).resolve;
24
+ var exec = require( 'child_process' ).exec;
25
+ var tape = require( 'tape' );
26
+ var IS_BROWSER = require( '@stdlib/assert-is-browser' );
27
+ var IS_WINDOWS = require( '@stdlib/assert-is-windows' );
28
+ var EXEC_PATH = require( '@stdlib/process-exec-path' );
29
+ var readFileSync = require( '@stdlib/fs-read-file' ).sync;
30
+
31
+
32
+ // VARIABLES //
33
+
34
+ var fpath = resolve( __dirname, '..', 'bin', 'cli' );
35
+ var opts = {
36
+ 'skip': IS_BROWSER || IS_WINDOWS
37
+ };
38
+
39
+
40
+ // FIXTURES //
41
+
42
+ var PKG_VERSION = require( './../package.json' ).version;
43
+
44
+
45
+ // TESTS //
46
+
47
+ tape( 'command-line interface', function test( t ) {
48
+ t.ok( true, __filename );
49
+ t.end();
50
+ });
51
+
52
+ tape( 'when invoked with a `--help` flag, the command-line interface prints the help text to `stderr`', opts, function test( t ) {
53
+ var expected;
54
+ var cmd;
55
+
56
+ expected = readFileSync( resolve( __dirname, '..', 'docs', 'usage.txt' ), {
57
+ 'encoding': 'utf8'
58
+ });
59
+ cmd = [
60
+ EXEC_PATH,
61
+ fpath,
62
+ '--help'
63
+ ];
64
+
65
+ exec( cmd.join( ' ' ), done );
66
+
67
+ function done( error, stdout, stderr ) {
68
+ if ( error ) {
69
+ t.fail( error.message );
70
+ } else {
71
+ t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
72
+ t.strictEqual( stderr.toString(), expected+'\n', 'expected value' );
73
+ }
74
+ t.end();
75
+ }
76
+ });
77
+
78
+ tape( 'when invoked with a `-h` flag, the command-line interface prints the help text to `stderr`', opts, function test( t ) {
79
+ var expected;
80
+ var cmd;
81
+
82
+ expected = readFileSync( resolve( __dirname, '..', 'docs', 'usage.txt' ), {
83
+ 'encoding': 'utf8'
84
+ });
85
+ cmd = [
86
+ EXEC_PATH,
87
+ fpath,
88
+ '-h'
89
+ ];
90
+
91
+ exec( cmd.join( ' ' ), done );
92
+
93
+ function done( error, stdout, stderr ) {
94
+ if ( error ) {
95
+ t.fail( error.message );
96
+ } else {
97
+ t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
98
+ t.strictEqual( stderr.toString(), expected+'\n', 'expected value' );
99
+ }
100
+ t.end();
101
+ }
102
+ });
103
+
104
+ tape( 'when invoked with a `--version` flag, the command-line interface prints the version to `stderr`', opts, function test( t ) {
105
+ var cmd = [
106
+ EXEC_PATH,
107
+ fpath,
108
+ '--version'
109
+ ];
110
+
111
+ exec( cmd.join( ' ' ), done );
112
+
113
+ function done( error, stdout, stderr ) {
114
+ if ( error ) {
115
+ t.fail( error.message );
116
+ } else {
117
+ t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
118
+ t.strictEqual( stderr.toString(), PKG_VERSION+'\n', 'expected value' );
119
+ }
120
+ t.end();
121
+ }
122
+ });
123
+
124
+ tape( 'when invoked with a `-V` flag, the command-line interface prints the version to `stderr`', opts, function test( t ) {
125
+ var cmd = [
126
+ EXEC_PATH,
127
+ fpath,
128
+ '-V'
129
+ ];
130
+
131
+ exec( cmd.join( ' ' ), done );
132
+
133
+ function done( error, stdout, stderr ) {
134
+ if ( error ) {
135
+ t.fail( error.message );
136
+ } else {
137
+ t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
138
+ t.strictEqual( stderr.toString(), PKG_VERSION+'\n', 'expected value' );
139
+ }
140
+ t.end();
141
+ }
142
+ });
143
+
144
+ tape( 'the command-line interface prints the list of words', opts, function test( t ) {
145
+ var expected;
146
+ var cmd;
147
+
148
+ cmd = [
149
+ EXEC_PATH,
150
+ fpath
151
+ ];
152
+
153
+ expected = readFileSync( resolve( __dirname, '..', 'data', 'words.txt' ) );
154
+
155
+ exec( cmd.join( ' ' ), done );
156
+
157
+ function done( error, stdout, stderr ) {
158
+ if ( error ) {
159
+ t.fail( error.message );
160
+ } else {
161
+ stdout = stdout.toString();
162
+ expected = expected.toString();
163
+ t.strictEqual( stdout, expected, 'prints words' );
164
+ t.strictEqual( stderr.toString(), '', 'does not print to `stderr`' );
165
+ }
166
+ t.end();
167
+ }
168
+ });