semvec/pypi-packages huggingface dataset:
lightpush 0.1.3
A Simple package for ServerChan
License: MIT

### lightpush

这是对[**ServerChan**](http://sc.ftqq.com/) 和 [**PushBear**](https://pushbear.ftqq.com/admin/#)服务的一个简单封装，能够通过微信向用户或用户组推送消息提醒。

适用的场景有异常警报、事件提醒、消息推送等。之所以做这个封装是因为py里每次调用requests有点丑 :)

---

This is a simple package for [**ServerChan**](http://sc.ftqq.com/) and [**PushBear**](https://pushbear.ftqq.com/admin/#).

**ServerChan** and **PushBear** are free services for you to push notifications to WeChat.

**lightpush** is a simple wrapper for those services.

You can install lightpush by

```shell
pip install lightpush --user
```

And it is very convenient to use lightpush (like ServerChan)

```python
from lightpush import lightpush

lgp = lightpush()

# For ServerChan
lgp.set_single_push("Your Key")
lgp.single_push("Hello World","This is a msg from lightpush.")

# For PushBear
lgp.set_group_push("Your Key")
lgp.group_push("Hello World","This is a msg from lightpush.")
```

---

[Blog for lightpush](https://www.huanganheng.com/lightpush.html)
segjb 1.0
A wrapper for jieba segmentation
License: MIT
Keywords: nlp

SegJb
=====

| Segmentation wrapper of `Jieba <https://github.com/fxsjy/jieba>`__
  Chinese segmentation.
|  https://github.com/kn45/SegJb
|  ``pip install segjb`` (dependency: jieba) 

-  | Lazy initialization.

-  | Initialization with user defined dict.

-  | Build-in stop-words dict, punctuations dict.

-  | Output control of stopwords, punctuations, minimum word length,
     output delimiters etc..

-  | Support ngram.

API
---

| **init(stopwords\_file, puncs\_file, user\_dict, silent, main\_dict,
  thread)**
|  -- Initialize the segmentation utility instance.

-  | return: void.

-  | stopwords\_file: stopword dictionary. Use "" to disable.
     [SegJb.DEFAULT\_STPW]

-  | puncs\_file: punctuation dictionary. Use "" to disable.
     [SegJb.DEFAULT\_PUNC]

-  | user\_dict: load user customized dictionary. Use "" to disable.
     [SegJb.DEFAULT\_DICT]

-  | silent: whether print initializing log. [True]

-  thread: number of part to separate the corpus for parallel. [1]

| **set\_param(delim, min\_word\_len, ngram, keep\_stopwords,
  keep\_puncs)**
|  -- Set one or more parameters of the segmentation utility instance.
  Refer to parameter description.

-  | return: void
   | 

| **cut2list(corp)**
|  -- Cut a sentence to list due to configuration.

-  | return: list

-  | corp: unicode or utf8 sentence.
   | 

| **cut2str(corp)**
|  -- Cut a sentence to a delimeter(can be set by set\_param) joined
  string.

-  | return: unicode string.

-  | corp: unicode or utf8 sentence.
   | 

Parameters
----------

-  | delim [' ']
   |  the delimeter used to constuct the segmentation result in string.

-  | min\_word\_len [1]
   |  word with length less than min\_word\_len will not in segmentation
     result.

-  | ngram [1]
   |  result can be ngram.

-  | keep\_stopwords [True]
   |  whether to keep stopwords in result.

-  | keep\_puncs [True]
   |  whether to keep stopwords in result.

Example:
--------

.. code:: python

    from segjb import SegJb
    hdl_seg = SegJb()
    hdl_seg.init()
    hdl_seg.set_param(delim=' ', ngram=2, keep_stopwords=True, keep_puncs=False)
    print hdl_seg.cut2str('这是一场精彩的比赛')

Reference:
----------

-  `Bigdict <https://github.com/qinwf/BigDict>`__ from
   iLife(\ 562193561@qq.com)