We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build Addons for Windows
Splitting this as a separate issue from #77. MacOS should be an achievable goal prior to the 0.3 release. Windows will take a bit longer.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 # ==============================================================================
15 """TensorFlow Addons.
16 
17 TensorFlow Addons is a repository of contributions that conform to well-
18 established API patterns, but implement new functionality not available
19 in core TensorFlow. TensorFlow natively supports a large number of
20 operators, layers, metrics, losses, and optimizers. However, in a fast
21 moving field like ML, there are many interesting new developments that
22 cannot be integrated into core TensorFlow (because their broad
23 applicability is not yet clear, or it is mostly used by a smaller subset
24 of the community).
25 """
26 
27 from __future__ import absolute_import
28 from __future__ import division
29 from __future__ import print_function
30 
31 import os
32 import sys
33 
34 from datetime import datetime
35 from setuptools import find_packages
36 from setuptools import setup
37 from setuptools.dist import Distribution
38 from setuptools import Extension
39 
40 DOCLINES = __doc__.split('\n')
41 
42 TFA_NIGHTLY = 'tfa-nightly'
43 TFA_RELEASE = 'tensorflow-addons'
44 
45 if '--nightly' in sys.argv:
46     project_name = TFA_NIGHTLY
47     nightly_idx = sys.argv.index('--nightly')
48     sys.argv.pop(nightly_idx)
49 else:
50     project_name = TFA_RELEASE
51 
52 # Version
53 version = {}
54 base_dir = os.path.dirname(os.path.abspath(__file__))
55 with open(os.path.join(base_dir, "tensorflow_addons", "version.py")) as fp:
56     # yapf: disable
57     exec(fp.read(), version)
58     # yapf: enable
59 
60 if project_name == TFA_NIGHTLY:
61     version['__version__'] += datetime.strftime(datetime.today(), "%Y%m%d")
62 
63 # Dependencies
64 REQUIRED_PACKAGES = [
65     'six >= 1.10.0',
66 ]
67 
68 if project_name == TFA_RELEASE:
69     REQUIRED_PACKAGES.append('tensorflow >= 2.1.0rc1')
70 elif project_name == TFA_NIGHTLY:
71     REQUIRED_PACKAGES.append('tf-nightly')
72 
73 
74 class BinaryDistribution(Distribution):
75     """This class is needed in order to create OS specific wheels."""
76 
77     def has_ext_modules(self):
78         return True
79 
80 
81 setup(
82     name=project_name,
83     version=version['__version__'],
84     description=DOCLINES[0],
85     long_description='\n'.join(DOCLINES[2:]),
86     author='Google Inc.',
87     author_email='opensource@google.com',
88     packages=find_packages(),
89     ext_modules=[Extension('_foo', ['stub.cc'])],
90     install_requires=REQUIRED_PACKAGES,
91     include_package_data=True,
92     zip_safe=False,
93     distclass=BinaryDistribution,
94     classifiers=[
95         'Development Status :: 4 - Beta',
96         'Intended Audience :: Developers',
97         'Intended Audience :: Education',
98         'Intended Audience :: Science/Research',
99         'License :: OSI Approved :: Apache Software License',
100         'Programming Language :: Python :: 2.7',
101         'Programming Language :: Python :: 3.5',
102         'Programming Language :: Python :: 3.6',
103         'Programming Language :: Python :: 3.7',
104         'Topic :: Scientific/Engineering :: Mathematics',
105         'Topic :: Software Development :: Libraries :: Python Modules',
106         'Topic :: Software Development :: Libraries',
107     ],
108     license='Apache 2.0',
109     keywords='tensorflow addons machine learning',
110 )
111
```

Path: `tensorflow_addons/text/__init__.py`
Content:
```
1 # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 # ==============================================================================
15 """Additional text-processing ops."""
16 from __future__ import absolute_import
17 from __future__ import division
18 from __future__ import print_function
19 
20 # Conditional Random Field
21 from tensorflow_addons.text.crf import crf_binary_score
22 from tensorflow_addons.text.crf import crf_decode
23 from tensorflow_addons.text.crf import crf_decode_backward
24 from tensorflow_addons.text.crf import crf_decode_forward
25 from tensorflow_addons.text.crf import crf_forward
26 from tensorflow_addons.text.crf import crf_log_likelihood
27 from tensorflow_addons.text.crf import crf_log_norm
28 from tensorflow_addons.text.crf import crf_multitag_sequence_score
29 from tensorflow_addons.text.crf import crf_sequence_score
30 from tensorflow_addons.text.crf import crf_unary_score
31 from tensorflow_addons.text.crf import viterbi_decode
32 
33 # Skip Gram Sampling
34 from tensorflow_addons.text.skip_gram_ops import skip_gram_sample
35 from tensorflow_addons.text.skip_gram_ops import skip_gram_sample_with_text_vocab
36 
37 # Parse Time
38 from tensorflow_addons.text.parse_time_op import parse_time
39
```

Path: `tensorflow_addons/utils/resource_loader.py`
Content:
```
1 # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 # ==============================================================================
15 """Utilities similar to tf.python.platform.resource_loader."""
16 from __future__ import absolute_import
17 from __future__ import division
18 from __future__ import print_function
19 
20 import os
21 
22 
23 def get_project_root():
24     """Returns project root folder."""
25     return os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
26 
27 
28 def get_path_to_datafile(path):
29     """Get the path to the specified file in the data dependencies.
30 
31     The path is relative to tensorflow_addons/
32 
33     Args:
34       path: a string resource path relative to tensorflow_addons/
35     Returns:
36       The path to the specified data file
37     """
38     root_dir = get_project_root()
39     return os.path.join(root_dir, path)
40
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -70,6 +70,12 @@
 elif project_name == TFA_NIGHTLY:
     REQUIRED_PACKAGES.append('tf-nightly')
 
