From 7842495a4d64c7a3bb4339d45d6e64321d002ed8 Mon Sep 17 00:00:00 2001 From: Edouard Grave Date: Mon, 17 Dec 2018 19:09:06 -0800 Subject: [PATCH] Re-licensing fasttext to MIT Summary: Re-licensing fastText to MIT Reviewed By: piotr-bojanowski Differential Revision: D13415080 fbshipit-source-id: 6708849531fe7559cde273a3024660bc8b3b3750 --- .circleci/cmake_test.sh | 5 +-- .circleci/config.yml | 5 +-- .circleci/gcc_test.sh | 5 +-- .circleci/pip_test.sh | 5 +-- .circleci/pull_data.sh | 5 +-- .circleci/python_test.sh | 5 +-- .circleci/run_locally.sh | 5 +-- .circleci/setup_circleimg.sh | 5 +-- .circleci/setup_debian.sh | 5 +-- CMakeLists.txt | 5 +-- CONTRIBUTING.md | 2 +- LICENSE | 43 ++++++++----------- Makefile | 5 +-- PATENTS | 33 -------------- README.md | 2 +- classification-example.sh | 5 +-- classification-results.sh | 7 ++- eval.py | 5 +-- get-wikimedia.sh | 9 ++-- python/README.md | 7 ++- python/README.rst | 5 +-- python/benchmarks/get_word_vector.py | 7 ++- python/doc/examples/FastTextEmbeddingBag.py | 5 +-- python/doc/examples/bin_to_vec.py | 5 +-- python/doc/examples/compute_accuracy.py | 5 +-- python/doc/examples/get_vocab.py | 5 +-- python/doc/examples/train_supervised.py | 5 +-- python/doc/examples/train_unsupervised.py | 5 +-- python/fastText/FastText.py | 5 +-- python/fastText/__init__.py | 5 +-- python/fastText/pybind/fasttext_pybind.cc | 5 +-- python/fastText/tests/__init__.py | 5 +-- python/fastText/tests/test_configurations.py | 5 +-- python/fastText/tests/test_script.py | 5 +-- python/fastText/util/__init__.py | 5 +-- python/fastText/util/util.py | 5 +-- runtests.py | 5 +-- scripts/kbcompletion/data.sh | 25 ++++++----- scripts/kbcompletion/eval.cpp | 5 +-- scripts/kbcompletion/fb15k.sh | 13 +++--- scripts/kbcompletion/fb15k237.sh | 13 +++--- scripts/kbcompletion/svo.sh | 10 ++--- scripts/kbcompletion/wn18.sh | 15 +++---- scripts/quantization/quantization-results.sh | 5 +-- setup.py | 8 ++-- src/args.cc | 5 +-- src/args.h | 5 +-- src/dictionary.cc | 5 +-- src/dictionary.h | 5 +-- src/fasttext.cc | 5 +-- src/fasttext.h | 5 +-- src/main.cc | 5 +-- src/matrix.cc | 5 +-- src/matrix.h | 5 +-- src/meter.cc | 5 +-- src/meter.h | 5 +-- src/model.cc | 5 +-- src/model.h | 5 +-- src/productquantizer.cc | 5 +-- src/productquantizer.h | 5 +-- src/qmatrix.cc | 5 +-- src/qmatrix.h | 5 +-- src/real.h | 5 +-- src/utils.cc | 5 +-- src/utils.h | 5 +-- src/vector.cc | 5 +-- src/vector.h | 5 +-- tests/fetch_test_data.sh | 5 +-- website/core/Footer.js | 17 ++++---- website/pages/en/index.js | 5 +-- website/siteConfig.js | 5 +-- website/static/docs/en/html/fasttext_8h.html | 6 +-- website/static/docs/en/html/model_8h.html | 6 +-- .../docs/en/html/namespacefasttext.html | 16 +++---- word-vector-example.sh | 5 +-- 75 files changed, 207 insertions(+), 317 deletions(-) delete mode 100644 PATENTS diff --git a/.circleci/cmake_test.sh b/.circleci/cmake_test.sh index 30bf40b51..cdf8e4e5d 100755 --- a/.circleci/cmake_test.sh +++ b/.circleci/cmake_test.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # RESULTDIR=result diff --git a/.circleci/config.yml b/.circleci/config.yml index 36513d9ab..a32af9e40 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,9 +5,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # # Maybe one day this will work diff --git a/.circleci/gcc_test.sh b/.circleci/gcc_test.sh index 4a6fb5fc9..688ce4f39 100755 --- a/.circleci/gcc_test.sh +++ b/.circleci/gcc_test.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # RESULTDIR=result diff --git a/.circleci/pip_test.sh b/.circleci/pip_test.sh index 91c3acab6..661109662 100644 --- a/.circleci/pip_test.sh +++ b/.circleci/pip_test.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # sudo pip install --index-url https://test.pypi.org/simple/ fasttext diff --git a/.circleci/pull_data.sh b/.circleci/pull_data.sh index 7d2daf55e..6cc045a25 100755 --- a/.circleci/pull_data.sh +++ b/.circleci/pull_data.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # myshuf() { diff --git a/.circleci/python_test.sh b/.circleci/python_test.sh index 235b509f4..3296082b2 100644 --- a/.circleci/python_test.sh +++ b/.circleci/python_test.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # sudo pip install . diff --git a/.circleci/run_locally.sh b/.circleci/run_locally.sh index 52fc17e50..0ff882de1 100644 --- a/.circleci/run_locally.sh +++ b/.circleci/run_locally.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # # This script illustrates how to run the build tests locally diff --git a/.circleci/setup_circleimg.sh b/.circleci/setup_circleimg.sh index a58436c49..43b97d225 100644 --- a/.circleci/setup_circleimg.sh +++ b/.circleci/setup_circleimg.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # sudo apt-get update diff --git a/.circleci/setup_debian.sh b/.circleci/setup_debian.sh index ab4d77b4a..6fd94a704 100755 --- a/.circleci/setup_debian.sh +++ b/.circleci/setup_debian.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # apt-get update diff --git a/CMakeLists.txt b/CMakeLists.txt index fc94cfc16..af87e2f6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # cmake_minimum_required(VERSION 2.8.9) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 354ff88b0..8dd9c3a8b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,4 +29,4 @@ to do this once to work on any of Facebook's open source projects. Complete your CLA here: ## License -By contributing to fastText, you agree that your contributions will be licensed under its BSD license. +By contributing to fastText, you agree that your contributions will be licensed under its MIT license. diff --git a/LICENSE b/LICENSE index 318ec25e2..5a14f2864 100644 --- a/LICENSE +++ b/LICENSE @@ -1,30 +1,21 @@ -BSD License +MIT License -For fastText software +Copyright (c) 2016-present, Facebook, Inc. -Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile index 3c3e0f0c4..4784970de 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # CXX = c++ diff --git a/PATENTS b/PATENTS deleted file mode 100644 index 2afe4dfab..000000000 --- a/PATENTS +++ /dev/null @@ -1,33 +0,0 @@ -Additional Grant of Patent Rights Version 2 - -"Software" means the fastText software distributed by Facebook, Inc. - -Facebook, Inc. ("Facebook") hereby grants to each recipient of the Software -("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable -(subject to the termination provision below) license under any Necessary -Claims, to make, have made, use, sell, offer to sell, import, and otherwise -transfer the Software. For avoidance of doubt, no license is granted under -Facebook’s rights in any patent claims that are infringed by (i) modifications -to the Software made by you or any third party or (ii) the Software in -combination with any software or other technology. - -The license granted hereunder will terminate, automatically and without notice, -if you (or any of your subsidiaries, corporate affiliates or agents) initiate -directly or indirectly, or take a direct financial interest in, any Patent -Assertion: (i) against Facebook or any of its subsidiaries or corporate -affiliates, (ii) against any party if such Patent Assertion arises in whole or -in part from any software, technology, product or service of Facebook or any of -its subsidiaries or corporate affiliates, or (iii) against any party relating -to the Software. Notwithstanding the foregoing, if Facebook or any of its -subsidiaries or corporate affiliates files a lawsuit alleging patent -infringement against you in the first instance, and you respond by filing a -patent infringement counterclaim in that lawsuit against that party that is -unrelated to the Software, the license granted hereunder will not terminate -under section (i) of this paragraph due to such counterclaim. - -A "Necessary Claim" is a claim of a patent owned by Facebook that is -necessarily infringed by the Software standing alone. - -A "Patent Assertion" is any lawsuit or other action alleging direct, indirect, -or contributory infringement or inducement to infringe any patent, including a -cross-claim or counterclaim. diff --git a/README.md b/README.md index b64509f16..116676e17 100644 --- a/README.md +++ b/README.md @@ -336,4 +336,4 @@ See the CONTRIBUTING file for information about how to help out. ## License -fastText is BSD-licensed. We also provide an additional patent grant. +fastText is MIT-licensed. diff --git a/classification-example.sh b/classification-example.sh index 5615c95a2..7085f7fad 100755 --- a/classification-example.sh +++ b/classification-example.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # myshuf() { diff --git a/classification-results.sh b/classification-results.sh index 4afff1f11..0c945cf68 100755 --- a/classification-results.sh +++ b/classification-results.sh @@ -3,12 +3,11 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # -# This script produces the results from Table 1 in the following paper: +# This script produces the results from Table 1 in the following paper: # Bag of Tricks for Efficient Text Classification, arXiv 1607.01759, 2016 myshuf() { diff --git a/eval.py b/eval.py index 95867711b..3dad9040b 100644 --- a/eval.py +++ b/eval.py @@ -4,9 +4,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # from __future__ import absolute_import diff --git a/get-wikimedia.sh b/get-wikimedia.sh index 3f0f6b4a5..d39a0337f 100755 --- a/get-wikimedia.sh +++ b/get-wikimedia.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # set -e @@ -30,7 +29,7 @@ read -r -p "Choose a language (e.g. en, bh, fr, etc.): " choice LANG="$choice" echo "Chosen language: ""$LANG" read -r -p "Continue to download (WARNING: This might be big and can take a long time!)(y/n)? " choice -case "$choice" in +case "$choice" in y|Y ) echo "Starting download...";; n|N ) echo "Exiting";exit 1;; * ) echo "Invalid answer";exit 1;; @@ -77,4 +76,4 @@ while (<>) { print $_; } } -' | normalize_text | awk '{if (NF>1) print;}' | tr -s " " | shuf > "${ROOT}"/wiki."${LANG}".txt +' | normalize_text | awk '{if (NF>1) print;}' | tr -s " " | shuf > "${ROOT}"/wiki."${LANG}".txt diff --git a/python/README.md b/python/README.md index 244962867..49f855442 100644 --- a/python/README.md +++ b/python/README.md @@ -63,9 +63,8 @@ DESCRIPTION # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # - # This source code is licensed under the BSD-style license found in the - # LICENSE file in the root directory of this source tree. An additional grant - # of patent rights can be found in the PATENTS file in the same directory. + # This source code is licensed under the MIT license found in the + # LICENSE file in the root directory of this source tree. FUNCTIONS load_model(path) @@ -78,7 +77,7 @@ FUNCTIONS ## IMPORTANT: Preprocessing data / enconding conventions -In general it is important to properly preprocess your data. In particular our example scripts in the [root folder](https://github.com/facebookresearch/fastText) do this. +In general it is important to properly preprocess your data. In particular our example scripts in the [root folder](https://github.com/facebookresearch/fastText) do this. fastText assumes UTF-8 encoded text. All text must be [unicode for Python2](https://docs.python.org/2/library/functions.html#unicode) and [str for Python3](https://docs.python.org/3.5/library/stdtypes.html#textseq). The passed text will be [encoded as UTF-8 by pybind11](https://pybind11.readthedocs.io/en/master/advanced/cast/strings.html?highlight=utf-8#strings-bytes-and-unicode-conversions) before passed to the fastText C++ library. This means it is important to use UTF-8 encoded text when building a model. On Unix-like systems you can convert text using [iconv](https://en.wikipedia.org/wiki/Iconv). diff --git a/python/README.rst b/python/README.rst index 26ec5e4c9..813c5225f 100644 --- a/python/README.rst +++ b/python/README.rst @@ -70,9 +70,8 @@ For example # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # - # This source code is licensed under the BSD-style license found in the - # LICENSE file in the root directory of this source tree. An additional grant - # of patent rights can be found in the PATENTS file in the same directory. + # This source code is licensed under the MIT license found in the + # LICENSE file in the root directory of this source tree. FUNCTIONS load_model(path) diff --git a/python/benchmarks/get_word_vector.py b/python/benchmarks/get_word_vector.py index 7f2ab3cec..b733436e2 100644 --- a/python/benchmarks/get_word_vector.py +++ b/python/benchmarks/get_word_vector.py @@ -1,9 +1,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division @@ -33,7 +32,7 @@ def get_word_vector(data, model): t3 = time.time() i = 0 for t in tokens: - vec = f.get_word_vector(t) + f.get_word_vector(t) i += 1 if i % 10000 == 0: sys.stderr.write("\ri: " + str(float(i / len(tokens)))) diff --git a/python/doc/examples/FastTextEmbeddingBag.py b/python/doc/examples/FastTextEmbeddingBag.py index 0f5c5bad2..c163a8e18 100644 --- a/python/doc/examples/FastTextEmbeddingBag.py +++ b/python/doc/examples/FastTextEmbeddingBag.py @@ -3,9 +3,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # NOTE: This requires PyTorch! We do not provide installation scripts to install PyTorch. # It is up to you to install this dependency if you want to execute this example. diff --git a/python/doc/examples/bin_to_vec.py b/python/doc/examples/bin_to_vec.py index 008e08761..2da6af5be 100644 --- a/python/doc/examples/bin_to_vec.py +++ b/python/doc/examples/bin_to_vec.py @@ -3,9 +3,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/doc/examples/compute_accuracy.py b/python/doc/examples/compute_accuracy.py index 7735b63af..2ecf2e831 100644 --- a/python/doc/examples/compute_accuracy.py +++ b/python/doc/examples/compute_accuracy.py @@ -3,9 +3,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/doc/examples/get_vocab.py b/python/doc/examples/get_vocab.py index 5b19f3758..6a907e0d5 100644 --- a/python/doc/examples/get_vocab.py +++ b/python/doc/examples/get_vocab.py @@ -3,9 +3,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/doc/examples/train_supervised.py b/python/doc/examples/train_supervised.py index 601c8e365..effae958d 100644 --- a/python/doc/examples/train_supervised.py +++ b/python/doc/examples/train_supervised.py @@ -3,9 +3,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/doc/examples/train_unsupervised.py b/python/doc/examples/train_unsupervised.py index 419ecb8c0..5db07afae 100644 --- a/python/doc/examples/train_unsupervised.py +++ b/python/doc/examples/train_unsupervised.py @@ -3,9 +3,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/fastText/FastText.py b/python/fastText/FastText.py index 2abd8345c..97fde7edb 100644 --- a/python/fastText/FastText.py +++ b/python/fastText/FastText.py @@ -1,9 +1,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/fastText/__init__.py b/python/fastText/__init__.py index 30ba80bbe..d045028e3 100644 --- a/python/fastText/__init__.py +++ b/python/fastText/__init__.py @@ -1,9 +1,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/fastText/pybind/fasttext_pybind.cc b/python/fastText/pybind/fasttext_pybind.cc index a458febbb..f1a6df916 100644 --- a/python/fastText/pybind/fasttext_pybind.cc +++ b/python/fastText/pybind/fasttext_pybind.cc @@ -2,9 +2,8 @@ * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include diff --git a/python/fastText/tests/__init__.py b/python/fastText/tests/__init__.py index 3d2167662..ff6443122 100644 --- a/python/fastText/tests/__init__.py +++ b/python/fastText/tests/__init__.py @@ -1,9 +1,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/fastText/tests/test_configurations.py b/python/fastText/tests/test_configurations.py index 7b7ec4d46..73f8eadfc 100644 --- a/python/fastText/tests/test_configurations.py +++ b/python/fastText/tests/test_configurations.py @@ -1,9 +1,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/fastText/tests/test_script.py b/python/fastText/tests/test_script.py index 1ebc44ff3..6b00d5ab8 100644 --- a/python/fastText/tests/test_script.py +++ b/python/fastText/tests/test_script.py @@ -1,9 +1,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/fastText/util/__init__.py b/python/fastText/util/__init__.py index 5116e5f2e..6f8453855 100644 --- a/python/fastText/util/__init__.py +++ b/python/fastText/util/__init__.py @@ -1,9 +1,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division diff --git a/python/fastText/util/util.py b/python/fastText/util/util.py index a633949f7..9daa91085 100644 --- a/python/fastText/util/util.py +++ b/python/fastText/util/util.py @@ -1,9 +1,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # NOTE: The purpose of this file is not to accumulate all useful utility # functions. This file should contain very commonly used and requested functions diff --git a/runtests.py b/runtests.py index a0154cdab..679d88d65 100644 --- a/runtests.py +++ b/runtests.py @@ -4,9 +4,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # # To run the integration tests you must first fetch all the required test data. diff --git a/scripts/kbcompletion/data.sh b/scripts/kbcompletion/data.sh index ac1e9a38a..61aeff929 100755 --- a/scripts/kbcompletion/data.sh +++ b/scripts/kbcompletion/data.sh @@ -3,9 +3,8 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # set -e DATADIR=data/ @@ -21,10 +20,10 @@ echo "preparing WN18" wget -P . https://github.com/mana-ysh/knowledge-graph-embeddings/raw/master/dat/wordnet-mlj12.tar.gz tar -xzvf wordnet-mlj12.tar.gz DIR=wordnet-mlj12 -for f in `ls ${DIR}/wordnet-ml*.txt` -do +for f in ${DIR}/wordnet-ml*.txt; +do fn=${DIR}/ft_$(basename $f) - awk '{print "__label__"$1,"0_"$2, $3;print $1,"1_"$2," __label__"$3}' < ${f} > ${fn}; + awk '{print "__label__"$1,"0_"$2, $3;print $1,"1_"$2," __label__"$3}' < ${f} > ${fn}; done cat ${DIR}/ft_* > ${DIR}/ft_wordnet-mlj12-full.txt cat ${DIR}/ft_*train.txt ${DIR}/ft_*valid.txt > ${DIR}/ft_wordnet-mlj12-valid+train.txt @@ -35,11 +34,11 @@ echo "preparing FB15K" wget https://github.com/mana-ysh/knowledge-graph-embeddings/raw/master/dat/fb15k.tgz tar -xzvf fb15k.tgz DIR=FB15k/ -for f in `ls ${DIR}/freebase*.txt` -do +for f in ${DIR}/freebase*.txt; +do fn=${DIR}/ft_$(basename $f) echo $f " --> " $fn - awk '{print "__label__"$1,"0_"$2, $3;print $1,"1_"$2," __label__"$3}' < ${f} > ${fn}; + awk '{print "__label__"$1,"0_"$2, $3;print $1,"1_"$2," __label__"$3}' < ${f} > ${fn}; done cat ${DIR}/ft_* > ${DIR}/ft_freebase_mtr100_mte100-full.txt cat ${DIR}/ft_*train.txt ${DIR}/ft_*valid.txt > ${DIR}/ft_freebase_mtr100_mte100-valid+train.txt @@ -52,7 +51,7 @@ for f in train.txt test.txt valid.txt do fn=${DIR}/ft_$(basename $f) echo $f " --> " $fn - awk -F "\t" '{print "__label__"$1,"0_"$2, $3;print $1,"1_"$2," __label__"$3}' < ${DIR}/${f} > ${fn}; + awk -F "\t" '{print "__label__"$1,"0_"$2, $3;print $1,"1_"$2," __label__"$3}' < ${DIR}/${f} > ${fn}; done cat ${DIR}/ft_*.txt > ${DIR}/ft_full.txt cat ${DIR}/ft_train.txt ${DIR}/ft_valid.txt > ${DIR}/ft_valid+train.txt @@ -62,9 +61,9 @@ wget . https://everest.hds.utc.fr/lib/exe/fetch.php?media=en:svo-tensor-dataset. mv fetch.php?media=en:svo-tensor-dataset.tar.gz svo-tensor-dataset.tar.gz tar -xzvf svo-tensor-dataset.tar.gz DIR=SVO-tensor-dataset -for f in `ls ${DIR}/svo_data*.dat` -do +for f in ${DIR}/svo_data*.dat; +do fn=${DIR}/ft_$(basename $f) - awk '{print "0_"$1,"1_"$3,"__label__"$2;}' < ${f} > ${fn}; + awk '{print "0_"$1,"1_"$3,"__label__"$2;}' < ${f} > ${fn}; done cat ${DIR}/ft_*train*.dat ${DIR}/ft_*valid*.dat > ${DIR}/ft_svo_data-valid+train.dat diff --git a/scripts/kbcompletion/eval.cpp b/scripts/kbcompletion/eval.cpp index dd280e659..4ecfd6fce 100644 --- a/scripts/kbcompletion/eval.cpp +++ b/scripts/kbcompletion/eval.cpp @@ -2,9 +2,8 @@ * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include diff --git a/scripts/kbcompletion/fb15k.sh b/scripts/kbcompletion/fb15k.sh index 7b56fcc15..4c1edc776 100755 --- a/scripts/kbcompletion/fb15k.sh +++ b/scripts/kbcompletion/fb15k.sh @@ -3,9 +3,8 @@ # copyright (c) 2017-present, facebook, inc. # all rights reserved. # -# this source code is licensed under the bsd-style license found in the -# license file in the root directory of this source tree. an additional grant -# of patent rights can be found in the patents file in the same directory. +# this source code is licensed under the MIT license found in the +# license file in the root directory of this source tree. # # script for FB15k DIR=data/FB15k/ @@ -14,14 +13,14 @@ FASTTEXTDIR=../../ # compile pushd $FASTTEXTDIR make opt -popd +popd ft=${FASTTEXTDIR}/fasttext g++ -std=c++0x eval.cpp -o eval - + ## Train model and test it on validation: -dim=100 -epoch=100 +dim=100 +epoch=100 neg=100 model=data/fb15 pred=data/fbpred diff --git a/scripts/kbcompletion/fb15k237.sh b/scripts/kbcompletion/fb15k237.sh index 436eb460e..e06f24a33 100755 --- a/scripts/kbcompletion/fb15k237.sh +++ b/scripts/kbcompletion/fb15k237.sh @@ -3,9 +3,8 @@ # copyright (c) 2017-present, facebook, inc. # all rights reserved. # -# this source code is licensed under the bsd-style license found in the -# license file in the root directory of this source tree. an additional grant -# of patent rights can be found in the patents file in the same directory. +# this source code is licensed under the MIT license found in the +# license file in the root directory of this source tree. # # script for FB15k237 DIR=data/Release/ @@ -15,17 +14,17 @@ FASTTEXTDIR=../../ pushd $FASTTEXTDIR make opt -popd +popd ft=${FASTTEXTDIR}/fasttext g++ -std=c++0x eval.cpp -o eval - + ## Train model and test it on validation: pred=data/fb237pred model=data/fb15k237 -dim=50 -epoch=10 +dim=50 +epoch=10 neg=500 echo "---- train ----" diff --git a/scripts/kbcompletion/svo.sh b/scripts/kbcompletion/svo.sh index 2ebb060bc..61e4636ef 100755 --- a/scripts/kbcompletion/svo.sh +++ b/scripts/kbcompletion/svo.sh @@ -3,9 +3,8 @@ # copyright (c) 2017-present, facebook, inc. # all rights reserved. # -# this source code is licensed under the bsd-style license found in the -# license file in the root directory of this source tree. an additional grant -# of patent rights can be found in the patents file in the same directory. +# this source code is licensed under the MIT license found in the +# license file in the root directory of this source tree. # # script for SVO DIR=data/SVO-tensor-dataset @@ -14,12 +13,12 @@ FASTTEXTDIR=../../ # compile pushd $FASTTEXTDIR make opt -popd +popd ft=${FASTTEXTDIR}/fasttext ## Train model and test it on validation: -dim=200 +dim=200 epoch=3 model=svo @@ -37,4 +36,3 @@ time $ft supervised -input ${DIR}/ft_svo_data-valid+train.dat \ echo "computing raw hit@5%..." $ft test ${model}.bin ${DIR}/ft_svo_data_test_250000.dat 227 2> /dev/null | awk '{if(NR==3) print "raw hit@5%="$2}' - diff --git a/scripts/kbcompletion/wn18.sh b/scripts/kbcompletion/wn18.sh index de18a8625..fac7bb660 100755 --- a/scripts/kbcompletion/wn18.sh +++ b/scripts/kbcompletion/wn18.sh @@ -3,9 +3,8 @@ # copyright (c) 2017-present, facebook, inc. # all rights reserved. # -# this source code is licensed under the bsd-style license found in the -# license file in the root directory of this source tree. an additional grant -# of patent rights can be found in the patents file in the same directory. +# this source code is licensed under the MIT license found in the +# license file in the root directory of this source tree. # # script for WN11 DIR=data/wordnet-mlj12/ @@ -15,21 +14,21 @@ FASTTEXTDIR=../../ pushd $FASTTEXTDIR make opt -popd +popd ft=${FASTTEXTDIR}/fasttext g++ -std=c++0x eval.cpp -o eval # Train model and test it: -dim=100 -epoch=100 +dim=100 +epoch=100 neg=500 model=data/wn pred=data/wnpred echo "---- train ----" $ft supervised -input ${DIR}/ft_wordnet-mlj12-train.txt \ - -dim $dim -epoch $epoch -output ${model} -lr .2 -thread 20 -loss ns -neg $neg + -dim $dim -epoch $epoch -output ${model} -lr .2 -thread 20 -loss ns -neg $neg echo "computing raw hits@10..." $ft test ${model}.bin ${DIR}/ft_wordnet-mlj12-test.txt 10 2> /dev/null | awk '{if(NR==3) print "raw hit@10 = "$2}' @@ -40,7 +39,7 @@ $ft predict ${model}.bin ${DIR}/ft_wordnet-mlj12-test.txt 20000 > $pred echo "---- train+val ----" $ft supervised -input ${DIR}/ft_wordnet-mlj12-valid+train.txt \ - -dim $dim -epoch $epoch -output ${model} -lr .2 -thread 20 -loss ns -neg $neg + -dim $dim -epoch $epoch -output ${model} -lr .2 -thread 20 -loss ns -neg $neg echo "computing raw hits@10..." $ft test ${model}.bin ${DIR}/ft_wordnet-mlj12-test.txt 10 2> /dev/null | awk '{if(NR==3) print "raw hit@10 = "$2}' diff --git a/scripts/quantization/quantization-results.sh b/scripts/quantization/quantization-results.sh index ab157a2aa..980491897 100644 --- a/scripts/quantization/quantization-results.sh +++ b/scripts/quantization/quantization-results.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # # This script applies quantization to the models from Table 1 in: diff --git a/setup.py b/setup.py index 3978ba7d9..fdd97eb55 100644 --- a/setup.py +++ b/setup.py @@ -3,9 +3,9 @@ # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. +# from __future__ import absolute_import from __future__ import division @@ -170,7 +170,7 @@ def _get_readme(): long_description=_get_readme(), ext_modules=ext_modules, url='https://github.com/facebookresearch/fastText', - license='BSD', + license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', diff --git a/src/args.cc b/src/args.cc index 3d6d5edae..cc1af1b17 100644 --- a/src/args.cc +++ b/src/args.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "args.h" diff --git a/src/args.h b/src/args.h index dd27d16ce..55e1b037e 100644 --- a/src/args.h +++ b/src/args.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/dictionary.cc b/src/dictionary.cc index 6f2e2125e..cb396cd14 100644 --- a/src/dictionary.cc +++ b/src/dictionary.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "dictionary.h" diff --git a/src/dictionary.h b/src/dictionary.h index ebc7cda3a..aa57989c4 100644 --- a/src/dictionary.h +++ b/src/dictionary.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/fasttext.cc b/src/fasttext.cc index 68eaf5276..a1f574ba2 100644 --- a/src/fasttext.cc +++ b/src/fasttext.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "fasttext.h" diff --git a/src/fasttext.h b/src/fasttext.h index a8ee5790f..bcfe87f58 100644 --- a/src/fasttext.h +++ b/src/fasttext.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/main.cc b/src/main.cc index 46a3c2887..615b9bd83 100644 --- a/src/main.cc +++ b/src/main.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include diff --git a/src/matrix.cc b/src/matrix.cc index ade39f9ac..bf1c4cd07 100644 --- a/src/matrix.cc +++ b/src/matrix.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "matrix.h" diff --git a/src/matrix.h b/src/matrix.h index 440e82e64..42924a095 100644 --- a/src/matrix.h +++ b/src/matrix.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/meter.cc b/src/meter.cc index 633ada5d1..6560b3722 100644 --- a/src/meter.cc +++ b/src/meter.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "meter.h" diff --git a/src/meter.h b/src/meter.h index cec61970f..9eea82f3b 100644 --- a/src/meter.h +++ b/src/meter.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/model.cc b/src/model.cc index 40fed6aac..7ccfbf162 100644 --- a/src/model.cc +++ b/src/model.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "model.h" diff --git a/src/model.h b/src/model.h index b31be92c8..e477f5305 100644 --- a/src/model.h +++ b/src/model.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/productquantizer.cc b/src/productquantizer.cc index d358c0411..4e213fac6 100644 --- a/src/productquantizer.cc +++ b/src/productquantizer.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "productquantizer.h" diff --git a/src/productquantizer.h b/src/productquantizer.h index ea622c7c0..501818503 100644 --- a/src/productquantizer.h +++ b/src/productquantizer.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/qmatrix.cc b/src/qmatrix.cc index 777d17020..ba86962a7 100644 --- a/src/qmatrix.cc +++ b/src/qmatrix.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "qmatrix.h" diff --git a/src/qmatrix.h b/src/qmatrix.h index a634f00a1..a74c22521 100644 --- a/src/qmatrix.h +++ b/src/qmatrix.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/real.h b/src/real.h index a1aa86c5d..181fe7cab 100644 --- a/src/real.h +++ b/src/real.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/utils.cc b/src/utils.cc index 30c64fcce..459cc2589 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "utils.h" diff --git a/src/utils.h b/src/utils.h index 1a772cd6b..331706c90 100644 --- a/src/utils.h +++ b/src/utils.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/src/vector.cc b/src/vector.cc index d148fdc0f..0aac73119 100644 --- a/src/vector.cc +++ b/src/vector.cc @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #include "vector.h" diff --git a/src/vector.h b/src/vector.h index e056a0c08..b15efc74b 100644 --- a/src/vector.h +++ b/src/vector.h @@ -2,9 +2,8 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ #pragma once diff --git a/tests/fetch_test_data.sh b/tests/fetch_test_data.sh index 900421a36..e4d938eaf 100755 --- a/tests/fetch_test_data.sh +++ b/tests/fetch_test_data.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # DATADIR=${DATADIR:-data} diff --git a/website/core/Footer.js b/website/core/Footer.js index c03512f23..6f6619af5 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -2,9 +2,8 @@ * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ const React = require("react"); @@ -89,12 +88,12 @@ class Footer extends React.Component { > Stack Overflow - - Google Group - + + Google Group +
More
diff --git a/website/pages/en/index.js b/website/pages/en/index.js index d11798039..9275d448d 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -2,9 +2,8 @@ * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ const React = require("react"); diff --git a/website/siteConfig.js b/website/siteConfig.js index 5e675c7bf..b1f720f37 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -2,9 +2,8 @@ * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ /* List of projects/orgs using your project for the users page */ diff --git a/website/static/docs/en/html/fasttext_8h.html b/website/static/docs/en/html/fasttext_8h.html index c9612067d..5d8908987 100644 --- a/website/static/docs/en/html/fasttext_8h.html +++ b/website/static/docs/en/html/fasttext_8h.html @@ -59,7 +59,7 @@
-
@@ -76,7 +76,7 @@
-
@@ -149,7 +149,7 @@

