Nick Socha
Nick Socha is a customer service ninja with 7+ years of experience under his belt. He's a pro at tackling tricky technical issues, diffusing tense situations, and building lasting relationships with end-users. His top-notch support skills make him a whiz at managing ticket systems for on-site and remote IT infrastructures, and he's always quick on his feet to get end-user inquiries resolved. As a Salesforce Certified Associate, Nick has a handle on the Salesforce platform and knows how to make it sing. When he's not saving the day at work, Nick is living his best life as a Sim Racing enthusiast, always honing his skills and staying ahead of the curve in this ever-evolving and exciting industry.
Skills
IT Skills:
- Active Directory / Group Policy
- Conference Room Support
- Employee Onboarding
- Hardware Upgrades
- Imaging
- Knowledge Base Development
- LAN/WAN Protocols
- O365 / Google Workspace Training
- Office 365 Administration
- Powershell
- Salesforce
- ServiceNow
- Vendor Coordination
- Virtualization
- VPN Troubleshooting
- Workstation Deployment
Programming Skills:
- HTML
- CSS
- Sass / BEM
- JavaScript
- Bootstrap
- Git / GitHub
- WordPress
Certifications
-
CompTIA A+
2014 - 2017 -
CompTIA Network+
2014 - 2017 -
Salesforce Certified Associate
2022 - Present
Education
Degree Program:
IT Networking • Milwaukee Area Technical College
CGPA: 3.111
Work Experience
Help Desk Technician
ADVENT • Wauwatosa, WI
2021 – 2022
-
• Proactively administered Office 365 and on-prem/Azure AD,
creating new users and terminating accounts to ensure smooth
operations and user satisfaction.
• Assisted with monthly audits of AD and server/network upgrades, identifying potential issues and implementing solutions before they became problems.
• Administered and provided training for Office 365, including transitioning some departments to SharePoint sites replacing aged department network drives.
• Responded to and resolved 3CX VoIP phone issues and printer issues with a sense of urgency, minimizing downtime for end-users and ensuring business continuity.
• Supported conference rooms by troubleshooting and resolving technical issues, ensuring smooth and successful meetings.
• Contributed to the creation and maintenance of a comprehensive knowledge base for IT support, ensuring that information is up-to-date and easily accessible to end-users and IT team members alike, allowing for quick and accurate resolution of issues.
• Responded to and resolved various IT issues via Freshdesk, including password resets, onboarding of new employees, both in-person and remotely, contributing to a positive employee experience and overall satisfaction.
• Utilized NTLite imaging software to image, install, and verify functionality of new Windows 10 / 11 laptops, streamlining the process and increasing efficiency.
• Maintained enterprise level security utilizing Bitdefender and KnowB4 security software among others.
Senior Desktop Support Technician
Ascension Technologies • Glendale, WI
2016 – 2021
-
• Demonstrated expertise in resolving a variety of technical
challenges, including application errors, hardware malfunctions,
network outages, and software bugs, resulting in improved
productivity for end-users - mainly Citrix, Outlook/Office 365,
Google Workspace, Epic, MagTek/Ingenico POS issues,
MModal/Dragon dictation issues - completing roughly 7-20 tickets
per day via ServiceNow.
• Secured remote workforce by successfully resolving VPN connectivity issues within AnyConnect, PulseSecure, and FortiClient.
• Ensured the security and integrity of the organization's HIPPA data by utilizing McAfee, Cylance, Tanium, and Symantec endpoint security software.
• Consistently able to handle a high volume of IT service requests, with a focus on providing prompt and effective solutions to a wide range of issues, everything from password resets, assisting vendors, to multi-site troubleshooting.
• Facilitated smooth adoption and usage of Office 365 and Google Workspace tools among end-users through comprehensive training.
• Imaged and Configured Windows 7-10 hardware using SCCM. (Dell, HP, and Lenovo)
• Maintained IP addresses and DNS records using Infoblox software.
• Demonstrated proficiency in deploying and relocating workstations, as well as onboarding new employees.
• Contributed to an efficient and streamlined 45-person Field Services department by taking part in submitting weekly inventory, monthly hardware audits, and the Cloud Blue hardware recycling program.
• Proven ability to work with a diverse range of clients, from CEOs to janitors, and remotely collaborate with hundreds of people from different teams company wide during my 7 year tenure at Ascension.
Deployment Technician
Wheaton Franciscan Healthcare • Glendale, WI
2015 – 2016
-
• Collaborated with a team of 6 technicians in the successful
implementation of a multi-site desktop refresh project,
resulting in increased productivity and improved system
functionality / reliability for employees.
• Proactively identified and resolved potential issues by performing testing and troubleshooting, and ensuring proper re-installation of machines and peripherals.
• Consistently maintained accurate product inventory, resulting in efficient and timely project completion.
Desktop Specialist
-
• Performed imaging of HP desktops and laptops, verifying
hardware, OS, and network functionality.
• Set up and configured 6+ machines per day, swapping old with new, confirmed machines’ functionality.
• Achieved a consistently high success rate in swapping old machines with new, and confirming functionality, resulting in a positive impact on the customer experience.
Technical Proficiencies
- 3CX, AnyConnect, Asana, Atom, Authy, Azure, Bitdefender, BitLocker, Bomgar, Calendly, Chrome, Citrix, ClickUp, Cloudflare, Cloudinary, CodePen, CodeSandbox, CognitoForms, Contentful, CSS, Cylance, Discord, Divi, Dragon (Nuance), Dropbox, Evernote, FileZilla, Firefox, FortiClient, Freshdesk, Gatsby, GIMP, GitHub, GitKraken, Google Fonts, Google Workspace, HTML, IFTTT, iRacing, Infoblox, iOS, JavaScript, KnowB4, LastPass, Linux Mint, Mac OS, MailChimp, MarkUp, McAfee, MModal Fluency Direct, Netlify, Notion, NTLite, Office 365, Outlook, Paperform, PhotoShop, PrinterLogic, PulseSecure, Safari, SCCM, SharePoint, Shifter.io, Slack, StackBlitz, Symantec, Tanium, TextExpander, Todoist, Trello, Typeform, Ubuntu, VirtualBox, Visual Studio Code, VMWare, Webflow, Windows 7-11, Wordfence, WordPress, and Zapier


We're sorry but Intech Degree doesn't work properly without JavaScript enabled. Please enable it to continue.


NSS, Ambernath-Youth Wing (NGO), Mumbai, India – Executive Vice President
- Managed a team of 50 students
- Responsible for Decision making, Marketing, Organizing
- Planned, organized and hosted several programs for students such as drawing and quiz competitions and also cultural programs and flash mobs
Infra and Security – K. J. Somaiya College of Engineering, Mumbai, India
- Planned, organized and hosted university events
- Responsible for people and infrastructuer management
Informatics and Computing Consulting Association – Indiana University Bloomington
- Helped organizing university events such as Meet and greet with companies
- Social service activities


See: Description
| Package | Description |
|---|---|
| com.googlecode.mobilityrpc |
[public api] Contains
MobilityRPC , a static factory for creating a new
MobilityController instances. |
| com.googlecode.mobilityrpc.common |
[private api] Utility classes and interfaces used by several components.
|
| com.googlecode.mobilityrpc.common.util |
[private api] Utility classes used by several components.
|
| com.googlecode.mobilityrpc.controller |
[public api] Contains
MobilityController which manages an instance of
the library and provides methods for accessing MobilitySession s and
ConnectionManager . |
| com.googlecode.mobilityrpc.controller.impl |
[private api] Implementation classes for
MobilityController . |
| com.googlecode.mobilityrpc.network |
[public api] Contains
ConnectionManager , a public API for managing
connections. |
| com.googlecode.mobilityrpc.network.impl |
[private api] Implementation classes for
ConnectionManager . |
| com.googlecode.mobilityrpc.network.impl.tcp |
[private api] Implementation classes for TCP implementation of
ConnectionManager . |
| com.googlecode.mobilityrpc.protocol |
[private api] Packages for converting Java object (POJO) representations of messages which can be exchanged with
other instances of the library to and from binary, using Google Protocol Buffers (protobuf).
|
| com.googlecode.mobilityrpc.protocol.converters |
[private api] Classes which convert Java object (POJO) representations of messages to and from binary, using
Google Protocol Buffers (protobuf).
|
| com.googlecode.mobilityrpc.protocol.converters.components |
[private api]
ComponentConverter classes for individual message
component types. |
| com.googlecode.mobilityrpc.protocol.converters.messages |
[private api]
MessageConverter classes for individual
message types. |
| com.googlecode.mobilityrpc.protocol.pojo |
[private api] Java object (POJO) representations of protocol messages.
|
| com.googlecode.mobilityrpc.protocol.processors |
[private api] Defines the
DeserializedMessageProcessor API,
implemented by classes which can process particular types of incoming messages. |
| com.googlecode.mobilityrpc.protocol.processors.impl |
[private api] Implementations of
DeserializedMessageProcessor
for processing various types of incoming message. |
| com.googlecode.mobilityrpc.protocol.protobuf |
[private api] This package contains machine-generated Google Protocol Buffer (protobuf) classes for encoding messages
to/from binary.
|
| com.googlecode.mobilityrpc.quickstart |
[public api] Contains a simplified API to the library, wrapping the main APIs, tailored for specific use cases and
for getting started with the library quickly.
|
| com.googlecode.mobilityrpc.quickstart.util |
[private api] Internal utility classes used by some of the quickstart classes.
|
| com.googlecode.mobilityrpc.serialization |
[private api] Contains the
Serializer interface,
for serializing regular Java objects to/from binary. |
| com.googlecode.mobilityrpc.serialization.impl |
[private api] Implementations of the
Serializer
interface, responsible for serializing regular Java objects to/from binary using a particular serialization
method (e.g. |
| com.googlecode.mobilityrpc.session |
[public api] Contains
MobilitySession , the gateway through which
the application can send objects to remote machines. |
| com.googlecode.mobilityrpc.session.impl |
[private api] Contains
MobilitySession implementation classes. |
Copyright © 2012. All Rights Reserved.


Fuse
FunctionSelect
Fuse
selects a function that passes a condition.
Usage
Fuse
const Fuse = require('@codefeathers/fuse');
const a = 100;
const result = new Fuse(a)
.on(x => x>10,
a => `${a} is greater than 10.`)
.on(x => x<10,
a => `${a} is lesser than 10.`)
.on(x => x===10,
a => `${a} is 10.`)
console.log(result.resolve()); // -> "100 is greater than 10."
FuseIterable
const { FuseIterable } = require('@codefeathers/fuse');
const temperatures = [ 0, 20, 30 ];
const result = new FuseIterable(temperatures)
.on(temp => temp<10,
() => `Too cold!`)
.on(temp => temp>=10 && temp <25,
() => `Just right.`)
.on(temp => temp>=25,
() => `Too warm!`)
console.log(result.resolve()); // -> [ "Too cold!", "Just right.", "Too warm!" ]
Docs
Docs exist in /docs
directory. Will be served soon.
Development
If you find any mistakes in code/documentation, or if you feel something could be done better, do PR :) I appreciate it.
- Always write test spec for any code you add. Make sure they run as intended.
- Add/update JSDoc comments as needed.
- Use npm scripts for linting, tests, debugging, building docs.
Place your test file as testscript.js
in root.
The following npm scripts are available: npm run lint
, npm test
, npm run debug
, npm run docs
.
Credits
@Floofies was of huge help during development of this module.
Also, @TRGWII was a source of inspiration and guidance.


