瀏覽代碼

Re-licensing fasttext to MIT

Summary: Re-licensing fastText to MIT

Reviewed By: piotr-bojanowski

Differential Revision: D13415080

fbshipit-source-id: 6708849531fe7559cde273a3024660bc8b3b3750
Edouard Grave 7 年之前
父節點
當前提交
7842495a4d
共有 75 個文件被更改,包括 207 次插入317 次删除
  1. 2 3
      .circleci/cmake_test.sh
  2. 2 3
      .circleci/config.yml
  3. 2 3
      .circleci/gcc_test.sh
  4. 2 3
      .circleci/pip_test.sh
  5. 2 3
      .circleci/pull_data.sh
  6. 2 3
      .circleci/python_test.sh
  7. 2 3
      .circleci/run_locally.sh
  8. 2 3
      .circleci/setup_circleimg.sh
  9. 2 3
      .circleci/setup_debian.sh
  10. 2 3
      CMakeLists.txt
  11. 1 1
      CONTRIBUTING.md
  12. 17 26
      LICENSE
  13. 2 3
      Makefile
  14. 0 33
      PATENTS
  15. 1 1
      README.md
  16. 2 3
      classification-example.sh
  17. 3 4
      classification-results.sh
  18. 2 3
      eval.py
  19. 4 5
      get-wikimedia.sh
  20. 3 4
      python/README.md
  21. 2 3
      python/README.rst
  22. 3 4
      python/benchmarks/get_word_vector.py
  23. 2 3
      python/doc/examples/FastTextEmbeddingBag.py
  24. 2 3
      python/doc/examples/bin_to_vec.py
  25. 2 3
      python/doc/examples/compute_accuracy.py
  26. 2 3
      python/doc/examples/get_vocab.py
  27. 2 3
      python/doc/examples/train_supervised.py
  28. 2 3
      python/doc/examples/train_unsupervised.py
  29. 2 3
      python/fastText/FastText.py
  30. 2 3
      python/fastText/__init__.py
  31. 2 3
      python/fastText/pybind/fasttext_pybind.cc
  32. 2 3
      python/fastText/tests/__init__.py
  33. 2 3
      python/fastText/tests/test_configurations.py
  34. 2 3
      python/fastText/tests/test_script.py
  35. 2 3
      python/fastText/util/__init__.py
  36. 2 3
      python/fastText/util/util.py
  37. 2 3
      runtests.py
  38. 12 13
      scripts/kbcompletion/data.sh
  39. 2 3
      scripts/kbcompletion/eval.cpp
  40. 6 7
      scripts/kbcompletion/fb15k.sh
  41. 6 7
      scripts/kbcompletion/fb15k237.sh
  42. 4 6
      scripts/kbcompletion/svo.sh
  43. 7 8
      scripts/kbcompletion/wn18.sh
  44. 2 3
      scripts/quantization/quantization-results.sh
  45. 4 4
      setup.py
  46. 2 3
      src/args.cc
  47. 2 3
      src/args.h
  48. 2 3
      src/dictionary.cc
  49. 2 3
      src/dictionary.h
  50. 2 3
      src/fasttext.cc
  51. 2 3
      src/fasttext.h
  52. 2 3
      src/main.cc
  53. 2 3
      src/matrix.cc
  54. 2 3
      src/matrix.h
  55. 2 3
      src/meter.cc
  56. 2 3
      src/meter.h
  57. 2 3
      src/model.cc
  58. 2 3
      src/model.h
  59. 2 3
      src/productquantizer.cc
  60. 2 3
      src/productquantizer.h
  61. 2 3
      src/qmatrix.cc
  62. 2 3
      src/qmatrix.h
  63. 2 3
      src/real.h
  64. 2 3
      src/utils.cc
  65. 2 3
      src/utils.h
  66. 2 3
      src/vector.cc
  67. 2 3
      src/vector.h
  68. 2 3
      tests/fetch_test_data.sh
  69. 8 9
      website/core/Footer.js
  70. 2 3
      website/pages/en/index.js
  71. 2 3
      website/siteConfig.js
  72. 3 3
      website/static/docs/en/html/fasttext_8h.html
  73. 3 3
      website/static/docs/en/html/model_8h.html
  74. 8 8
      website/static/docs/en/html/namespacefasttext.html
  75. 2 3
      word-vector-example.sh

+ 2 - 3
.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

+ 2 - 3
.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

+ 2 - 3
.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

+ 2 - 3
.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

+ 2 - 3
.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() {

+ 2 - 3
.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 .

+ 2 - 3
.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

+ 2 - 3
.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

+ 2 - 3
.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

+ 2 - 3
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)