+# Manylinux2010 requires a patch for platlib
+if sys.platform.startswith('linux'):
+    ext_modules = [Extension('_foo', ['stub.cc'])]
+else:
+    ext_modules = []
+
 
 class BinaryDistribution(Distribution):
     """This class is needed in order to create OS specific wheels."""
@@ -86,7 +92,7 @@
     author='Google Inc.',
     author_email='opensource@google.com',
     packages=find_packages(),
-    ext_modules=[Extension('_foo', ['stub.cc'])],
+    ext_modules=ext_modules,
     install_requires=REQUIRED_PACKAGES,
     include_package_data=True,
     zip_safe=False,
diff --git a/tensorflow_addons/text/__init__.py b/tensorflow_addons/text/__init__.py
--- a/tensorflow_addons/text/__init__.py
+++ b/tensorflow_addons/text/__init__.py
@@ -35,4 +35,8 @@
 from tensorflow_addons.text.skip_gram_ops import skip_gram_sample_with_text_vocab
 
 # Parse Time
-from tensorflow_addons.text.parse_time_op import parse_time
+
+# Temporarily disable for windwos
+import os
+if os.name != 'nt':
+    from tensorflow_addons.text.parse_time_op import parse_time
diff --git a/tensorflow_addons/utils/resource_loader.py b/tensorflow_addons/utils/resource_loader.py
--- a/tensorflow_addons/utils/resource_loader.py
+++ b/tensorflow_addons/utils/resource_loader.py
@@ -36,4 +36,4 @@
       The path to the specified data file
     """
     root_dir = get_project_root()
-    return os.path.join(root_dir, path)
+    return os.path.join(root_dir, path.replace("/", os.sep))

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -70,6 +70,12 @@\n elif project_name == TFA_NIGHTLY:\n     REQUIRED_PACKAGES.append('tf-nightly')\n \n+# Manylinux2010 requires a patch for platlib\n+if sys.platform.startswith('linux'):\n+    ext_modules = [Extension('_foo', ['stub.cc'])]\n+else:\n+    ext_modules = []\n+\n \n class BinaryDistribution(Distribution):\n     \"\"\"This class is needed in order to create OS specific wheels.\"\"\"\n@@ -86,7 +92,7 @@\n     author='Google Inc.',\n     author_email='opensource@google.com',\n     packages=find_packages(),\n-    ext_modules=[Extension('_foo', ['stub.cc'])],\n+    ext_modules=ext_modules,\n     install_requires=REQUIRED_PACKAGES,\n     include_package_data=True,\n     zip_safe=False,\ndiff --git a/tensorflow_addons/text/__init__.py b/tensorflow_addons/text/__init__.py\n--- a/tensorflow_addons/text/__init__.py\n+++ b/tensorflow_addons/text/__init__.py\n@@ -35,4 +35,8 @@\n from tensorflow_addons.text.skip_gram_ops import skip_gram_sample_with_text_vocab\n \n # Parse Time\n-from tensorflow_addons.text.parse_time_op import parse_time\n+\n+# Temporarily disable for windwos\n+import os\n+if os.name != 'nt':\n+    from tensorflow_addons.text.parse_time_op import parse_time\ndiff --git a/tensorflow_addons/utils/resource_loader.py b/tensorflow_addons/utils/resource_loader.py\n--- a/tensorflow_addons/utils/resource_loader.py\n+++ b/tensorflow_addons/utils/resource_loader.py\n@@ -36,4 +36,4 @@\n       The path to the specified data file\n     \"\"\"\n     root_dir = get_project_root()\n-    return os.path.join(root_dir, path)\n+    return os.path.join(root_dir, path.replace(\"/\", os.sep))\n", "issue": "Build Addons for Windows\nSplitting this as a separate issue from #77. MacOS should be an achievable goal prior to the 0.3 release. Windows will take a bit longer.\n", "before_files": [{"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"TensorFlow Addons.\n\nTensorFlow Addons is a repository of contributions that conform to well-\nestablished API patterns, but implement new functionality not available\nin core TensorFlow. TensorFlow natively supports a large number of\noperators, layers, metrics, losses, and optimizers. However, in a fast\nmoving field like ML, there are many interesting new developments that\ncannot be integrated into core TensorFlow (because their broad\napplicability is not yet clear, or it is mostly used by a smaller subset\nof the community).\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nfrom datetime import datetime\nfrom setuptools import find_packages\nfrom setuptools import setup\nfrom setuptools.dist import Distribution\nfrom setuptools import Extension\n\nDOCLINES = __doc__.split('\\n')\n\nTFA_NIGHTLY = 'tfa-nightly'\nTFA_RELEASE = 'tensorflow-addons'\n\nif '--nightly' in sys.argv:\n    project_name = TFA_NIGHTLY\n    nightly_idx = sys.argv.index('--nightly')\n    sys.argv.pop(nightly_idx)\nelse:\n    project_name = TFA_RELEASE\n\n# Version\nversion = {}\nbase_dir = os.path.dirname(os.path.abspath(__file__))\nwith open(os.path.join(base_dir, \"tensorflow_addons\", \"version.py\")) as fp:\n    # yapf: disable\n    exec(fp.read(), version)\n    # yapf: enable\n\nif project_name == TFA_NIGHTLY:\n    version['__version__'] += datetime.strftime(datetime.today(), \"%Y%m%d\")\n\n# Dependencies\nREQUIRED_PACKAGES = [\n    'six >= 1.10.0',\n]\n\nif project_name == TFA_RELEASE:\n    REQUIRED_PACKAGES.append('tensorflow >= 2.1.0rc1')\nelif project_name == TFA_NIGHTLY:\n    REQUIRED_PACKAGES.append('tf-nightly')\n\n\nclass BinaryDistribution(Distribution):\n    \"\"\"This class is needed in order to create OS specific wheels.\"\"\"\n\n    def has_ext_modules(self):\n        return True\n\n\nsetup(\n    name=project_name,\n    version=version['__version__'],\n    description=DOCLINES[0],\n    long_description='\\n'.join(DOCLINES[2:]),\n    author='Google Inc.',\n    author_email='opensource@google.com',\n    packages=find_packages(),\n    ext_modules=[Extension('_foo', ['stub.cc'])],\n    install_requires=REQUIRED_PACKAGES,\n    include_package_data=True,\n    zip_safe=False,\n    distclass=BinaryDistribution,\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Topic :: Scientific/Engineering :: Mathematics',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: Software Development :: Libraries',\n    ],\n    license='Apache 2.0',\n    keywords='tensorflow addons machine learning',\n)\n", "path": "setup.py"}, {"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Additional text-processing ops.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n# Conditional Random Field\nfrom tensorflow_addons.text.crf import crf_binary_score\nfrom tensorflow_addons.text.crf import crf_decode\nfrom tensorflow_addons.text.crf import crf_decode_backward\nfrom tensorflow_addons.text.crf import crf_decode_forward\nfrom tensorflow_addons.text.crf import crf_forward\nfrom tensorflow_addons.text.crf import crf_log_likelihood\nfrom tensorflow_addons.text.crf import crf_log_norm\nfrom tensorflow_addons.text.crf import crf_multitag_sequence_score\nfrom tensorflow_addons.text.crf import crf_sequence_score\nfrom tensorflow_addons.text.crf import crf_unary_score\nfrom tensorflow_addons.text.crf import viterbi_decode\n\n# Skip Gram Sampling\nfrom tensorflow_addons.text.skip_gram_ops import skip_gram_sample\nfrom tensorflow_addons.text.skip_gram_ops import skip_gram_sample_with_text_vocab\n\n# Parse Time\nfrom tensorflow_addons.text.parse_time_op import parse_time\n", "path": "tensorflow_addons/text/__init__.py"}, {"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Utilities similar to tf.python.platform.resource_loader.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\n\n\ndef get_project_root():\n    \"\"\"Returns project root folder.\"\"\"\n    return os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\ndef get_path_to_datafile(path):\n    \"\"\"Get the path to the specified file in the data dependencies.\n\n    The path is relative to tensorflow_addons/\n\n    Args:\n      path: a string resource path relative to tensorflow_addons/\n    Returns:\n      The path to the specified data file\n    \"\"\"\n    root_dir = get_project_root()\n    return os.path.join(root_dir, path)\n", "path": "tensorflow_addons/utils/resource_loader.py"}], "after_files": [{"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"TensorFlow Addons.\n\nTensorFlow Addons is a repository of contributions that conform to well-\nestablished API patterns, but implement new functionality not available\nin core TensorFlow. TensorFlow natively supports a large number of\noperators, layers, metrics, losses, and optimizers. However, in a fast\nmoving field like ML, there are many interesting new developments that\ncannot be integrated into core TensorFlow (because their broad\napplicability is not yet clear, or it is mostly used by a smaller subset\nof the community).\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nfrom datetime import datetime\nfrom setuptools import find_packages\nfrom setuptools import setup\nfrom setuptools.dist import Distribution\nfrom setuptools import Extension\n\nDOCLINES = __doc__.split('\\n')\n\nTFA_NIGHTLY = 'tfa-nightly'\nTFA_RELEASE = 'tensorflow-addons'\n\nif '--nightly' in sys.argv:\n    project_name = TFA_NIGHTLY\n    nightly_idx = sys.argv.index('--nightly')\n    sys.argv.pop(nightly_idx)\nelse:\n    project_name = TFA_RELEASE\n\n# Version\nversion = {}\nbase_dir = os.path.dirname(os.path.abspath(__file__))\nwith open(os.path.join(base_dir, \"tensorflow_addons\", \"version.py\")) as fp:\n    # yapf: disable\n    exec(fp.read(), version)\n    # yapf: enable\n\nif project_name == TFA_NIGHTLY:\n    version['__version__'] += datetime.strftime(datetime.today(), \"%Y%m%d\")\n\n# Dependencies\nREQUIRED_PACKAGES = [\n    'six >= 1.10.0',\n]\n\nif project_name == TFA_RELEASE:\n    REQUIRED_PACKAGES.append('tensorflow >= 2.1.0rc1')\nelif project_name == TFA_NIGHTLY:\n    REQUIRED_PACKAGES.append('tf-nightly')\n\n# Manylinux2010 requires a patch for platlib\nif sys.platform.startswith('linux'):\n    ext_modules = [Extension('_foo', ['stub.cc'])]\nelse:\n    ext_modules = []\n\n\nclass BinaryDistribution(Distribution):\n    \"\"\"This class is needed in order to create OS specific wheels.\"\"\"\n\n    def has_ext_modules(self):\n        return True\n\n\nsetup(\n    name=project_name,\n    version=version['__version__'],\n    description=DOCLINES[0],\n    long_description='\\n'.join(DOCLINES[2:]),\n    author='Google Inc.',\n    author_email='opensource@google.com',\n    packages=find_packages(),\n    ext_modules=ext_modules,\n    install_requires=REQUIRED_PACKAGES,\n    include_package_data=True,\n    zip_safe=False,\n    distclass=BinaryDistribution,\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Topic :: Scientific/Engineering :: Mathematics',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: Software Development :: Libraries',\n    ],\n    license='Apache 2.0',\n    keywords='tensorflow addons machine learning',\n)\n", "path": "setup.py"}, {"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Additional text-processing ops.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n# Conditional Random Field\nfrom tensorflow_addons.text.crf import crf_binary_score\nfrom tensorflow_addons.text.crf import crf_decode\nfrom tensorflow_addons.text.crf import crf_decode_backward\nfrom tensorflow_addons.text.crf import crf_decode_forward\nfrom tensorflow_addons.text.crf import crf_forward\nfrom tensorflow_addons.text.crf import crf_log_likelihood\nfrom tensorflow_addons.text.crf import crf_log_norm\nfrom tensorflow_addons.text.crf import crf_multitag_sequence_score\nfrom tensorflow_addons.text.crf import crf_sequence_score\nfrom tensorflow_addons.text.crf import crf_unary_score\nfrom tensorflow_addons.text.crf import viterbi_decode\n\n# Skip Gram Sampling\nfrom tensorflow_addons.text.skip_gram_ops import skip_gram_sample\nfrom tensorflow_addons.text.skip_gram_ops import skip_gram_sample_with_text_vocab\n\n# Parse Time\n\n# Temporarily disable for windwos\nimport os\nif os.name != 'nt':\n    from tensorflow_addons.text.parse_time_op import parse_time\n", "path": "tensorflow_addons/text/__init__.py"}, {"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Utilities similar to tf.python.platform.resource_loader.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\n\n\ndef get_project_root():\n    \"\"\"Returns project root folder.\"\"\"\n    return os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\ndef get_path_to_datafile(path):\n    \"\"\"Get the path to the specified file in the data dependencies.\n\n    The path is relative to tensorflow_addons/\n\n    Args:\n      path: a string resource path relative to tensorflow_addons/\n    Returns:\n      The path to the specified data file\n    \"\"\"\n    root_dir = get_project_root()\n    return os.path.join(root_dir, path.replace(\"/\", os.sep))\n", "path": "tensorflow_addons/utils/resource_loader.py"}]}