AMAZING PEOPLE DESERVE THE AMAZING HABESHA PIZZA
Habesha Pizza was established on April 19, 2007. Our first house was located in Ethiopia, Addis Ababa.
Habesha (ሐበሻ) is the name give for Ethiopian people. Since we first launched in Ethiopia, we named our Pizza house the HABESHA PIZZA HOUSE.
Habesha Pizza has it's pizza houses in Ethiopia, Kenya, South-Africa and Egypt.
Now, we have started an online ordering and delivery.
ENJOY!


--- layout: post title: 'Book review - Practical Vim: Edit text at the speed of Thought' date: 2012-10-12 09:41:36.000000000 +02:00 type: post published: true status: publish categories: - Books tags: - books - editors - vim meta: _edit_last: '1' _thumbnail_id: '2189' dsq_thread_id: '881958865' author: login: bbWebdesign email<EMAIL_ADDRESS>display_name: Bob first_name: Bob last_name: Belderbos ---
Practical Vim: Edit text at the speed of Thought is an intermediate to advanced book on Vim published by The Pragmatic Bookshelf. I found this a very useful Vim resource to sharpen my skills. In this post some more feedback on the book.
(Disclaimer: I received a copy of Practical Vim for review)
This book teaches a lot of Vim skills in 121 tips. Some are easy, others advanced, but above all they teach the Vim way! Following the examples you start to approach text edit challenges differently. Even feeling comfortable with most editing tasks, there is probably a better way to do it. This book had quite a few eye-openers for me, for example the Dot Formula. The examples are based on real-life scenarios, and compare different approaches, explaining why one is better than the other. The examples are also very well illustrated with tables showing how the Buffer Content looks after one or more keystrokes.
Cover-to-cover read, or as reference guide, both approaches work. Practicing the examples in Vim while reading is recommended, it helped me memorizing the keystrokes better. Apart from that, as noted here, changing 100% to Vim for all my projects and text editing has been a great help to get better.
I added quite some things to my standard repertoire: diw, df
Two more things I liked about this book: 1. Practical Vim shows you how to get by with Vim’s core functionality (almost no plugins), 2. a lot of links to Vim's Built-in Documentation and external resources.
I think this book and the author's screencasts are both unmissable to become proficient in Vim.


Hmm. We're having trouble getting your data from the internet. Please check your network connection and try again.
If you have a good connection it may be a problem with the data source. Please try again later.
We apologize for the inconvenience.
Medicare Hospitals
All Hospitals in the United States that have been registered with Medicare
Version <IP_ADDRESS>
A Mindtile App
Realtime data from Medicare.gov


Las Vegas Native
Vegas Born, Vegas Raised.
Just like the Vegas Golden Knights.
Passionate and eager to learn as much as possible in web development and design.
To simultaneously add and check off items to my bucket list.
To be the best version of me at all times
and improve year over year.
Texting campaign platform where users text in a keyword to show support and a letter is sent to their congressperson on their behalf. Create campaigns and view active map of supporters. Javascript, HTML, CSS, Twilio, React, Redux and MySQL to create this project.
Search for your favorite artist and hear a one-minute preview of any selected song. Uses Javascript, HTML, CSS, and iTunes API.
Create/login with a username and password to leave posts for friends to comment and "like". Implements MySQL, Javascript, Mustache, Font-Awesome, HTML, and CSS.
Stay organized with telephone numbers, emails, and photos of your friends. Uses React, Redux, Javascript, HTML and CSS.
Adblocker pop-up using PHP, CSS, animation and gif creation.
Created with Vue front-end implementing Vue-Router with Docker backend to match provided mockup.


We're taking the next two weeks off for the holidays. We’ll be back again on {{include.date_back}} with more civic hacking fun! While you're waiting, check out some of our presentations from the last year.
Present at Chi Hack Night in {{include.new_year}}: Would you like to propose a talk at an upcoming Chi Hack Night? Take a look at our speaker requirements and pitch your talk to us.
Apply to be a Member: Chi Hack Night is a Membership-based organizaton! If you'd like to become a Member and have ownership of what Chi Hack Night does, apply or renew for membership here!


Shane's Portfolio
Hi! My name is Shane. Here's some stuff about me:
- I'm 23 years old.
- I live in Bothell, WA.
- I work as a software engineer at a local startup in Seattle.
- I'm a instructor for Girls Who Code Bothell.
- I'm left handed.
Some of my hobbies include:
Here's a GIF of some cats:


| Author | Sebastien Lelong, Copyright © 2011, all rights reserved. |
| Adapted-by | |
| Compiler | >=2.4o |
DHT11 is a cheap temperature and humidity sensor. This library accesses this module and reads values from it. . Accessing the module is quite straight forward and requires one signal pin and a pullup resistor. This pin will be set as output and input by the library itself, and is used to activate the sensor, then actually getting values. Temp & humidity values comes in one frame from the sensor. Library split both value type and set global variables. This means these global variables store the last accessed value. Variables are word storing floating point value. Eg: when humidity is 652, then it means its 65.2 . This library will also work with the more accurate DHT22 version, just declare a "USE_DHT22" const set to true. DHT22 is also known as RHT03. Careful though, most people report RHT03 needs 5V to properly work, and DHT22 at least 3V3. If you receive timeouts with these when powered with 3V3, give a try with 5V.
- datasheet: http://www.robotshop.com/PDF/dht11.pdf - arduino playground: http://arduino.cc/playground/Main/DHT11Lib
const byte DHT11_TIMEOUT = 2
const byte DHT11_OK = 0
const byte DHT11_ERR = 1
var word dht11_temperature = 0
var byte _dht11_buffer[5] = {0,0,0,0,0}
var word dht11_humidity = 0
const byte DHT11_TIMEOUT = 2
No documentation found
const byte DHT11_OK = 0
user-friendly status
const byte DHT11_ERR = 1
No documentation found
var word dht11_temperature = 0
global variables to store temperature and humidity values
var byte _dht11_buffer[5] = {0,0,0,0,0}
No documentation found
var word dht11_humidity = 0
No documentation found
dht11_read() return byte
Read temperature and humidity value. Expect existing aliases on a signal pin: * pin_dht11 * pin_dht11_direction Returns a byte showing result status,using constants defined by the lib: DHT11_OK: successful reading, global variables are set DHT11_ERR: checksum error while reading DHT11_TIMEOUT: too many time occurs before readings, give up. Calling code must check these returned value in order to know if global variables are actually storing updated values
| 18f27j53 | 18f27j53_dht11.jal |


eBay Pre-Black Friday 2019: Samsung 32" Smart LED HDTV On Sale Today
by Madeline KaufmanHere are more deals to snag at eBay today:
Microsoft Surface Pro 6 — Intel Core i5 processor and 8GB of RAM
Originally priced at $958.98, now on sale for $699.
Apple MacBook Air — Intel Core i5 processor, 8GB of RAM, 256GB storage
Originally $1,199, now on sale for $1,072.64
Dell S-Series 32-inch Monitor
Originally $237.99, now on sale for $184.99.


{% extends "scout/base.html" %} {% load staticfiles %} {% block title %}Page not found{% endblock %} {% block web_content %}
We can't find the page you're looking for.
You may want to:


My Houses List
Add New House
Clear House
{{home.name}}
{{home.address}} {{home.status}} {{home.askPrice}} {{home.estVal}} {{home.deal}} {{home.mortgage}}


"""Util functions. Functions that are used by, or can be used with, stream2py objects
(but do not depend on stream2py objects themselves)
"""
from inspect import signature, Parameter
from abc import abstractmethod
from functools import wraps
[docs]class TypeValidationError(TypeError):
"""Raised if an object is not valid"""
[docs] @staticmethod
@abstractmethod
def is_valid(obj) -> bool:
"""Returns True if and only if obj is considered valid"""
@classmethod
def validate(cls, obj, *args, **kwargs):
if not cls.is_valid(obj):
raise cls(*args, **kwargs)
def null_enter_func(obj):
return obj
def null_exit_func(obj, *exception_info):
return None
def _has_min_num_of_arguments(func, mininum_n_args):
return len(signature(func).parameters) >= mininum_n_args
def _callable_has_a_variadic_pos(func):
"""True if and only if the function has a variadic positional argument (i.e.
*args)"""
return any(
x.kind == Parameter.VAR_POSITIONAL for x in signature(func).parameters.values()
)
[docs]class EnterFunctionValidation(TypeValidationError):
"""Raised if an function isn't a valid (context manager) __enter__ function"""
[docs] @staticmethod
def is_valid(obj):
return callable(obj) and _has_min_num_of_arguments(obj, 1)
[docs]class ExitFunctionValidation(TypeValidationError):
"""Raised if an function isn't a valid (context manager) __exit__ function"""
[docs] @staticmethod
def is_valid(obj):
return callable(obj) and (
_callable_has_a_variadic_pos or _has_min_num_of_arguments(obj, 4)
)
# TODO: If needed:
# A more general Contextualizer would proxy/delegate all methods (including special
# ones) to the wrapped
[docs]class ContextualizeCall:
"""
Wraps a callable so that it also becomes a context manager.
Both enter and exit functions can be specified.
This can be used, for instance, when the proper use of a function depends on some
objects being "in context" (i.e. calling the enter/exit of some objects).
This happens, for instance, when we want to use a method that depends on its
instance being in context. For convenience, this use case is implemented by the
``contextualize_with_instance`` function of this module.
Below is a simple doctest, but check out more significant tests in the tests folder.
You can also check out:
This issue: https://github.com/i2mint/stream2py/issues/18
This wiki: https://github.com/i2mint/stream2py/wiki/Forwarding-context-management
>>> f = lambda x: x + 1
>>> hasattr(f, '__enter__') and hasattr(f, '__exit__')
False
>>> g = ContextualizeCall(f)
>>> hasattr(g, '__enter__') and hasattr(g, '__exit__')
True
>>> with g:
... print(g(2))
3
In the example above we get the default null enter and exit functions.
They do nothing.
Let's specify some that do something:
>>> h = ContextualizeCall(f,
... enter_func=lambda self: print('entering...'),
... exit_func=lambda self, *errs: print('exiting...'),
... )
>>> with h:
... print(h(2))
entering...
3
exiting...
Note: A ``ContextualizeCall`` instance will delegate all other attributes to the
wrapped `func` except for special methods. If a user needs to also delegate these
special methods, they'll have to wrap `func` themselves.
"""
def __init__(self, func, enter_func=null_enter_func, exit_func=null_exit_func):
# validation
if not callable(func):
raise TypeError(f'First argument should be a callable, was: {func}')
EnterFunctionValidation.validate(
enter_func,
f'Not a valid enter function (should be a callable with at least one arg): '
f'{enter_func}',
)
ExitFunctionValidation.validate(
exit_func,
f'Not a valid exit function (should be a callable with at least one arg or '
f'varadic args): {exit_func}',
)
# assignment
self.func = func
self.enter_func = enter_func
self.exit_func = exit_func
# wrapping self with attributes of func (signature, name, etc.)
wraps(func)(self)
def __call__(self, *args, **kwargs):
return self.func(*args, **kwargs)
def __enter__(self):
# print(f'{type(self).__name__}.__enter__')
return self.enter_func(self.func)
def __exit__(self, exc_type, exc_val, exc_tb):
# print(f'{type(self).__name__}.__exit__')
return self.exit_func(self.func, exc_type, exc_val, exc_tb)
def __getattr__(self, attrname):
return getattr(self.func, attrname)
# ---------------------------------------------------------------------------------------
# Using these general objects for the particular case of having bound methods forward
# their context
# management to the instances they're bound to
from functools import partial
def forward_to_instance_enter(obj):
return obj.__self__.__enter__()
def forward_to_instance_exit(obj, *exception_info):
return obj.__self__.__exit__(*exception_info)
contextualize_with_instance = partial(
ContextualizeCall,
enter_func=forward_to_instance_enter,
exit_func=forward_to_instance_exit,
)
contextualize_with_instance.__doc__ = (
'To be applied to a bound method. '
'Returns a callable that forwards context enters/exits to the bound instance. '
'See ``tests.test_util.test_contextualize_with_instance`` for and example use.'
)