+ 1 - 1
CONTRIBUTING.md

@@ -29,4 +29,4 @@ to do this once to work on any of Facebook's open source projects.
 Complete your CLA here: <https://code.facebook.com/cla>
 
 ## 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.

+ 17 - 26
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.

+ 2 - 3
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++

+ 0 - 33
PATENTS

@@ -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.

+ 1 - 1
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.

+ 2 - 3
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() {

+ 3 - 4
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() {

+ 2 - 3
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

+ 4 - 5
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

+ 3 - 4
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).
 

+ 2 - 3
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)

+ 3 - 4
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))))

+ 2 - 3
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.

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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 <args.h>

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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.

+ 12 - 13
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

+ 2 - 3
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 <unordered_map>

+ 6 - 7
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

+ 6 - 7
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 ----"

+ 4 - 6
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}'
-

+ 7 - 8
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}'

+ 2 - 3
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:

+ 4 - 4
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 @@ setup(
     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',

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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 <iomanip>

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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"

+ 2 - 3
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

+ 2 - 3
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}

+ 8 - 9
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
             </a>
-            <a 
-	      href="https://groups.google.com/forum/#!forum/fasttext-library" 
-	      target="_blank"
-	    >
-	      Google Group
-	    </a>
+            <a
+              href="https://groups.google.com/forum/#!forum/fasttext-library"
+              target="_blank"
+            >
+              Google Group
+           </a>
           </div>
           <div>
             <h5>More</h5>

+ 2 - 3
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");

+ 2 - 3
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 */

+ 3 - 3
website/static/docs/en/html/fasttext_8h.html

