semvec/pypi-packages huggingface dataset:
collocater 0.3
Package for retrieving collocations from text with Spacy
Keywords: Collocations Finder

# Collocater 

Collocater is a Python library for retrieving the collocations to be found in a message. The ontology it operates on has been scraped from the [Online OXFORD Collocation Dictionary](http://www.freecollocation.com/search?word=machine).

Collocater can be added as a pipeline component to SpaCy's preprocessing pipeline, so that a messages' collocations can be retrireved the same way its named entities can.

Check out [Collocations Finder](https://collocations-finder.appspot.com/) to learn more about the project.

## Installation

```bash
pip install collocater --no-deps
```

## Usage

```python
from collocater import collocater
import spacy
from pprint import pprint

collie = collocater.Collocater.loader()
nlp = spacy.load('en_core_web_sm')
nlp.add_pipe(collie)

text = "If this isn't a bunch of beautiful flowers I don't know what is!"
doc = nlp(text)
print(doc._.collocs) # returns [bunch of, bunch of beautiful flowers, beautiful flowers]

#Tokens with associated collocations in text:
colls = [(col.text, col.start_char, col.end_char, col.label_) for col in doc._.collocs]
pprint(colls) # returns [
#                          ('bunch of', 16, 24, 'bunch_noun__prep'),
#                          ('bunch of beautiful flowers', 16, 42, 'flower_noun__quant'),
#                          ('beautiful flowers', 25, 42, 'flower_noun__adj')
#                          ]

print(collie(text))
#{'beautiful flowers': {'coll_type': 'flower_noun__adj', 'location': [7, 9]},
# 'bunch of': {'coll_type': 'bunch_noun__prep', 'location': [5, 7]},
# 'bunch of beautiful flowers': {'coll_type': 'flower_noun__quant',
#                                'location': [5, 9]}}
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)
tencentApi 0.1.0
腾讯云资源api，补充cns模块的api函数，实现动态域名解析。
Requires Python: >=3.6

# **腾讯Api的CNS模块补充**
## **简介**
腾讯云产品有提供支持多种语言的官方的SDK文档，也包括python，但是对于cns模块支持有限，目前（2020-6-3）并没有现成的python模块来操作腾讯云的域名管理。根据官方api文档，使用python访问腾讯云的cns资源，并实现ipv6动态域名解析功能。
## **安装**
- pip工具安装
```
pip install tencentApi        
```                                              
- 源码安装
``` 
git clone https://github.com/shenchucheng/tencentapi.git tencentapi
cd tencentapi
python3 setup.py sdist bdist_wheel
python3 -m pip install dist/tencentApi*.tar.gz 
```

## **cli工具**
安装完成后可使用cns工具行命令
```
cns --help  # 显示帮助信息
cns config  # 进行ip环境检测
cns ddns run <flags>  
cns profile ~/.cnsrc  # 生成动态域名解析json文件
cns ddns run --profile ~/.cnsrc  # 以配置文件的方式启动 !!!注意补充配置文件的信息
```