Mail Filter is a Mail Transport Agent (MTA) framework. The main goal is to implement a protection system against unsolicited or potentially harmful e-mail. However, its modular architecture makes Mail Filter suitable for a wide variety of applications that involve SMTP.
Features
Mail Filter is written entirely in C and uses a very simple multi-process model for handling several clients at the same time. Using a modular design, Mail Filter has an SMTP core and various modules that handle distinct functionality: SMTP client, Spamassassin integration, Clamav integration, SQL logging, etc.
Each module can install its own handle in all points of the SMTP transaction and optionally force a specific answer to the client.
Motivation
Currently all logic behind Mail Filter is hard-coded in the modules source code. This allows no user (administrator) control over the filtering process. Advanced setups (such as skipping the Spamassassin checks for some domains but only if they were authenticated with domain keys, while still going through the Clamav module) are nearly impossible in the current design.
Even if these advanced setups were possible, they would have involved a very complex configuration file and very complicated code to act upon all the possible paths resulting from the various configuration options.
In conclusion, configuration-driven behavior is not scalable and flexible enough.
Project Goal
The project goal is to provide the user (administrator) with the most flexible means of controlling the Mail Filter behavior. This can be achieved by integrating a scripting language into Mail Filter and moving all the logic from the various modules to the script. This way the behavior can be changed and customized without needing to understand the C language and the Mail Filter internals and without recompiling Mail Filter.
The idea is not new. It has been successfully applied on much more mature projects such as Opensips (www.opensips.org). However, instead of inventing a new language (as they did), the main focus should be on integrating a well known and widely used language such as JavaScript.
There are many open-source JavaScript engine implementations, so there is no need to create a new one. It's just about studying them and choosing the one that's easiest to use and integrate with Mail Filter.
All the SMTP (server and client) protocol handling should remain inside the Mail Filter modules, as well as the low-level integration with third-party applications such as Spamassassin and Clamav. The JavaScript integration should provide an interface to this functionality by the means of some predefined objects, similar to the document and window objects in the web browser JavaScript environment.
All the logic that is currently implemented inside the Mail Filter modules must be ported to JavaScript. This will serve as a reference implementation for the Mail Filter users.
Required skills


This is a doctest, the content here is verbatim from the source file at pyogp.lib.base.network.tests.basics.txt.
The networking layer is basically a replaceable REST client. It is defined as a utility providing methods such as GET, POST etc.
Let’s retrieve the standard utility (this is overridden here in this test to use a mockup network library):
>>> from pyogp.lib.base.exc import HTTPError
>>> from pyogp.lib.base.tests.mockup_client import MockupClient
>>> from pyogp.lib.base.tests.base import StdLibClient
>>> client = MockupClient(StdLibClient())
Now we can use it. Let’s post something to our test server:
>>> response = client.GET('http://localhost:12345/network/get')
>>> response.body
'Hello, World'
Let’s try a 404:
>>> client.GET('http://localhost:12345/foobar')
...
HTTPError: 404 Not Found
The error object also has some more information in it:
>>> try:
... client.GET('http://localhost:12345/foobar')
... except HTTPError, error:
... pass
Let’s check what’s available
>>> error.code
404
>>> error.msg
'Not Found'
>>> error.fp.read()
'resource not found.'
>>> response = client.POST('http://localhost:12345/network/post','test me')
>>> response.body
'returned: test me'


Auto-open pesterlogs:
Open pesterlogs
Leave pesterlogs closed
Use arrow keys for navigation:
Use left/right arrow to change page
Use mouse to click on links to change page
View pre-retcon pages:
View pre-retcon pages (changes back on hover)
View post-retcon pages only
Add controls to (most) flash pages:
Add controls
Leave as normal


A Wonder Woman!
Owner and operator of:
The Embellished Wedding Bridal Boutique
visit: TheEmbellishedWedding.com
and Oh So Southern Sweets
of Candace, Corey, and Carlos
Grandmother of Gabby, Caden, Brooklin, Bree, and Calab
Including this poem...
Word To The Mothers
Never underestimate the power of a praying mother/ For her words connect to God and dope addicts recover/ Through the arson of prayer her enemies are scattered/ Though her clothes are tattered/ A potter's vessel; her enemies are shattered/ When they gathered/ Like Long John's shrimp they're battered- Dipped in the sea of the forgotten/ Withered like the fig tree in Mark their fruit is rotten/ She sends up praise/ In the latter days/ Seeking the face of God with a heavenly gaze/ Sweet like a dozen glazed/ She's not fazed/ Though the weapons form God's will she performs/ Trusting in His will, to His word she conforms/ Through the renewing of her mind she is transformed/ Now her garments are adorned (Selah)// The Lord has used her prayers to save and set free many/ Through her works in the kitchen bellies are filled with plenty/ She has exhorted many- Many whom were face down to the ground/ Lost sheep she's found/ Because she is a queen, The Lord Yeshua (Jesus) shall bring her a crown/ To my mother, and all the good mothers! Happy mothers day.


