Skip to content

Commit

Permalink
[RELEASE] The John Snow Labs Library 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
C-K-Loan committed Oct 6, 2022
1 parent 58510ec commit bb523d4
Show file tree
Hide file tree
Showing 64 changed files with 6,404 additions and 1 deletion.
332 changes: 332 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,332 @@
.idea
build
dist
nlu.egg-info
.sass-cache
personal_notes.md
/tests/nlu_hc_tests/secrets.py
/tests/nlu_hc_tests/spark_nlp_for_healthcare.json
tmp
# Created by https://www.gitignore.io/api/sbt,java,scala,python,eclipse,intellij,intellij+all

### Eclipse ###

.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
PubMed*
*cache_pretrained*
*.crc
*.sst
_SUCCESS*
*stages*
*auxdata*
# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet

### Eclipse Patch ###
# Eclipse Core
.project

# JDT-specific (Eclipse Java Development Tools)
.classpath

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

*.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/sonarlint

### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:

# Sensitive or high-churn files:

# Gradle:

# CMake

# Mongo Explorer plugin:

## File-based project format:

## Plugin-specific files:

# IntelliJ

# mpeltonen/sbt-idea plugin

# JIRA plugin

# Cursive Clojure plugin

# Crashlytics plugin (for Android Studio and IntelliJ)

### Intellij+all Patch ###
# Ignores the whole idea jsl_folder
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360

.idea/

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
python/lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

### SBT ###
# Simple Build Tool
# http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control

dist/*
lib_managed/
src_managed/
project/boot/
project/plugins/project/
.history
.lib/

### Scala ###

# End of https://www.gitignore.io/api/sbt,java,scala,python,eclipse,intellij,intellij+all

### Local ###
tmp_pipeline/
tmp_symspell/
test-output-tmp/
spark-warehouse/
/python/python.iml
test_crf_pipeline/
test_*_pipeline/
*metastore_db*
python/src/
python/tensorflow/bert/models/**
**/.DS_Store
**/tmp_*
docs/_site/**
docs/.sass-cache/**

tst_shortcut_sd/
src/*/resources/*.classes
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# johnsnowlabs
John Snow Labs NLP Library
The John Snow Labs Library gives you access to all of John Snow Labs Enterprise And Open Source products in an easy and simple manner. Access 10000+ state-of-the-art NLP and OCR models for '
'Finance, Legal and Medical domains. Easily scalable to Spark Cluster.
See https://www.johnsnowlabs.com/ and [the docs](https://nlu.johnsnowlabs.com/docs/en/install) for more detials
17 changes: 17 additions & 0 deletions johnsnowlabs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from .auto_install.health_checks.report import check_health, list_remote_licenses, list_local_licenses
from .utils.sparksession_utils import start
from .auto_install.install_flow import install
# get helpers into global space
from johnsnowlabs import medical, nlp, ocr, settings, viz, finance, legal
import johnsnowlabs as jsl

# databricks
from johnsnowlabs.auto_install.databricks.work_utils import run_in_databricks
from johnsnowlabs.nlp import *


def new_version_online():
from .utils.pip_utils import get_latest_lib_version_on_pypi
# we are outdated, if current version does not match the latest on PypPi
from .auto_install.softwares import Software
return settings.raw_version_jsl_lib != get_latest_lib_version_on_pypi(Software.jsl_lib.pypi_name)
Empty file.
19 changes: 19 additions & 0 deletions johnsnowlabs/abstract_base/base_enum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from enum import Enum, EnumMeta


class MetaEnum(EnumMeta):

def __contains__(cls, item):
try:
cls(item)
except ValueError:
return False
return True

def from_name(cls, name):
return cls._member_map_[name]


class BaseEnum(Enum, metaclass=MetaEnum):
# Enums extending this will support `in` keyword for values of enums
pass
Loading

0 comments on commit bb523d4

Please sign in to comment.