Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 36 million developers.Sign up
We are excited about the Spark NLP workshop (spark-nlp-workshop repository) being so useful for many users.
Now we also made a step forward by moving the website's documentation to an easy to maintain Jekyll template with Markdown. Spark NLP library received key bug fixes
on this release. Thanks to the community for reporting issues on GitHub. Much more to come, as always.
- Fixed DependencyParser and TypedDependencyParser working inaccurately
- Fixed a bug preventing a load of WordEmbeddingsModel class from python
- Fixed wrong pre-trained model names preventing some pre-trained models to work properly
- Fixed BertEmbeddings not being capable of loading from file due to a reader exception
- Website documentation migrated to GitHub wiki page (WIP)
- OcrHelper now reports failed file name when throwing exceptions (Thanks @kgeis)
- Fixed Annotation function explodeAnnotations to consider replacing output column scenarios
- Fixed TRAVIS CI unit tests
Short after 2.0.2, a hotfix release was made to address two bugs that prevented users from using pretrained tensorflow models in clusters.
Please read release notes for 2.0.2 to catch up!
- Fixed logger serializable, causing issues in executors to serialize TensorflowWrapper
- Fixed contrib loading in cluster, when retrieving a Tensorflow session
Thank you for joining us in this exciting Spark NLP year!. We continue to make progress towards a better performing library, both in speed and in accuracy.
This release focuses strongly in the quality and stability of the library, making sure it works well in most cluster environments
and improving the compatibility across systems. Word Embeddings continue to be improved for better performance and lower memory blueprint.
Context Spell Checker continues to receive enhancements in concurrency and usage of spark. Finally, tensorflow based annotators
have been significantly improved by refactoring the serialization design. Help us with feedback and we'll welcome any issue reports!
- NerCrf annotator has now includeConfidence param that includes confidence scores for predictions in metadata
- Cluster mode performance improved in tensorflow annotators by serializing to bytes internal information
- Doc2Chunk annotator added new params startCol, startColByTokenIndex, failOnMissing and lowerCase allows better chunking of documents
- All annotations that derive from sentence or chunk types now contain metadata information referring to the sentence or chunk ID they belong to
- ContextSpellChecker now creates a window around the token to improve computation performance
- Improved WordEmbeddings matching accuracy by trying alternative case sensitive tokens
- WordEmbeddings won't load twice if already loaded
- WordEmbeddings can use embeddingsRef if source was not provided, improving reutilization of embeddings in a pipeline
- WordEmbeddings new param includeEmbeddings allow annotators not to save entire embeddings source along them
- Contrib tensorflow dependencies now only load if necessary
- Added missing Symmetric delete pretrained model
- Fixed a broken param name in Normalizer (thanks @RobertSassen)
- Fixed Cloudera cluster support
- Fixed concurrent access in ContextSpellChecker in high partition number use cases and LightPipelines
- Fixed POS dataset creator to better handle corrupted pairs
- Fixed a bug in Word Embeddings not matching exact case sensitive tokens in some scenarios
- Fixed OCR Tess4J initialization problems in concurrent scenarios
Models and Pipelines
- Renaming of models and pipelines (work in progress)
- Better output column naming in pipelines
- Unified more WordEmbeddings interface with dimension params and individual setters
- Improved unit tests for better compatibility on Windows
- Python embeddings moved to sparknlp.embeddings
This release is meant to push downstream a few improvements from 2.0.x to the 1.8.x branch, mostly with the objective of keeping the stable branch line stable, and solving a few serious issues that were pending. This makes 1.8.4 an ideal version for stable deployments.
- CHUNK type annotators now match content within sentence bounds, improves accuracy
- Improved CHUNK type annotators to include sentence index information in metadata. May be used to improve matching accuracy.
- Doc2Chunk annotator now has new params to failOnMissing, lowerCase match or startCol is token indexed
- SentenceDetector and DeepSentenceDetector now disabled maxLength by default, also works appropriately to split in whitespaces
- SentenceDetector include in metadata they sentence id
Thanks for following up after our 2.0.0 release!. This release covers a few holes left by the immense 2.0.0 release,
to address high priority issues found after release. More importantly, the library should now behave correctly when using
Spark cluster modes, and memory and CPU utilization should be reduced to normal levels after some serious profiling of Serialization
revealed a bunch of problems. Aside from performance and resource management improvements, we include an OCR dependency handler in start() function as well
as improve the support of GPU for NER Deep Learning models. Finally, check out our spark-nlp-workshop repo, it has cool features!
- Improved serialization of Deep Learning models, shows performance boosts of up to 2.5 times over 1.8.3
- Tensorflow contrib libraries now managed correctly across a cluster
- Reverted useFeatureBroadcasting after internal benchmarks proved it was performing better
- SparkNLP.start() and sparknlp.start() now accept an includeOCR parameter which allows to automatically include OCR library
- Recreated NerDL Graphs to allow GPU allow_growth in tensorflow to improve memory management with GPU
- Expanded GPU coverage in NerDL graph
- Reduced NerDL Batch Size for better compatibility with GPUs
- Fixed deep learning models not working across cluster due a bug in inputBuffers from graph reading
- Fixed a bug in POS() training function which did not work correctly from Python
- Fixed a bug in OCR where page number and intersection was not correctly matched
- Correctly handle exceptions when training Norvig and Symmetric Spell Checkers from dataframes
- ContextSpellChecker now follows Features API correctly
- spark-nlp-workshop repository has been expanded with better documentation and new notebooks
- we are still catching up with 2.x release!
Thank you for following up with the biggest changelog ever on Spark NLP: Spark NLP 2.0.0! Where to begin?
We have no less than 50 Pull Requests merged this time. Most importantly, we become the first library to have a production
ready implementation of BERT embeddings. Along with this interesting deep learning and context based embeddings algorithm, here is a quick overview of new things:
- Word Embeddings as well as Bert Embeddings are now annotators, just like any other component in the library. This means, embeddings can be
cached on memory through DataFrames, can be saved on disk and shared as part of pipelines!
- We revamped and enhanced Named Entity Recognition (NER) Deep Learning models to a new state of the art level, reaching up to 93% F1 micro-averaged accuracy in the industry standard.
- We upgraded tensorflow version and also started using contrib LSTM Cells.
- Performance and memory usage improvements also tag along by improving serialization throughput of Deep Learning annotators by receiving feedback from Apache Spark contributor Davies Liu.
- Revamping and expanding our pretrained pipelines list, plus the addition of new pretrained models for different languages together with
tons of new example notebooks, which include changes that aim the library to be easier to use. API overall was modified towards helping new comers get started.
- OCR module comes with a handful of improvements that increase accuracy.
All of this comes together with a full range of bug fixes and annotator improvements, follow up the details below!
Bear with us since documentation is still catching up a little bit behind, as well as new models to be made available. Stay tuned on Slack!
- BertEmbeddings annotator, with four google ready models ready to be used through Spark NLP as part of your pipelines, includes Wordpiece tokenization.
- WordEmbeddings, our previous embeddings system is now an Annotator to be serialized along Spark ML pipelines
- Created training helper functions that create spark datasets from files, such as CoNLL and POS tagging
- NER DL has been revamped by using contrib LSTM Cells. Added library handling for different OS.
- OCR improved handling of images by adding binarizing of buffered segments
- OCR now allows automatic adaptive scaling
- SentenceDetector params merged between DL and Rule based annotators
- SentenceDetector max length has been disabled by default, and now truncates by whitespace
- Part of Speech, NER, Spell Checking and Vivekn Sentiment Analysis annotators now train from dataset passed to fit() using Spark in the process
- Tokens and Chunks now hold metadata information regarding which sentence they belong to by sentence ID
- AnnotatorApproach annotators now allow a param trainingCols allowing them to use different inputs in training and in prediction. Improves Pipeline versatility.
- LightPipelines now allow method transform() to call against a DataFrame
- Noticeable performance gains by improving serialization performance in annotators through removal of transient variables
- Spark NLP in 30 seconds now provides a function SparkNLP.start() and sparknlp.start() (python) that automatically creates a local Spark session.
- Improved DateMatcher accuracy
- Improved Normalizer annotator by supporting and tokenizing a slang dictionary, with case sensitivity matching option
- ContextSpellChecker now is capable of handling multiple sentences in a row
- PretrainedPipeline feature now allows handling John Snow Labs remote pretrained pipelines to make it easy to update and access new models
- Symmetric Delete spell checking model improved training performance
Models and Pipelines
- Added more than 15 pretrained pipelines that cover a huge range of use cases. To be documented
- Improved multi language support by adding french and italian pipelines and models. More to come!
- Dependency Parser annotators now include a pretrained english model based on CoNLL-U 2009
- Fixed python classname reference when deserializing pipelines
- Fixed serialization in ContextSpellChecker
- Fixed a bug in LightPipeline causing not to include output from embedded pipelines in a PipelineModel
- Fixed DateMatcher wrong param name not allowing to access it properly
- Fixed a bug where DateMatcher didn't know how to handle dash in dates where year had two digits instead of four
- Fixed a ContextSpellChecker bug that prevented it from being used repeatedly with collections in LightPipeline
- Fixed a bug in OCR that made it blow up with some image formats when using text preferred method
- Fixed a bug on OCR which made params not to work in cluster mode
- Fixed OCR setSplitPages and setSplitRegions to work properly if tesseract detected multiple regions
- AnnotatorType params renamed to inputAnnotatorTypes and outputAnnotatorTypes
- Embeddings now serialize along a FloatArray in Annotation class
- Disabled useFeatureBroadcasting, showed better performance number when training large models in annotators that use Features
- OCR must be instantiated
- OCR works best with 4.0.0-beta.1
Build and release
- Added GPU build with tensorflow-gpu to Maven coordinates
- Removed .jar file from pip package
We're glad to announce a new release for Spark NLP. This one calls the attention of the community who contributed
immensely towards reporting bugs and feedback to the library. This release focuses in various bugfixes around DeepSentenceDetector
and also python deserialization of some specific pipelines. It also improves the DeepSentenceDetector allowing further fine-tuning
and customization. Then, we have embeddings that are being cached in the models folder, and further improvements towards accessing
them through S3 storage. Finally, we have made serious improvements in noteoboks and documentation around the library.
Special thanks to @Tshimanga and @haimco10 for very interesting contributions. See you on Slack!
- Improved OCR performance in skew detection
- SentenceDetector now better handles single quote protections (Thanks @haimco10)
- DeepSentenceDetector now can explodeSentences (Thanks @Tshimanga from Deep6.ai)
- EmbeddingsHelper now is capable of caching downloaded embeddings to avoid re-downloading
- Application.conf file may now be read from an s3 location
- DeepSentenceDetector has now access to all pragmatic SentenceDetector params in order to fine-tune it
- Fixed ambiguous classpath resolution in pyspark, causing errors in deserializing some models
- Fixed DeepSentenceDetector not being deserializable in PySpark
- Fixed Chunk2Doc and Doc2Chunk annotators not being loadable in PySpark
- Fixed a bug where DeepSentenceDetector wouldn't corrent denote start and end offsets (Thanks @Tshimanga from Deep6.ai)
- Fixed a bug where DeepSentenceDetector would miss sentence parts when NER model missed header sentence (Thanks @Tshimanga from Deep6.ai)
- Cleaned and optimized DeepSentenceDetector code (Thanks @danilojsl)
- Fixed a missing dependency for OCR
Documentation and notebooks
- Added support and instructions for Anaconda deployment (Thanks @maziyarpanahi)
- Updated various python notebooks to show utilization of spark packages instead of jars
- Added a new conference talk with Spark NLP in French at XebiCon'18
- Updated documentation towards less use of jars in favor of dependency solving
This release potentially targets to improve performance and resource usage in some pipelines that use word embeddings, it also comes
together with a very interesting autorotation feature in OCR, and a couple of new annotators to solve particular needs, including the ChunkTokenizer
or a Param to limit sentence lengths. Finally, we are starting to organize our multilingual store of models and data for training models.
Check the examples for some italian notebooks!. Thanks again to all community for such quick feedback all the time.
- OCR now capable of automatic rotation, significantly improving accuracy in some scenarios
- ChunkTokenizer is a new annotator that Tokenizes CHUNK type annotations. Extends Tokenizer algorithm and stores chunk ID for reference.
- SentenceDetector new Param maxLength now cuts off sentences longer than (by default) 240 characters. It avoids Deep Learning annotator issues and may improve performance in some scenarios.
- NerConverter new Param whiteList now allows a list of NER labels to be considered, while discarding the rest. May be useful for selective CHUNKing pipelines.
- Pipelines using Word Embeddings should now perform faster due to a group of RocksDB optimizations allowing annotators to reuse current open connections to DB
- Fixed a bug where DeepSentenceDetector was missing the load() interface (Thanks @Tshimanga from Deep6!)
- Fixed a bug where RocksDB opened too many files at once causing pipelines to fail or to work very slowly
- Fixed NerCrfModel when prefetching RocksDB causing slower performance
- Added missing artifact resolution dependencies for OCR Module
- Started adding and organizing multilanguage models (Thanks @maziyarpanahi)
- Updated RocksDB to 5.17.2
This hotfix version of Spark-NLP improves framework support by adding Maven coordinates for OCR and allowing S3 retrieval of files.
We also included code for generating Graphs for NerDL and also for creating your own metadata files for a private model downloader.
As new features, we are including a new experimental machine learning based sentence detector, which uses NER for bounds detections.
Aside from this, we are including a few bug fixes and OCR improvements. Enjoy! and thanks again for community contributions!
- New DeepSentenceDetector annotator takes Spark-NLP's NER Deep Learning models as a base to improve sentence detection
- Improved accuracy of ContextSpellChecker by enabling re-ranking of candidate words according to a weighted levenshtein distance
- OCR process now defaults to split content in rows whether paragraphs or pages are identified for improved parallelism. Maybe turned off
Examples and use cases
- Added Scala examples for Sentiment analysis and Lemmatizer in Italian (Thanks Vincenzo Gaudenzi from DXC.technology for dataset and model contribution!!!)
- Fixed a bug in Norvig and Symmetric SpellCheckers where the pattern parameter was not provided properly in Scala side (Thanks @johnmccain for reporting!)
- Added hadoop-aws dependency for remote download capabilities (e.g. word embeddings sets)
- Metadata files for pretrained model downloads code is now included. This may be useful if anyone wants to set up their own private local model downloader service
- NerDL Graphs generation code is now included in the library. This allows the usage of custom word embedding dimensions and feature counts.
- Vincenzo Gaudenzi (DXC.technology) for contributing Italian datasets and models. @maziyarpanahi for creating examples with them.
- @correlator from Deep6.ai for contributing feedback in slack and features feedback in general
- @johnmccain for reporting bugs in spell checker
- @rohit-nlp for delivering maven coordinates for OCR
- @haimco10 for contributing a sentence detector improvement with apostrophe's use case. Not merged due specific issues involved.
This release is huge! Spark-NLP made the leap into Spark 2.4.0, even with the challenge of not having everyone yet on board there (i.e. Zeppelin doesn't yet support it).
In this version we release three new NLP annotators. Two for dependency parsing processes and one for contextual deep learning based spell checking.
We also significantly improved OCR functionality, fine-tuning capabilities and general output performance, particularly on tesseract.
Finally, there's plenty of bug fixes and improvements in the word embeddings field, along with performance boosts and reduced disk IO.
Feel free to shoot us with any feedback you have! Particularly on your Spark 2.4.x experience.
- Built on top of Spark 2.4.0
- Dependency Parser annotator allows for sentence relationship encoding
- Typed Dependency Parser annotator allows for labeling relationships within dependency tags
- ContextSpellChecker is our first Deep Learning based Spell Checker that evaluates context and not only tokens
- More OCR parameters exposed for further fine tuning, including preferred methods priority and page segmentation modes
- OCR now has a setting setSplitPages() which allows setting whether to output one page per row or the entire document instead
- Improved word embeddings performance when working in local filesystems
- Reduced the amount of disk IO when working with Word Embeddings
- All python notebooks improved for better readability and better documentation
- Simplified PySpark interface API
- CoNLLGenerator utility class which helps building CoNLL-2003 files for NER training
- EmbeddingsHelper now allows reading word embeddings files directly from s3a:// paths
- Solved race-condition issues in regards of cluster usage of RocksDB index for embeddings
- Fixed application.conf reading bug which didn't properly refresh AWS credentials
- RocksDB index no longer uses compression, in order to support Windows without native RocksDB compression libraries
- Solved various python default parameter settings
- Fixed circular dependency with jbig pdfbox image OCR
- DeIdentification annotator is no longer supported in the open source version of Spark-NLP
- AssertionStatus annotator is no longer supported in the open source version of Spark-NLP