stk.molecular.topologies.base module¶
Defines the base Topology
type.
Extending stk: Adding new topologies.¶
Cages¶
To add a new cage topology a new class should be created, named
after the topology. This class should inherit CageTopology
.
This will give access to various methods which are necessary
for dealing with any cage molecule. See the documenation of
CageTopology
for more details.
The new class will only need to have five class attributes added:
- a
list
calledvertices
- a
list
callededges
n_windows
, which holds the number of windows the cage topology has.n_window_types
, which holds the number of different window types. For example, ifn_window_types
is2
, then the topology will have two kinds of windows, each with a different expected size. Windows of the same type are expected to be of the same size.
vertices
holds instances of Vertex
. Each
instance represents a vertex of a cage and needs to be initialized
with the coordinates of that vertex. Vertices of a cage are where
building blocks of cages are placed.
edges
holds instances of the Edge
. Each
instance represents an edge of a cage and needs to be initialized
with two instances of Vertex
. The
Vertex
instances
should be held in vertices
, as mentioned above. The two
vertices are the ones which the edge connects. Linkers of cages are
placed on edges. The edge instances automatically derive their
positions from the vertices supplied during initialization.
The vertices need to be positioned such that the center of the topology is at the origin.
-
class
stk.molecular.topologies.base.
Linear
(repeating_unit, orientation, n, ends='h')[source]¶ Bases:
stk.molecular.topologies.base.Topology
A class represting linear polymers.
-
repeating_unit
¶ str
– A string showing the repeating unit of thePolymer
. For example,"AB"
or"ABB"
. The building block with index0
inMacroMolecule.building_blocks
is labelled as"A"
while index1
as"B"
and so on.
-
orientation
¶ tuple
ofint
– For each character in the repeating unit, a value of-1
,0
or1
must be given in alist
. It indicates the direction at which each monomer of the repeating unit is placed along the chain.0
means that the direction is random.
-
n
¶ int
– The number of repeating units which are used to make the polymer.
-
ends
¶ str
– The string represents how the end groups of the polymer are treated. If'h'
the functional groups at the end of the polymer are converted into hydrogem atoms. If'fg'
they are kept as the original functional group.
-
_x_position
(macro_mol, bb)[source]¶ Calculates the x coordinate on which to place bb.
Does this by checking the most how for down the x axis macro_mol stretches and checking the distance between the minimum x position of bb and its centroid. It then tries to place bb about 3 A away from macro_mol.
Parameters: - macro_mol (
MacroMolecule
) – The macromolecule being assembled. - bb (
StructUnit
) – The building block to be added to macro_mol.
Returns: The x coordinate on which to place bb.
Return type: float
- macro_mol (
-
del_atoms
(macro_mol)[source]¶ Deletes the atoms which are lost during assembly.
Parameters: macro_mol ( Polymer
) – The polymer being assembled.Returns: None Return type: NoneType
-
fg_ends
(macro_mol)[source]¶ Removes almost all atoms tagged for deletion.
In polymers, you don’t want to delete the atoms at the ends of the chain.
Parameters: macro_mol ( Polymer
) – The polymer being assembled.Returns: None Return type: NoneType
-
hygrogen_ends
(macro_mol)[source]¶ Removes all atoms tagged for deletion and adds hydrogens.
In polymers, you want to replace the functional groups at the ends with hydrogen atoms.
Parameters: macro_mol ( Polymer
) – The polymer being assembled.Returns: None Return type: NoneType
-
join
(macro_mol)[source]¶ Joins 2 monomers.
Parameters: macro_mol ( Polymer
) – The polymer being assembled.Returns: None Return type: NoneType
-
join_mols
(macro_mol)[source]¶ Does nothing,
place_mols()
joins up the molecules too.Parameters: macro_mol ( Polymer
) – The polymer being assembled.Returns: None Return type: NoneType
-
-
class
stk.molecular.topologies.base.
Topology
[source]¶ Bases:
object
Builds macromolecules.
More accurately, child classes of
Topology
take care of building macromolecules.This class directly defines any operations and attributes that are needed by any topology during assembly. However, this class is not used directly. It is intended to be inherited from. All
MacroMolecule.topology
attributes hold an instance of aTopology
child class. Child classes ofTopology
define operations specific to that one topology. For example, each child class must define ajoin_mols()
, which creates bonds between the building blocks of a macromolecule. The way in which this is done will depend on what kind of macromolecules are being built. In addition, each child class must define methods which place the building blocks in approriate positions.-
build
(macro_mol, bb_conformers=None)[source]¶ Assembles
rdkit
instances of macromolecules.This method places an
rdkit
molecule of the assembled macromolecule into themol
attribute ofMacroMolecule
. It also updates theMacroMolecule.bb_counter
andMacroMolecule.bonds_made
attributes.Parameters: - macro_mol (
MacroMolecule
) – TheMacroMolecule
instance which needs to be built. - bb_conformers (
list
ofint
, optional) – The ids of the building block conformers to be used. Must be equal in length to building_blocks and orders must correspond. IfNone
, then-1
is used for all building blocks.
Returns: None
Return type: NoneType
- macro_mol (
-
del_atoms
(macro_mol)[source]¶ Deletes the atoms which are lost during assembly.
Parameters: macro_mol ( MacroMolecule
) – The macromolecule being assembled.Returns: None Return type: NoneType
-
static
determine_bond_type
(macro_mol, atom1_id, atom2_id)[source]¶ Returns the bond order to be formed between the atoms.
Some atoms will need to have a double bond created between them. This is defined in the
fg_info.double_bond_combs
. If the atom ids provided as parameters belong to functional groups found in this list, therdkit
double bond type will be returned. If not, therdkit
single bond type will be returned. These types are needed when adding bonds to anrdkit
molecule.Parameters: - macro_mol (
MacroMolecule
) – The macromolecule being assembled. - atom1_id (
int
) – The id number of the first atom. - atom2_id (
int
) – The id number of the second atom.
Returns: rdkit.Chem.rdchem.BondType.SINGLE
– If the atoms don’t belong to functional groups which form a double bond.rdkit.Chem.rdchem.BondType.DOUBLE
– If the atoms belong to functional groups which form a double bond.
- macro_mol (
-
-
class
stk.molecular.topologies.base.
TopologyMeta
[source]¶ Bases:
type
Makes a repr of an instance, based initialization arguments used.
-
stk.molecular.topologies.base.
remove_confs
(building_blocks, keep)[source]¶ Removes all conformers from building_blocks except keep.
All kept conformers have their id set to 0.
Parameters: - building_blocks (iterable of
StructUnit
instances) – A set ofStructUnit
instances which represent the building blocks forming a macromolecule. - keep (
list
ofint
) – The ids of the building block conformers to be used for assembling theMacroMolecule
. Must be equal in length to building_blocks and orders must correspond.
Returns: A
list
of the form,- returned = [[conf1, conf2, conf3],
[conf4, conf5], [conf6, conf7, conf8, conf9]]
where each sublist holds all the original conformers of a particular building block.
Return type: list
- building_blocks (iterable of


package annotators
- Alphabetic
- Public
- All
Type Members
-
class
Chunk2Doc extends AnnotatorModel[Chunk2Doc] with HasSimpleAnnotate[Chunk2Doc]
Converts a
CHUNK
type column back intoDOCUMENT
.Converts a
CHUNK
type column back intoDOCUMENT
. Useful when trying to re-tokenize or do further analysis on aCHUNK
result.Example
Location entities are extracted and converted back into
DOCUMENT
type for further processingimport spark.implicits._ import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.annotators.Chunk2Doc val data = Seq((1, "New York and New Jersey aren't that far apart actually.")).toDF("id", "text") // Extracts Named Entities amongst other things val pipeline = PretrainedPipeline("explain_document_dl") val chunkToDoc = new Chunk2Doc().setInputCols("entities").setOutputCol("chunkConverted") val explainResult = pipeline.transform(data) val result = chunkToDoc.transform(explainResult) result.selectExpr("explode(chunkConverted)").show(false) +------------------------------------------------------------------------------+ |col | +------------------------------------------------------------------------------+ |[document, 0, 7, New York, [entity -> LOC, sentence -> 0, chunk -> 0], []] | |[document, 13, 22, New Jersey, [entity -> LOC, sentence -> 0, chunk -> 1], []]| +------------------------------------------------------------------------------+
- See also
PretrainedPipeline on how to use the PretrainedPipeline
Doc2Chunk for converting
DOCUMENT
annotations toCHUNK
-
class
ChunkTokenizer extends Tokenizer
Tokenizes and flattens extracted NER chunks.
Tokenizes and flattens extracted NER chunks.
The ChunkTokenizer will split the extracted NER
CHUNK
type Annotations and will createTOKEN
type Annotations. The result is then flattened, resulting in a single array.For extended examples of usage, see the ChunkTokenizerTestSpec.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.DocumentAssembler import com.johnsnowlabs.nlp.annotators.{ChunkTokenizer, TextMatcher, Tokenizer} import com.johnsnowlabs.nlp.annotators.sbd.pragmatic.SentenceDetector import com.johnsnowlabs.nlp.util.io.ReadAs import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val sentenceDetector = new SentenceDetector() .setInputCols(Array("document")) .setOutputCol("sentence") val tokenizer = new Tokenizer() .setInputCols(Array("sentence")) .setOutputCol("token") val entityExtractor = new TextMatcher() .setInputCols("sentence", "token") .setEntities("src/test/resources/entity-extractor/test-chunks.txt", ReadAs.TEXT) .setOutputCol("entity") val chunkTokenizer = new ChunkTokenizer() .setInputCols("entity") .setOutputCol("chunk_token") val pipeline = new Pipeline().setStages(Array( documentAssembler, sentenceDetector, tokenizer, entityExtractor, chunkTokenizer )) val data = Seq( "Hello world, my name is Michael, I am an artist and I work at Benezar", "Robert, an engineer from Farendell, graduated last year. The other one, Lucas, graduated last week." ).toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("entity.result as entity" , "chunk_token.result as chunk_token").show(false) +-----------------------------------------------+---------------------------------------------------+ |entity |chunk_token | +-----------------------------------------------+---------------------------------------------------+ |[world, Michael, work at Benezar] |[world, Michael, work, at, Benezar] | |[engineer from Farendell, last year, last week]|[engineer, from, Farendell, last, year, last, week]| +-----------------------------------------------+---------------------------------------------------+
-
class
ChunkTokenizerModel extends TokenizerModel
Instantiated model of the ChunkTokenizer.
Instantiated model of the ChunkTokenizer. For usage and examples see the documentation of the main class.
-
class
Chunker extends AnnotatorModel[Chunker] with HasSimpleAnnotate[Chunker]
This annotator matches a pattern of part-of-speech tags in order to return meaningful phrases from document.
This annotator matches a pattern of part-of-speech tags in order to return meaningful phrases from document. Extracted part-of-speech tags are mapped onto the sentence, which can then be parsed by regular expressions. The part-of-speech tags are wrapped by angle brackets
<>
to be easily distinguishable in the text itself. This example sentence will result in the form:"Peter Pipers employees are picking pecks of pickled peppers." "<NNP><NNP><NNS><VBP><VBG><NNS><IN><JJ><NNS><.>"
To then extract these tags,
regexParsers
need to be set with e.g.:val chunker = new Chunker() .setInputCols("sentence", "pos") .setOutputCol("chunk") .setRegexParsers(Array("<NNP>+", "<NNS>+"))
When defining the regular expressions, tags enclosed in angle brackets are treated as groups, so here specifically
"<NNP>+"
means 1 or more nouns in succession. Additional patterns can also be set withaddRegexParsers
.For more extended examples see the Examples and the ChunkerTestSpec.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.DocumentAssembler import com.johnsnowlabs.nlp.annotators.{Chunker, Tokenizer} import com.johnsnowlabs.nlp.annotators.pos.perceptron.PerceptronModel import com.johnsnowlabs.nlp.annotators.sbd.pragmatic.SentenceDetector import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val sentence = new SentenceDetector() .setInputCols("document") .setOutputCol("sentence") val tokenizer = new Tokenizer() .setInputCols(Array("sentence")) .setOutputCol("token") val POSTag = PerceptronModel.pretrained() .setInputCols("document", "token") .setOutputCol("pos") val chunker = new Chunker() .setInputCols("sentence", "pos") .setOutputCol("chunk") .setRegexParsers(Array("<NNP>+", "<NNS>+")) val pipeline = new Pipeline() .setStages(Array( documentAssembler, sentence, tokenizer, POSTag, chunker )) val data = Seq("Peter Pipers employees are picking pecks of pickled peppers.").toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("explode(chunk) as result").show(false) +-------------------------------------------------------------+ |result | +-------------------------------------------------------------+ |[chunk, 0, 11, Peter Pipers, [sentence -> 0, chunk -> 0], []]| |[chunk, 13, 21, employees, [sentence -> 0, chunk -> 1], []] | |[chunk, 35, 39, pecks, [sentence -> 0, chunk -> 2], []] | |[chunk, 52, 58, peppers, [sentence -> 0, chunk -> 3], []] | +-------------------------------------------------------------+
- See also
PerceptronModel for Part-Of-Speech tagging
-
class
Date2Chunk extends AnnotatorModel[Date2Chunk] with HasSimpleAnnotate[Date2Chunk]
Converts
DATE
type Annotations toCHUNK
type.Converts
DATE
type Annotations toCHUNK
type.This can be useful if the following annotators after DateMatcher and MultiDateMatcher require
CHUNK
types. The entity name in the metadata can be changed withsetEntityName
.Example
import spark.implicits._ import com.johnsnowlabs.nlp.annotator._ import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val inputFormats = Array("yyyy", "yyyy/dd/MM", "MM/yyyy", "yyyy") val outputFormat = "yyyy/MM/dd" val date = new DateMatcher() .setInputCols("document") .setOutputCol("date") val date2Chunk = new Date2Chunk() .setInputCols("date") .setOutputCol("date_chunk") val pipeline = new Pipeline().setStages(Array( documentAssembler, date, date2Chunk )) val data = Seq( """Omicron is a new variant of COVID-19, which the World Health Organization designated a variant of concern on Nov. 26, 2021/26/11.""", """Neighbouring Austria has already locked down its population this week for at until 2021/10/12, becoming the first to reimpose such restrictions.""" ).toDF("text") val result = pipeline.fit(data).transform(data) result.transform(data).select("date_chunk").show(false) ----------------------------------------------------+ date_chunk | ----------------------------------------------------+ [{chunk, 118, 121, 2021/01/01, {sentence -> 0}, []}]| [{chunk, 83, 86, 2021/01/01, {sentence -> 0}, []}] | ----------------------------------------------------+
-
class
DateMatcher extends AnnotatorModel[DateMatcher] with HasSimpleAnnotate[DateMatcher] with DateMatcherUtils
Matches standard date formats into a provided format Reads from different forms of date and time expressions and converts them to a provided date format.
Matches standard date formats into a provided format Reads from different forms of date and time expressions and converts them to a provided date format.
Extracts only one date per document. Use with sentence detector to find matches in each sentence. To extract multiple dates from a document, please use the MultiDateMatcher.
Reads the following kind of dates:
"1978-01-28", "1984/04/02,1/02/1980", "2/28/79", "The 31st of April in the year 2008", "Fri, 21 Nov 1997", "Jan 21, ‘97", "Sun", "Nov 21", "jan 1st", "next thursday", "last wednesday", "today", "tomorrow", "yesterday", "next week", "next month", "next year", "day after", "the day before", "0600h", "06:00 hours", "6pm", "5:30 a.m.", "at 5", "12:59", "23:59", "1988/11/23 6pm", "next week at 7.30", "5 am tomorrow"
For example
"The 31st of April in the year 2008"
will be converted into2008/04/31
.Pretrained pipelines are available for this module, see Pipelines.
For extended examples of usage, see the Examples and the DateMatcherTestSpec.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.base.DocumentAssembler import com.johnsnowlabs.nlp.annotators.DateMatcher import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val date = new DateMatcher() .setInputCols("document") .setOutputCol("date") .setAnchorDateYear(2020) .setAnchorDateMonth(1) .setAnchorDateDay(11) val pipeline = new Pipeline().setStages(Array( documentAssembler, date )) val data = Seq("Fri, 21 Nov 1997", "next week at 7.30", "see you a day after").toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("date").show(false) +-------------------------------------------------+ |date | +-------------------------------------------------+ |[[date, 5, 15, 1997/11/21, [sentence -> 0], []]] | |[[date, 0, 8, 2020/01/18, [sentence -> 0], []]] | |[[date, 10, 18, 2020/01/12, [sentence -> 0], []]]| +-------------------------------------------------+
- See also
MultiDateMatcher for matching multiple dates in a document
- class DateMatcherTranslator extends Serializable
- sealed trait DateMatcherTranslatorPolicy extends AnyRef
- trait DateMatcherUtils extends Params
-
class
DocumentNormalizer extends AnnotatorModel[DocumentNormalizer] with HasSimpleAnnotate[DocumentNormalizer]
Annotator which normalizes raw text from tagged text, e.g.
Annotator which normalizes raw text from tagged text, e.g. scraped web pages or xml documents, from document type columns into Sentence. Removes all dirty characters from text following one or more input regex patterns. Can apply not wanted character removal with a specific policy. Can apply lower case normalization.
For extended examples of usage, see the Examples.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.DocumentAssembler import com.johnsnowlabs.nlp.annotator.DocumentNormalizer import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val cleanUpPatterns = Array("<[^>]*>") val documentNormalizer = new DocumentNormalizer() .setInputCols("document") .setOutputCol("normalizedDocument") .setAction("clean") .setPatterns(cleanUpPatterns) .setReplacement(" ") .setPolicy("pretty_all") .setLowercase(true) val pipeline = new Pipeline().setStages(Array( documentAssembler, documentNormalizer )) val text = """ THE WORLD'S LARGEST WEB DEVELOPER SITE = THE WORLD'S LARGEST WEB DEVELOPER SITE = Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.. """ val data = Seq(text).toDF("text") val pipelineModel = pipeline.fit(data) val result = pipelineModel.transform(data) result.selectExpr("normalizedDocument.result").show(truncate=false) +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |result | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |[ the world's largest web developer site the world's largest web developer site lorem ipsum is simply dummy text of the printing and typesetting industry. lorem ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. it has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. it was popularised in the 1960s with the release of letraset sheets containing lorem ipsum passages, and more recently with desktop publishing software like aldus pagemaker including versions of lorem ipsum..]| +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-
class
GraphExtraction extends AnnotatorModel[GraphExtraction] with HasSimpleAnnotate[GraphExtraction]
Extracts a dependency graph between entities.
Extracts a dependency graph between entities.
The GraphExtraction class takes e.g. extracted entities from a NerDLModel and creates a dependency tree which describes how the entities relate to each other. For that a triple store format is used. Nodes represent the entities and the edges represent the relations between those entities. The graph can then be used to find relevant relationships between words.
Both the DependencyParserModel and TypedDependencyParserModel need to be present in the pipeline. There are two ways to set them:
- Both Annotators are present in the pipeline already. The dependencies are taken implicitly from these two Annotators.
- Setting
setMergeEntities
totrue
will download the default pretrained models for those two Annotators automatically. The specific models can also be set withsetDependencyParserModel
andsetTypedDependencyParserModel
:
val graph_extraction = new GraphExtraction() .setInputCols("document", "token", "ner") .setOutputCol("graph") .setRelationshipTypes(Array("prefer-LOC")) .setMergeEntities(true) //.setDependencyParserModel(Array("dependency_conllu", "en", "public/models")) //.setTypedDependencyParserModel(Array("dependency_typed_conllu", "en", "public/models"))
To transform the resulting graph into a more generic form such as RDF, see the GraphFinisher.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.base.DocumentAssembler import com.johnsnowlabs.nlp.annotators.sbd.pragmatic.SentenceDetector import com.johnsnowlabs.nlp.annotators.Tokenizer import com.johnsnowlabs.nlp.annotators.ner.dl.NerDLModel import com.johnsnowlabs.nlp.embeddings.WordEmbeddingsModel import com.johnsnowlabs.nlp.annotators.pos.perceptron.PerceptronModel import com.johnsnowlabs.nlp.annotators.parser.dep.DependencyParserModel import com.johnsnowlabs.nlp.annotators.parser.typdep.TypedDependencyParserModel import org.apache.spark.ml.Pipeline import com.johnsnowlabs.nlp.annotators.GraphExtraction val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val sentence = new SentenceDetector() .setInputCols("document") .setOutputCol("sentence") val tokenizer = new Tokenizer() .setInputCols("sentence") .setOutputCol("token") val embeddings = WordEmbeddingsModel.pretrained() .setInputCols("sentence", "token") .setOutputCol("embeddings") val nerTagger = NerDLModel.pretrained() .setInputCols("sentence", "token", "embeddings") .setOutputCol("ner") val posTagger = PerceptronModel.pretrained() .setInputCols("sentence", "token") .setOutputCol("pos") val dependencyParser = DependencyParserModel.pretrained() .setInputCols("sentence", "pos", "token") .setOutputCol("dependency") val typedDependencyParser = TypedDependencyParserModel.pretrained() .setInputCols("dependency", "pos", "token") .setOutputCol("dependency_type") val graph_extraction = new GraphExtraction() .setInputCols("document", "token", "ner") .setOutputCol("graph") .setRelationshipTypes(Array("prefer-LOC")) val pipeline = new Pipeline().setStages(Array( documentAssembler, sentence, tokenizer, embeddings, nerTagger, posTagger, dependencyParser, typedDependencyParser, graph_extraction )) val data = Seq("You and John prefer the morning flight through Denver").toDF("text") val result = pipeline.fit(data).transform(data) result.select("graph").show(false) +-----------------------------------------------------------------------------------------------------------------+ |graph | +-----------------------------------------------------------------------------------------------------------------+ |[[node, 13, 18, prefer, [relationship -> prefer,LOC, path1 -> prefer,nsubj,morning,flat,flight,flat,Denver], []]]| +-----------------------------------------------------------------------------------------------------------------+
- See also
GraphFinisher to output the paths in a more generic format, like RDF
-
class
Lemmatizer extends AnnotatorApproach[LemmatizerModel]
Class to find lemmas out of words with the objective of returning a base dictionary word.
Class to find lemmas out of words with the objective of returning a base dictionary word. Retrieves the significant part of a word. A dictionary of predefined lemmas must be provided with
setDictionary
. The dictionary can be set in either in the form of a delimited text file or directly as an ExternalResource. Pretrained models can be loaded with LemmatizerModel.pretrained.For available pretrained models please see the Models Hub. For extended examples of usage, see the Examples and the LemmatizerTestSpec.
Example
In this example, the lemma dictionary
lemmas_small.txt
has the form of... pick -> pick picks picking picked peck -> peck pecking pecked pecks pickle -> pickle pickles pickled pickling pepper -> pepper peppers peppered peppering ...
where each key is delimited by
->
and values are delimited by\t
import spark.implicits._ import com.johnsnowlabs.nlp.DocumentAssembler import com.johnsnowlabs.nlp.annotator.Tokenizer import com.johnsnowlabs.nlp.annotator.SentenceDetector import com.johnsnowlabs.nlp.annotators.Lemmatizer import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val sentenceDetector = new SentenceDetector() .setInputCols(Array("document")) .setOutputCol("sentence") val tokenizer = new Tokenizer() .setInputCols(Array("sentence")) .setOutputCol("token") val lemmatizer = new Lemmatizer() .setInputCols(Array("token")) .setOutputCol("lemma") .setDictionary("src/test/resources/lemma-corpus-small/lemmas_small.txt", "->", "\t") val pipeline = new Pipeline() .setStages(Array( documentAssembler, sentenceDetector, tokenizer, lemmatizer )) val data = Seq("Peter Pipers employees are picking pecks of pickled peppers.") .toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("lemma.result").show(false) +------------------------------------------------------------------+ |result | +------------------------------------------------------------------+ |[Peter, Pipers, employees, are, pick, peck, of, pickle, pepper, .]| +------------------------------------------------------------------+
- See also
LemmatizerModel for the instantiated model and pretrained models.
-
class
LemmatizerModel extends AnnotatorModel[LemmatizerModel] with HasSimpleAnnotate[LemmatizerModel]
Instantiated Model of the Lemmatizer.
Instantiated Model of the Lemmatizer. For usage and examples, please see the documentation of that class. For available pretrained models please see the Models Hub.
Example
The lemmatizer from the example of the Lemmatizer can be replaced with:
val lemmatizer = LemmatizerModel.pretrained() .setInputCols(Array("token")) .setOutputCol("lemma")
This will load the default pretrained model which is
"lemma_antbnc"
.- See also
-
class
MultiDateMatcher extends AnnotatorModel[MultiDateMatcher] with HasSimpleAnnotate[MultiDateMatcher] with DateMatcherUtils
Matches standard date formats into a provided format.
Matches standard date formats into a provided format.
Reads the following kind of dates:
"1978-01-28", "1984/04/02,1/02/1980", "2/28/79", "The 31st of April in the year 2008", "Fri, 21 Nov 1997", "Jan 21, ‘97", "Sun", "Nov 21", "jan 1st", "next thursday", "last wednesday", "today", "tomorrow", "yesterday", "next week", "next month", "next year", "day after", "the day before", "0600h", "06:00 hours", "6pm", "5:30 a.m.", "at 5", "12:59", "23:59", "1988/11/23 6pm", "next week at 7.30", "5 am tomorrow"
For example
"The 31st of April in the year 2008"
will be converted into2008/04/31
.For extended examples of usage, see the Examples and the MultiDateMatcherTestSpec.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.base.DocumentAssembler import com.johnsnowlabs.nlp.annotators.MultiDateMatcher import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val date = new MultiDateMatcher() .setInputCols("document") .setOutputCol("date") .setAnchorDateYear(2020) .setAnchorDateMonth(1) .setAnchorDateDay(11) val pipeline = new Pipeline().setStages(Array( documentAssembler, date )) val data = Seq("I saw him yesterday and he told me that he will visit us next week") .toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("explode(date) as dates").show(false) +-----------------------------------------------+ |dates | +-----------------------------------------------+ |[date, 57, 65, 2020/01/18, [sentence -> 0], []]| |[date, 10, 18, 2020/01/10, [sentence -> 0], []]| +-----------------------------------------------+
-
class
NGramGenerator extends AnnotatorModel[NGramGenerator] with HasSimpleAnnotate[NGramGenerator]
A feature transformer that converts the input array of strings (annotatorType TOKEN) into an array of n-grams (annotatorType CHUNK).
A feature transformer that converts the input array of strings (annotatorType TOKEN) into an array of n-grams (annotatorType CHUNK). Null values in the input array are ignored. It returns an array of n-grams where each n-gram is represented by a space-separated string of words.
When the input is empty, an empty array is returned. When the input array length is less than n (number of elements per n-gram), no n-grams are returned.
For more extended examples see the Examples and the NGramGeneratorTestSpec.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.base.DocumentAssembler import com.johnsnowlabs.nlp.annotator.SentenceDetector import com.johnsnowlabs.nlp.annotators.Tokenizer import com.johnsnowlabs.nlp.annotators.NGramGenerator import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val sentence = new SentenceDetector() .setInputCols("document") .setOutputCol("sentence") val tokenizer = new Tokenizer() .setInputCols(Array("sentence")) .setOutputCol("token") val nGrams = new NGramGenerator() .setInputCols("token") .setOutputCol("ngrams") .setN(2) val pipeline = new Pipeline().setStages(Array( documentAssembler, sentence, tokenizer, nGrams )) val data = Seq("This is my sentence.").toDF("text") val results = pipeline.fit(data).transform(data) results.selectExpr("explode(ngrams) as result").show(false) +------------------------------------------------------------+ |result | +------------------------------------------------------------+ |[chunk, 0, 6, This is, [sentence -> 0, chunk -> 0], []] | |[chunk, 5, 9, is my, [sentence -> 0, chunk -> 1], []] | |[chunk, 8, 18, my sentence, [sentence -> 0, chunk -> 2], []]| |[chunk, 11, 19, sentence ., [sentence -> 0, chunk -> 3], []]| +------------------------------------------------------------+
-
class
Normalizer extends AnnotatorApproach[NormalizerModel]
Annotator that cleans out tokens.
Annotator that cleans out tokens. Requires stems, hence tokens. Removes all dirty characters from text following a regex pattern and transforms words based on a provided dictionary
For extended examples of usage, see the Examples.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.DocumentAssembler import com.johnsnowlabs.nlp.annotator.{Normalizer, Tokenizer} import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val tokenizer = new Tokenizer() .setInputCols("document") .setOutputCol("token") val normalizer = new Normalizer() .setInputCols("token") .setOutputCol("normalized") .setLowercase(true) .setCleanupPatterns(Array("""[^\w\d\s]""")) // remove punctuations (keep alphanumeric chars) // if we don't set CleanupPatterns, it will only keep alphabet letters ([^A-Za-z]) val pipeline = new Pipeline().setStages(Array( documentAssembler, tokenizer, normalizer )) val data = Seq("John and Peter are brothers. However they don't support each other that much.") .toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("normalized.result").show(truncate = false) +----------------------------------------------------------------------------------------+ |result | +----------------------------------------------------------------------------------------+ |[john, and, peter, are, brothers, however, they, dont, support, each, other, that, much]| +----------------------------------------------------------------------------------------+
-
class
NormalizerModel extends AnnotatorModel[NormalizerModel] with HasSimpleAnnotate[NormalizerModel]
Instantiated Model of the Normalizer.
Instantiated Model of the Normalizer. For usage and examples, please see the documentation of that class.
- See also
Normalizer for the base class
- trait ReadablePretrainedLemmatizer extends ParamsAndFeaturesReadable[LemmatizerModel] with HasPretrained[LemmatizerModel]
- trait ReadablePretrainedStopWordsCleanerModel extends ParamsAndFeaturesReadable[StopWordsCleaner] with HasPretrained[StopWordsCleaner]
- trait ReadablePretrainedTextMatcher extends ParamsAndFeaturesReadable[TextMatcherModel] with HasPretrained[TextMatcherModel]
- trait ReadablePretrainedTokenizer extends ParamsAndFeaturesReadable[TokenizerModel] with HasPretrained[TokenizerModel]
-
class
RecursiveTokenizer extends AnnotatorApproach[RecursiveTokenizerModel] with ParamsAndFeaturesWritable
Tokenizes raw text recursively based on a handful of definable rules.
Tokenizes raw text recursively based on a handful of definable rules.
Unlike the Tokenizer, the RecursiveTokenizer operates based on these array string parameters only:
prefixes
: Strings that will be split when found at the beginning of token.suffixes
: Strings that will be split when found at the end of token.infixes
: Strings that will be split when found at the middle of token.whitelist
: Whitelist of strings not to split
For extended examples of usage, see the Examples and the TokenizerTestSpec.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.base.DocumentAssembler import com.johnsnowlabs.nlp.annotators.RecursiveTokenizer import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val tokenizer = new RecursiveTokenizer() .setInputCols("document") .setOutputCol("token") val pipeline = new Pipeline().setStages(Array( documentAssembler, tokenizer )) val data = Seq("One, after the Other, (and) again. PO, QAM,").toDF("text") val result = pipeline.fit(data).transform(data) result.select("token.result").show(false) +------------------------------------------------------------------+ |result | +------------------------------------------------------------------+ |[One, ,, after, the, Other, ,, (, and, ), again, ., PO, ,, QAM, ,]| +------------------------------------------------------------------+
-
class
RecursiveTokenizerModel extends AnnotatorModel[RecursiveTokenizerModel] with HasSimpleAnnotate[RecursiveTokenizerModel] with ParamsAndFeaturesWritable
Instantiated model of the RecursiveTokenizer.
Instantiated model of the RecursiveTokenizer. For usage and examples see the documentation of the main class.
-
class
RegexMatcher extends AnnotatorApproach[RegexMatcherModel]
Uses rules to match a set of regular expressions and associate them with a provided identifier.
Uses rules to match a set of regular expressions and associate them with a provided identifier.
A rule consists of a regex pattern and an identifier, delimited by a character of choice. An example could be
\d{4}\/\d\d\/\d\d,date
which will match strings like"1970/01/01"
to the identifier"date"
.Rules must be provided by either
setRules
(followed bysetDelimiter
) or an external file.To use an external file, a dictionary of predefined regular expressions must be provided with
setExternalRules
. The dictionary can be set in either in the form of a delimited text file or directly as an ExternalResource.Pretrained pipelines are available for this module, see Pipelines.
For extended examples of usage, see the Examples and the RegexMatcherTestSpec.
Example
In this example, the
rules.txt
has the form ofthe\s\w+, followed by 'the' ceremonies, ceremony
where each regex is separated by the identifier by
","
import ResourceHelper.spark.implicits._ import com.johnsnowlabs.nlp.base.DocumentAssembler import com.johnsnowlabs.nlp.annotator.SentenceDetector import com.johnsnowlabs.nlp.annotators.RegexMatcher import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler().setInputCol("text").setOutputCol("document") val sentence = new SentenceDetector().setInputCols("document").setOutputCol("sentence") val regexMatcher = new RegexMatcher() .setExternalRules("src/test/resources/regex-matcher/rules.txt", ",") .setInputCols(Array("sentence")) .setOutputCol("regex") .setStrategy("MATCH_ALL") val pipeline = new Pipeline().setStages(Array(documentAssembler, sentence, regexMatcher)) val data = Seq( "My first sentence with the first rule. This is my second sentence with ceremonies rule." ).toDF("text") val results = pipeline.fit(data).transform(data) results.selectExpr("explode(regex) as result").show(false) +--------------------------------------------------------------------------------------------+ |result | +--------------------------------------------------------------------------------------------+ |[chunk, 23, 31, the first, [identifier -> followed by 'the', sentence -> 0, chunk -> 0], []]| |[chunk, 71, 80, ceremonies, [identifier -> ceremony, sentence -> 1, chunk -> 0], []] | +--------------------------------------------------------------------------------------------+
-
class
RegexMatcherModel extends AnnotatorModel[RegexMatcherModel] with HasSimpleAnnotate[RegexMatcherModel]
Instantiated model of the RegexMatcher.
Instantiated model of the RegexMatcher. For usage and examples see the documentation of the main class.
-
class
RegexTokenizer extends AnnotatorModel[RegexTokenizer] with HasSimpleAnnotate[RegexTokenizer]
A tokenizer that splits text by a regex pattern.
A tokenizer that splits text by a regex pattern.
The pattern needs to be set with
setPattern
and this sets the delimiting pattern or how the tokens should be split. By default this pattern is\s+
which means that tokens should be split by 1 or more whitespace characters.Example
import spark.implicits._ import com.johnsnowlabs.nlp.base.DocumentAssembler import com.johnsnowlabs.nlp.annotators.RegexTokenizer import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val regexTokenizer = new RegexTokenizer() .setInputCols("document") .setOutputCol("regexToken") .setToLowercase(true) .setPattern("\\s+") val pipeline = new Pipeline().setStages(Array( documentAssembler, regexTokenizer )) val data = Seq("This is my first sentence.\nThis is my second.").toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("regexToken.result").show(false) +-------------------------------------------------------+ |result | +-------------------------------------------------------+ |[this, is, my, first, sentence., this, is, my, second.]| +-------------------------------------------------------+
-
class
Stemmer extends AnnotatorModel[Stemmer] with HasSimpleAnnotate[Stemmer]
Returns hard-stems out of words with the objective of retrieving the meaningful part of the word.
Returns hard-stems out of words with the objective of retrieving the meaningful part of the word. For extended examples of usage, see the Examples.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.DocumentAssembler import com.johnsnowlabs.nlp.annotator.{Stemmer, Tokenizer} import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val tokenizer = new Tokenizer() .setInputCols("document") .setOutputCol("token") val stemmer = new Stemmer() .setInputCols("token") .setOutputCol("stem") val pipeline = new Pipeline().setStages(Array( documentAssembler, tokenizer, stemmer )) val data = Seq("Peter Pipers employees are picking pecks of pickled peppers.") .toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("stem.result").show(truncate = false) +-------------------------------------------------------------+ |result | +-------------------------------------------------------------+ |[peter, piper, employe, ar, pick, peck, of, pickl, pepper, .]| +-------------------------------------------------------------+
-
class
StopWordsCleaner extends AnnotatorModel[StopWordsCleaner] with HasSimpleAnnotate[StopWordsCleaner]
This annotator takes a sequence of strings (e.g.
This annotator takes a sequence of strings (e.g. the output of a Tokenizer, Normalizer, Lemmatizer, and Stemmer) and drops all the stop words from the input sequences.
By default, it uses stop words from MLlibs StopWordsRemover. Stop words can also be defined by explicitly setting them with
setStopWords(value: Array[String])
or loaded from pretrained models usingpretrained
of its companion object.val stopWords = StopWordsCleaner.pretrained() .setInputCols("token") .setOutputCol("cleanTokens") .setCaseSensitive(false) // will load the default pretrained model `"stopwords_en"`.
For available pretrained models please see the Models Hub.
For extended examples of usage, see the Examples and StopWordsCleanerTestSpec.
Example
import spark.implicits._ import com.johnsnowlabs.nlp.DocumentAssembler import com.johnsnowlabs.nlp.annotator.Tokenizer import com.johnsnowlabs.nlp.annotator.SentenceDetector import com.johnsnowlabs.nlp.annotators.StopWordsCleaner import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val sentenceDetector = new SentenceDetector() .setInputCols(Array("document")) .setOutputCol("sentence") val tokenizer = new Tokenizer() .setInputCols(Array("sentence")) .setOutputCol("token") val stopWords = new StopWordsCleaner() .setInputCols("token") .setOutputCol("cleanTokens") .setCaseSensitive(false) val pipeline = new Pipeline().setStages(Array( documentAssembler, sentenceDetector, tokenizer, stopWords )) val data = Seq( "This is my first sentence. This is my second.", "This is my third sentence. This is my forth." ).toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("cleanTokens.result").show(false) +-------------------------------+ |result | +-------------------------------+ |[first, sentence, ., second, .]| |[third, sentence, ., forth, .] | +-------------------------------+
-
class
TextMatcher extends AnnotatorApproach[TextMatcherModel] with ParamsAndFeaturesWritable
Annotator to match exact phrases (by token) provided in a file against a Document.
Annotator to match exact phrases (by token) provided in a file against a Document.
A text file of predefined phrases must be provided with
setEntities
. The text file can als be set directly as an ExternalResource.For extended examples of usage, see the Examples and the TextMatcherTestSpec.
Example
In this example, the entities file is of the form
... dolore magna aliqua lorem ipsum dolor. sit laborum ...
where each line represents an entity phrase to be extracted.
import spark.implicits._ import com.johnsnowlabs.nlp.DocumentAssembler import com.johnsnowlabs.nlp.annotator.Tokenizer import com.johnsnowlabs.nlp.annotator.TextMatcher import com.johnsnowlabs.nlp.util.io.ReadAs import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val tokenizer = new Tokenizer() .setInputCols("document") .setOutputCol("token") val data = Seq("Hello dolore magna aliqua. Lorem ipsum dolor. sit in laborum").toDF("text") val entityExtractor = new TextMatcher() .setInputCols("document", "token") .setEntities("src/test/resources/entity-extractor/test-phrases.txt", ReadAs.TEXT) .setOutputCol("entity") .setCaseSensitive(false) .setTokenizer(tokenizer.fit(data)) val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, entityExtractor)) val results = pipeline.fit(data).transform(data) results.selectExpr("explode(entity) as result").show(false) +------------------------------------------------------------------------------------------+ |result | +------------------------------------------------------------------------------------------+ |[chunk, 6, 24, dolore magna aliqua, [entity -> entity, sentence -> 0, chunk -> 0], []] | |[chunk, 27, 48, Lorem ipsum dolor. sit, [entity -> entity, sentence -> 0, chunk -> 1], []]| |[chunk, 53, 59, laborum, [entity -> entity, sentence -> 0, chunk -> 2], []] | +------------------------------------------------------------------------------------------+
- See also
BigTextMatcher to match large amounts of text
-
class
TextMatcherModel extends AnnotatorModel[TextMatcherModel] with HasSimpleAnnotate[TextMatcherModel]
Instantiated model of the TextMatcher.
Instantiated model of the TextMatcher. For usage and examples see the documentation of the main class.
-
class
Token2Chunk extends AnnotatorModel[Token2Chunk] with HasSimpleAnnotate[Token2Chunk]
Converts
TOKEN
type Annotations toCHUNK
type.Converts
TOKEN
type Annotations toCHUNK
type.This can be useful if a entities have been already extracted as
TOKEN
and following annotators requireCHUNK
types.Example
import spark.implicits._ import com.johnsnowlabs.nlp.base.DocumentAssembler import com.johnsnowlabs.nlp.annotators.{Token2Chunk, Tokenizer} import org.apache.spark.ml.Pipeline val documentAssembler = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val tokenizer = new Tokenizer() .setInputCols("document") .setOutputCol("token") val token2chunk = new Token2Chunk() .setInputCols("token") .setOutputCol("chunk") val pipeline = new Pipeline().setStages(Array( documentAssembler, tokenizer, token2chunk )) val data = Seq("One Two Three Four").toDF("text") val result = pipeline.fit(data).transform(data) result.selectExpr("explode(chunk) as result").show(false) +------------------------------------------+ |result | +------------------------------------------+ |[chunk, 0, 2, One, [sentence -> 0], []] | |[chunk, 4, 6, Two, [sentence -> 0], []] | |[chunk, 8, 12, Three, [sentence -> 0], []]| |[chunk, 14, 17, Four, [sentence -> 0], []]| +------------------------------------------+
-
class
Tokenizer extends AnnotatorApproach[TokenizerModel]
Tokenizes raw text in document type columns into TokenizedSentence .
Tokenizes raw text in document type columns into TokenizedSentence .
This class represents a non fitted tokenizer. Fitting it will cause the internal RuleFactory to construct the rules for tokenizing from the input configuration.
Identifies tokens with tokenization open standards. A few rules will help customizing it if defaults do not fit user needs.
For extended examples of usage see the Examples and Tokenizer test class
Example
import spark.implicits._ import com.johnsnowlabs.nlp.DocumentAssembler import com.johnsnowlabs.nlp.annotators.Tokenizer import org.apache.spark.ml.Pipeline val data = Seq("I'd like to say we didn't expect that. Jane's boyfriend.").toDF("text") val documentAssembler = new DocumentAssembler().setInputCol("text").setOutputCol("document") val tokenizer = new Tokenizer().setInputCols("document").setOutputCol("token").fit(data) val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer)).fit(data) val result = pipeline.transform(data) result.selectExpr("token.result").show(false) +-----------------------------------------------------------------------+ |output | +-----------------------------------------------------------------------+ |[I'd, like, to, say, we, didn't, expect, that, ., Jane's, boyfriend, .]| +-----------------------------------------------------------------------+
-
class
TokenizerModel extends AnnotatorModel[TokenizerModel] with HasSimpleAnnotate[TokenizerModel]
Tokenizes raw text into word pieces, tokens.
Tokenizes raw text into word pieces, tokens. Identifies tokens with tokenization open standards. A few rules will help customizing it if defaults do not fit user needs.
This class represents an already fitted Tokenizer model.
See the main class Tokenizer for more examples of usage.
Value Members
-
object
Chunk2Doc extends DefaultParamsReadable[Chunk2Doc] with Serializable
This is the companion object of Chunk2Doc.
This is the companion object of Chunk2Doc. Please refer to that class for the documentation.
-
object
ChunkTokenizer extends DefaultParamsReadable[ChunkTokenizer] with Serializable
This is the companion object of ChunkTokenizer.
This is the companion object of ChunkTokenizer. Please refer to that class for the documentation.
- object ChunkTokenizerModel extends ParamsAndFeaturesReadable[ChunkTokenizerModel] with Serializable
-
object
Chunker extends DefaultParamsReadable[Chunker] with Serializable
This is the companion object of Chunker.
This is the companion object of Chunker. Please refer to that class for the documentation.
-
object
Date2Chunk extends DefaultParamsReadable[Date2Chunk] with Serializable
This is the companion object of Date2Chunk.
This is the companion object of Date2Chunk. Please refer to that class for the documentation.
-
object
DateMatcher extends DefaultParamsReadable[DateMatcher] with Serializable
This is the companion object of DateMatcher.
This is the companion object of DateMatcher. Please refer to that class for the documentation.
-
object
DocumentNormalizer extends DefaultParamsReadable[DocumentNormalizer] with Serializable
This is the companion object of DocumentNormalizer.
This is the companion object of DocumentNormalizer. Please refer to that class for the documentation.
- object EnglishStemmer
-
object
Lemmatizer extends DefaultParamsReadable[Lemmatizer] with Serializable
This is the companion object of Lemmatizer.
This is the companion object of Lemmatizer. Please refer to that class for the documentation.
-
object
LemmatizerModel extends ReadablePretrainedLemmatizer with Serializable
This is the companion object of LemmatizerModel.
This is the companion object of LemmatizerModel. Please refer to that class for the documentation.
- object LookAroundManager
-
object
MultiDateMatcher extends DefaultParamsReadable[MultiDateMatcher] with Serializable
This is the companion object of MultiDateMatcher.
This is the companion object of MultiDateMatcher. Please refer to that class for the documentation.
- object MultiDatePolicy extends DateMatcherTranslatorPolicy with Product with Serializable
- object NGramGenerator extends ParamsAndFeaturesReadable[NGramGenerator] with Serializable
-
object
Normalizer extends DefaultParamsReadable[Normalizer] with Serializable
This is the companion object of Normalizer.
This is the companion object of Normalizer. Please refer to that class for the documentation.
- object NormalizerModel extends ParamsAndFeaturesReadable[NormalizerModel] with Serializable
- object PretrainedAnnotations
- object RecursiveTokenizerModel extends ParamsAndFeaturesReadable[RecursiveTokenizerModel] with Serializable
-
object
RegexMatcher extends DefaultParamsReadable[RegexMatcher] with Serializable
This is the companion object of RegexMatcher.
This is the companion object of RegexMatcher. Please refer to that class for the documentation.
- object RegexMatcherModel extends ParamsAndFeaturesReadable[RegexMatcherModel] with Serializable
-
object
RegexTokenizer extends DefaultParamsReadable[RegexTokenizer] with Serializable
This is the companion object of RegexTokenizer.
This is the companion object of RegexTokenizer. Please refer to that class for the documentation.
- object SingleDatePolicy extends DateMatcherTranslatorPolicy with Product with Serializable
-
object
Stemmer extends DefaultParamsReadable[Stemmer] with Serializable
This is the companion object of Stemmer.
This is the companion object of Stemmer. Please refer to that class for the documentation.
- object StopWordsCleaner extends ParamsAndFeaturesReadable[StopWordsCleaner] with ReadablePretrainedStopWordsCleanerModel with Serializable
-
object
TextMatcher extends DefaultParamsReadable[TextMatcher] with Serializable
This is the companion object of TextMatcher.
This is the companion object of TextMatcher. Please refer to that class for the documentation.
-
object
TextMatcherModel extends ReadablePretrainedTextMatcher with Serializable
This is the companion object of TextMatcherModel.
This is the companion object of TextMatcherModel. Please refer to that class for the documentation.
-
object
Token2Chunk extends DefaultParamsReadable[Token2Chunk] with Serializable
This is the companion object of Token2Chunk.
This is the companion object of Token2Chunk. Please refer to that class for the documentation.
-
object
Tokenizer extends DefaultParamsReadable[Tokenizer] with Serializable
This is the companion object of Tokenizer.
This is the companion object of Tokenizer. Please refer to that class for the documentation.
-
object
TokenizerModel extends ReadablePretrainedTokenizer with Serializable
This is the companion object of TokenizerModel.
This is the companion object of TokenizerModel. Please refer to that class for the documentation.


--- hidden: true layout: page title: Form Validation (Server-Side) ---
Please correct the following fields:
Attention! Please enter a valid age.
Attention! Please enter a valid shoe size.


More...
|
| | Builder (TCheckMenuItem component) |
| |
| virtual TBuilder | CheckChangeDisabled (bool checkChangeDisabled) |
| | True to prevent the checked item from being toggled. Any submenu will still be accessible. Defaults to: false More...
|
| |
| virtual TBuilder | Checked (bool _checked) |
| | True to initialize this checkbox as checked (defaults to false). Note that if this checkbox is part of a radio group (group = true) only the last item in the group that is initialized with checked = true will be rendered as checked. More...
|
| |
| virtual TBuilder | CheckedCls (string checkedCls) |
| | The CSS class used by cls to show the checked state. Defaults to Ext.baseCSSPrefix + 'menu-item-checked'. More...
|
| |
| virtual TBuilder | Group (string group) |
| | All check items with the same group name will automatically be grouped into a single-select radio button group (defaults to ''). More...
|
| |
| virtual TBuilder | GroupCls (string groupCls) |
| | The CSS class applied to this item's icon image to denote being a part of a radio group. Defaults to Ext.baseCSSClass + 'menu-group-icon'. Any specified iconCls overrides this. More...
|
| |
| virtual TBuilder | SubmenuText (string submenuText) |
| | Text to be announced by screen readers when a check item submenu is focused. Defaults to: '{0} submenu'. More...
|
| |
| virtual TBuilder | UncheckedCls (string uncheckedCls) |
| | The CSS class used by cls to show the unchecked state. Defaults to Ext.baseCSSPrefix + 'menu-item-unchecked'. More...
|
| |
| virtual TBuilder | CheckHandler (string checkHandler) |
| | A function that handles the checkchange event. More...
|
| |
| virtual TBuilder | Listeners (Action< CheckMenuItemListeners > action) |
| | Client-side JavaScript Event Handlers More...
|
| |
| virtual TBuilder | DirectEvents (Action< CheckMenuItemDirectEvents > action) |
| | Server-side DirectEventHandlers More...
|
| |
| virtual TBuilder | SetChecked (bool value, bool suppressEvent) |
| |
| virtual TBuilder | SetChecked (bool value) |
| |
| virtual TBuilder | DisableCheckChange () |
| |
| virtual TBuilder | EnableCheckChange () |
| |
| | Builder () |
| |
| | Builder (CheckMenuItem component) |
| |
| | Builder (CheckMenuItem.Config config) |
| |
◆ Builder() [1/4]
◆ Builder() [2/4]
◆ Builder() [3/4]
◆ Builder() [4/4]
◆ CheckChangeDisabled()
True to prevent the checked item from being toggled. Any submenu will still be accessible. Defaults to: false
◆ Checked()
True to initialize this checkbox as checked (defaults to false). Note that if this checkbox is part of a radio group (group = true) only the last item in the group that is initialized with checked = true will be rendered as checked.
◆ CheckedCls()
The CSS class used by cls to show the checked state. Defaults to Ext.baseCSSPrefix + 'menu-item-checked'.
◆ CheckHandler()
A function that handles the checkchange event.
◆ DirectEvents()
Server-side DirectEventHandlers
- Parameters
-
| action | The action delegate |
- Returns
- An instance of TBuilder
◆ DisableCheckChange()
◆ EnableCheckChange()
◆ Group()
All check items with the same group name will automatically be grouped into a single-select radio button group (defaults to '').
◆ GroupCls()
The CSS class applied to this item's icon image to denote being a part of a radio group. Defaults to Ext.baseCSSClass + 'menu-group-icon'. Any specified iconCls overrides this.
◆ Listeners()
Client-side JavaScript Event Handlers
- Parameters
-
| action | The action delegate |
- Returns
- An instance of TBuilder
◆ operator Builder()
◆ SetChecked() [1/2]
◆ SetChecked() [2/2]
◆ SubmenuText()
Text to be announced by screen readers when a check item submenu is focused. Defaults to: '{0} submenu'.
◆ UncheckedCls()
The CSS class used by cls to show the unchecked state. Defaults to Ext.baseCSSPrefix + 'menu-item-unchecked'.
The documentation for this class was generated from the following file:


Kosher food refers to how particular food is processed, sold, cooked or eaten. Kosher food always meets requirements of Jewish law, a law that has been in effect for over 4,000 years!
Please highlight one of the folowing two images, then click the "Vote" button


Code Quiz
Correctly answer these JS Questions as fast as you can.
Your final score is based on your time remaining.
Be mindful that you will be penalised for each incorrect answer by 15 seconds.
Correctly answer these JS Questions as fast as you can.
Your final score is based on your time remaining.
Be mindful that you will be penalised for each incorrect answer by 15 seconds.


AntFetch is identical to the standard 'Ant' task, except that it allows properties from the new project to be set in the original project.
Some background may be in order: When the <ant> task is used, in actuality, a new Ant project is created, and depending on the inheritAll property, it is populated with properties from the original project. Then the target in this new project is executed. Any properties set in the new project remain with that project, they do not get "passed back" to the original project. So, for example, if the target in the new project sets a property named "image.directory", there is no reference to that property in the original. Here's an example of what I mean:
Suppose that the "fillImageDirectory" target sets a property named "image.directory" and I call the following:
<ant dir="${image.project} target="fillImageDirectory"/> <echo>${image.directory}</echo> |
The AntFetch task allows that image.directory property to be set in the original project. The attributes for AntFetch are identical to the 'Ant' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names.
Assuming that "fillImageDirectory" actually sets a property named "image.directory", the following example will print out the directory name:
<antfetch dir="${image.project} target="fillImageDirectory" return="image.directory"/> <echo>${image.directory}</echo> |
And this one will also print out the thumbnail directory:
<antfetch dir="${image.project} target="fillImageDirectory" return="image.directory, thumbnail.directory"/> <echo>${image.directory}</echo> <echo>${thumbnail.directory}</echo> |
The attributes for AntFetch are identical to the 'ant' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names.
Table 14.1. AntFetch Attributes
| Attribute | Description | Default | Required |
|---|---|---|---|
| return | A comma separated list of property names. Whitespace is allowed, so either "a,b" or "a, b" are acceptable. | None | No |
For other attribute and nested element information and more examples, see the documentation for the "ant" task in the Ant documentation.
Copyright © 2003 Ant-Contrib Project. All rights Reserved.


However, if humans indeed have a final end, then it is clear that the preservation of life is a part of that final end. For all humans have a natural instinct to preserve life. And since something is good to the extent that it is actual, to be actual is to be good. To fulfill one's final end is to be actual. Thus, to fulfill one's final end—the preservation of life—is to be good. And therefore we prove that murder and killings are immoral, implying a right to life.


Dialog
Basic
Basic
Block Buttons
with Image
Sending $50 to John
Are you sure about that?
Sending $50 to John
Are you sure about that?
Sending $50 to John
Are you sure about that?
Iconed
Info
Success
Danger
Success
Your payment has been sent.
Error
There is something wrong.
Expired Card
Your card has been expired.
Iconed Buttons
Block Button
Inline Button
Sending $50 to John
Are you sure about that?
Sending $50 to John
Are you sure about that?
More
Form Dialog
Image Dialog
Deposit Money
From
Savings (*** 5019)
Investment (*** 6212)
Mortgage (*** 5021)
Select a bank account
Enter Amount
Overview
Pages
Components
My Cards
Settings


Curt Poff
Archive
Categories
Pages
Tags
Github
Google+
Twitter
LinkedIn
FeedBurner
Categories
general
5
diet
1
job
2
jekyll
3
github
1
jobs
1
sports
1
autumn
1
ann
1
dinner
1
social
1
work
1
baseball
1
hunting
1
portland
1
deer
1
thanksgiving
1
domain
1
linux
1
general
Fall is in the air
Ciao bella
Jekyll is now running
Panic!
Introduction
diet
More fish, please
job
Job search strategy
Still on the lookout
jekyll
Time to play with some Jekyll themes
My blog strategy
Reset, all over again
github
Reset, all over again
jobs
My blog strategy
sports
I served up a massive jinx
autumn
Fall is in the air
ann
Happy birthday to my lovely wife
dinner
Happy birthday to my lovely wife
social
Big October
work
Portland Code School goes under
baseball
Royals are champions
hunting
Deer season
portland
Move to Portland
deer
Meat on the table
thanksgiving
Here comes the ham
domain
Bootstrap homepage now operational
linux
New Linux installation on old iMac


Austin Cohrs is a 29 year old male human. He likes learning stuff, building stuff, breaking stuff, and other stuff too. Austin is currently studying to become a full-stack web developer at Code Fellows in Seattle, WA. Re-Pong is his first group project using JavaScript. He's super proud of it and his awesome team.
GitHub
Isaac Heist is a husband, father, worship pastor, web developer, and aspiring full-stack JavaScript developer. He also once built some pretty sweet kitchen cabinets. He speaks Spanish as a second language and really loves the country of Mexico.
Linkedin
GitHub
Kimmer O’Reilly is the President of Atomic Profits, a social media management firm, which facilitates aggressive internet, email, social media marketing tactics to drive sales for cruises. He jumped into Code Fellows and began studying Javascript after a great experience in Code 101 to expand his understanding of technology and incorporate new revenue streams into his business.
Linkedin
GitHub
Chris Stefan is an IT professional whose primary experience has been in operations and security. Co-creator of his son Sami, Chris is an aspiring full-stack javascript developer.
Linkedin


(PHP 4, PHP 5)
sybase_result — Get result data
This function was REMOVED in PHP 7.0.0.
Returns the contents of the cell at the row and offset in the specified Sybase result set.
When working on large result sets, you should consider using one of the functions that fetch an entire row (specified below). As these functions return the contents of multiple cells in one function call, they're MUCH quicker than sybase_result(). Also, note that specifying a numeric offset for the field argument is much quicker than specifying a fieldname or tablename.fieldname argument.
Recommended high-performance alternatives: sybase_fetch_row(), sybase_fetch_array() and sybase_fetch_object().
result
row
field
The field argument can be the field's offset, or the field's name, or the field's table dot field's name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name.
sybase_result() returns the contents of one cell from a Sybase result set.


Convert Bash to POSIX shell
Table of Contents
1. Always use ShellCheck
2. -o pipefail
is undefined
Remove it
3. echo
flags are undefined
Probably easiest to remove ANSI codes.
4. &>/dev/null
is a Bash-ism
Replace with >/dev/null 2>&1
.
5. function
keyword does not exist
Replace function NAME { }
with NAME() { }
.
6. [[
is a Bash test
Replace [[ ... ]]
with [ ... ]
.
7. Arrays don't exist
Associative arrays can be approximated with careful use of eval
.
Define a variable with an array name as a prefix, and the key as a suffix:
NAME_KEY='VALUE'
It is convenient to have a function that converts strings to identifiers:
# identifier STR # Replace characters that are not valid in an identifier with underscores. identifier() { echo "$1" | tr -C '[:alnum:]_\n' '_' }
Define a function that retrieves a key KEY from an array ARRAY:
# aget ARRAY KEY # Get the value of KEY from associative array ARRAY. # Characters that are not valid in an identifier are replaced with underscores. aget() { eval echo '$'"$(identifier "$1")_$(identifier "$2")" }
Use the aget
function as in the following:
aget NAME KEY
Producing the following output:
VALUE
8. No local
keyword
Remove them and be careful with naming.
9. No HERESTRINGs
Replace <<<
with a HEREDOC:
x="variable" cat <<POSIX_HERESTRING $x POSIX_HERESTRING