Copyright (c) 2016-present, Facebook, Inc. All rights reserved.

-

This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory.

+

This source code is licensed under the MIT-style license found in the LICENSE file in the root directory of this source tree.

diff --git a/website/static/docs/en/html/model_8h.html b/website/static/docs/en/html/model_8h.html index 44b48f46c..9078a8257 100644 --- a/website/static/docs/en/html/model_8h.html +++ b/website/static/docs/en/html/model_8h.html @@ -59,7 +59,7 @@ -
@@ -76,7 +76,7 @@
-
@@ -164,7 +164,7 @@

Copyright (c) 2016-present, Facebook, Inc. All rights reserved.

-

This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory.

+

This source code is licensed under the MIT-style license found in the LICENSE file in the root directory of this source tree.

diff --git a/website/static/docs/en/html/namespacefasttext.html b/website/static/docs/en/html/namespacefasttext.html index 1c3e9b944..241513ef0 100644 --- a/website/static/docs/en/html/namespacefasttext.html +++ b/website/static/docs/en/html/namespacefasttext.html @@ -59,7 +59,7 @@ -
@@ -76,7 +76,7 @@
-
@@ -130,17 +130,17 @@ - - - @@ -154,7 +154,7 @@

Enumerations

enum  model_name : int { model_name::cbow =1, -model_name::sg, +
enum  model_name : int { model_name::cbow =1, +model_name::sg, model_name::sup }
 
enum  loss_name : int { loss_name::hs =1, -loss_name::ns, +
enum  loss_name : int { loss_name::hs =1, +loss_name::ns, loss_name::softmax }
 
enum  entry_type : int8_t { entry_type::word =0, +
enum  entry_type : int8_t { entry_type::word =0, entry_type::label =1 }
 

Detailed Description

Copyright (c) 2016-present, Facebook, Inc. All rights reserved.

-

This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory.

+

This source code is licensed under the MIT-style license found in the LICENSE file in the root directory of this source tree.

Typedef Documentation

◆ id_type

diff --git a/word-vector-example.sh b/word-vector-example.sh index 85f0de4d9..4a450d090 100755 --- a/word-vector-example.sh +++ b/word-vector-example.sh @@ -3,9 +3,8 @@ # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # RESULTDIR=result