@@ -59,7 +59,7 @@ $(function() {
       <div id="nav-sync" class="sync"></div>
     </div>
   </div>
-  <div id="splitbar" style="-moz-user-select:none;" 
+  <div id="splitbar" style="-moz-user-select:none;"
        class="ui-resizable-handle">
   </div>
 </div>
@@ -76,7 +76,7 @@ $(document).ready(function(){initNavTree('fasttext_8h.html','');});
 
 <!-- iframe showing the search results (closed by default) -->
 <div id="MSearchResultsWindow">
-<iframe src="javascript:void(0)" frameborder="0" 
+<iframe src="javascript:void(0)" frameborder="0"
         name="MSearchResults" id="MSearchResults">
 </iframe>
 </div>
@@ -149,7 +149,7 @@ Macros</h2></td></tr>
       </table>
 </div><div class="memdoc">
 <p>Copyright (c) 2016-present, Facebook, Inc. All rights reserved.</p>
-<p>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. </p>
+<p>This source code is licensed under the MIT-style license found in the LICENSE file in the root directory of this source tree. </p>
 
 </div>
 </div>

+ 3 - 3
website/static/docs/en/html/model_8h.html

@@ -59,7 +59,7 @@ $(function() {
       <div id="nav-sync" class="sync"></div>
     </div>
   </div>
-  <div id="splitbar" style="-moz-user-select:none;" 
+  <div id="splitbar" style="-moz-user-select:none;"
        class="ui-resizable-handle">
   </div>
 </div>
@@ -76,7 +76,7 @@ $(document).ready(function(){initNavTree('model_8h.html','');});
 
 <!-- iframe showing the search results (closed by default) -->
 <div id="MSearchResultsWindow">
-<iframe src="javascript:void(0)" frameborder="0" 
+<iframe src="javascript:void(0)" frameborder="0"
         name="MSearchResults" id="MSearchResults">
 </iframe>
 </div>
@@ -164,7 +164,7 @@ Macros</h2></td></tr>
       </table>
 </div><div class="memdoc">
 <p>Copyright (c) 2016-present, Facebook, Inc. All rights reserved.</p>
-<p>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. </p>
+<p>This source code is licensed under the MIT-style license found in the LICENSE file in the root directory of this source tree. </p>
 
 </div>
 </div>

+ 8 - 8
website/static/docs/en/html/namespacefasttext.html

@@ -59,7 +59,7 @@ $(function() {
       <div id="nav-sync" class="sync"></div>
     </div>
   </div>
-  <div id="splitbar" style="-moz-user-select:none;" 
+  <div id="splitbar" style="-moz-user-select:none;"
        class="ui-resizable-handle">
   </div>
 </div>
@@ -76,7 +76,7 @@ $(document).ready(function(){initNavTree('namespacefasttext.html','');});
 
 <!-- iframe showing the search results (closed by default) -->
 <div id="MSearchResultsWindow">
-<iframe src="javascript:void(0)" frameborder="0" 
+<iframe src="javascript:void(0)" frameborder="0"
         name="MSearchResults" id="MSearchResults">
 </iframe>
 </div>
@@ -130,17 +130,17 @@ Typedefs</h2></td></tr>
 </table><table class="memberdecls">
 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
 Enumerations</h2></td></tr>
-<tr class="memitem:a349df214746a2ea0e5d7c26326b03d6f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacefasttext.html#a349df214746a2ea0e5d7c26326b03d6f">model_name</a> : int { <a class="el" href="namespacefasttext.html#a349df214746a2ea0e5d7c26326b03d6fae4709295b2cc44d67facf32b1099f1af">model_name::cbow</a> =1, 
-<a class="el" href="namespacefasttext.html#a349df214746a2ea0e5d7c26326b03d6fa5dae429688af1c521ad87ac394192c6d">model_name::sg</a>, 
+<tr class="memitem:a349df214746a2ea0e5d7c26326b03d6f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacefasttext.html#a349df214746a2ea0e5d7c26326b03d6f">model_name</a> : int { <a class="el" href="namespacefasttext.html#a349df214746a2ea0e5d7c26326b03d6fae4709295b2cc44d67facf32b1099f1af">model_name::cbow</a> =1,
+<a class="el" href="namespacefasttext.html#a349df214746a2ea0e5d7c26326b03d6fa5dae429688af1c521ad87ac394192c6d">model_name::sg</a>,
 <a class="el" href="namespacefasttext.html#a349df214746a2ea0e5d7c26326b03d6fa2eeecd72c567401e6988624b179d0b14">model_name::sup</a>
  }</td></tr>
 <tr class="separator:a349df214746a2ea0e5d7c26326b03d6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a1ba04862fd670674501ccacc936e1952"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacefasttext.html#a1ba04862fd670674501ccacc936e1952">loss_name</a> : int { <a class="el" href="namespacefasttext.html#a1ba04862fd670674501ccacc936e1952a789406d01073ca1782d86293dcfc0764">loss_name::hs</a> =1, 
-<a class="el" href="namespacefasttext.html#a1ba04862fd670674501ccacc936e1952af01a37d157918910f2035b2af81ea4e1">loss_name::ns</a>, 
+<tr class="memitem:a1ba04862fd670674501ccacc936e1952"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacefasttext.html#a1ba04862fd670674501ccacc936e1952">loss_name</a> : int { <a class="el" href="namespacefasttext.html#a1ba04862fd670674501ccacc936e1952a789406d01073ca1782d86293dcfc0764">loss_name::hs</a> =1,
+<a class="el" href="namespacefasttext.html#a1ba04862fd670674501ccacc936e1952af01a37d157918910f2035b2af81ea4e1">loss_name::ns</a>,
 <a class="el" href="namespacefasttext.html#a1ba04862fd670674501ccacc936e1952ace2f1fbd249d24aabc07ac4488ab5b8c">loss_name::softmax</a>
  }</td></tr>
 <tr class="separator:a1ba04862fd670674501ccacc936e1952"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a532eedeee97e8d66a96b519d165f4eb7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacefasttext.html#a532eedeee97e8d66a96b519d165f4eb7">entry_type</a> : int8_t { <a class="el" href="namespacefasttext.html#a532eedeee97e8d66a96b519d165f4eb7ac47d187067c6cf953245f128b5fde62a">entry_type::word</a> =0, 
+<tr class="memitem:a532eedeee97e8d66a96b519d165f4eb7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacefasttext.html#a532eedeee97e8d66a96b519d165f4eb7">entry_type</a> : int8_t { <a class="el" href="namespacefasttext.html#a532eedeee97e8d66a96b519d165f4eb7ac47d187067c6cf953245f128b5fde62a">entry_type::word</a> =0,
 <a class="el" href="namespacefasttext.html#a532eedeee97e8d66a96b519d165f4eb7ad304ba20e96d87411588eeabac850e34">entry_type::label</a> =1
  }</td></tr>
 <tr class="separator:a532eedeee97e8d66a96b519d165f4eb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -154,7 +154,7 @@ Functions</h2></td></tr>
 </table>
 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
 <div class="textblock"><p>Copyright (c) 2016-present, Facebook, Inc. All rights reserved.</p>
-<p>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. </p>
+<p>This source code is licensed under the MIT-style license found in the LICENSE file in the root directory of this source tree. </p>
 </div><h2 class="groupheader">Typedef Documentation</h2>
 <a id="a6778f74ca8c360ba917216cb7fcbf497"></a>
 <h2 class="memtitle"><span class="permalink"><a href="#a6778f74ca8c360ba917216cb7fcbf497">&#9670;&nbsp;</a></span>id_type</h2>

+ 2 - 3
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