semvec/pypi-packages huggingface dataset:
lbsnstructure 1.3.0
A common language independent and cross-network social-media data scheme.
License: MIT
Requires Python: >=3.7

![pypi version](https://lbsn.vgiscience.org/structure/python/version.svg) ![pipeline status](https://gitlab.vgiscience.de/lbsn/structure/python/badges/master/pipeline.svg) from protobuf: ![version](https://lbsn.vgiscience.org/structure/protobuf/version.svg) 

# LBSNSTRUCTURE

A python compiled version of the [common location based social network (LBSN) data structure concept](https://gitlab.vgiscience.de/lbsn/concept) (ProtoBuf) to handle cross network Social Media data in Python.
There are several motivations for prividing a common LBSN interchange data structure. Firstly, the [GDPR](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A32016R0679) directly requests Social Media Network operators to allow users to transfer accounts and data inbetween services. 
While there are attempts by Google, Facebook etc. (see [data-transfer-project](https://github.com/google/data-transfer-project)), it is not currently possible. With this structure concept, we follow an independent road.
A primary goal is to systematically characterize LBSN data aspects in a common scheme that enables privacy-by-design for connected software, transfer scripts and database design.

The Github-repository of this protobuf-derived package can be found here:
https://github.com/Sieboldianus/lbsnstructure-python

## Quick Start

Install with:  
```shell
pip install --upgrade lbsnstructure
```

Import to python project with:  
```python
import lbsnstructure as lbsn
post = lbsn.Post()
place = lbsn.Place()
```

.. or compile newest version from [Protofiles](https://gitlab.vgiscience.de/lbsn/concept)

1. Clone git Repository `git clone git@gitlab.vgiscience.de/lbsn/concept`
2. Install [Protocoll Buffers](https://github.com/google/protobuf/releases)
3. Compile structure to python package `protoc --python_out=examples/python lbsnstructure/structure.proto`  
4. Install with `pip install .` in examples/python

## Developers

For development & testing, make a local clone of this repository  
```shell
git clone git@gitlab.vgiscience.de:lbsn/structure/python.git
```

Go to subfolder `examples\python` and (e.g.) symlink the folder to your  
Python's site-packages folder with:  
```shell
pip install --editable .
```

Now, lbsnstructure should be available through your python path and directly link to the local git clone directory.

## Versioning

For the releases available, see the [tags on this repository](/../tags). 
The versioning (major.minor.patch) is automated using [python-semantic-release](https://github.com/relekang/python-semantic-release).
Commit messages that follow the [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) will be automatically interpreted, 
followed by version bumps if necessary. 

## License

This project is licensed under the  MIT License.
cn-bing-translator 0.0.3
microsoft cn.bing translator
License: MIT
Keywords: microsoft bing translator

# 微软bing翻译器python sdk

[![PyPI version](https://badge.fury.io/py/cn_bing_translator.svg)](https://badge.fury.io/py/cn_bing_translator)
[![Download count](https://img.shields.io/pypi/dm/cn_bing_translator)](https://img.shields.io/pypi/dm/cn_bing_translator)

## 介绍

微软bing翻译器，支持cn.bing.com和www.bing.com，建议轻量使用，欢迎star、follow、fork。

## 适用对象

无法或者不便使用微软Azaue Text Translation服务的用户轻量级用户可以使用bing提供的翻译能力。

## 源码

[github](https://github.com/minibear2021/cn_bing_translator)

[gitee](https://gitee.com/minibear2021/cn_bing_translator)

## 安装

```
pip install cn_bing_translator
```

## 使用方法

```python
from cn_bing_translator import Translator

if __name__ == "__main__":
    translator = Translator()
    source = "翻译器"
    result = translator.process(source)
    print(result)
```

默认情况下将自动检测源语言语种，并翻译为英语，如果需要指定其他语种，可以在初始化的时候传入对应的语言代码：

```python
# 传入以下参数初始化一个从英语到日语的翻译器
translator = Translator(fromLang='en', toLang='ja')
```

具体支持的语言类型和代码请参考[微软网站](https://learn.microsoft.com/en-us/azure/ai-services/translator/language-support)。

翻译器初始化的时候，也可以定制user agent：

```python
agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1 Edg/99.0.4844.51'
translator = Translator(agent=agent)
```

如果有使用代理的需求，可以指定proxy：

```python
proxy = {'https':'http://localhost:8080'}
translator = Translator(proxy=proxy)
```

默认调用cn.bing.com，如需使用www.bing.com，可以在初始化的时候指定：

```python
translator = Translator(cnBing=False)
```

需要注意的是，根据bing.com的跳转规则，如果服务器判断是中国区用户访问，即使指定cnBing为False，仍然会自动跳转到cn.bing.com。

## 注意事项

建议轻量级使用，控制调用量和频率，微软bing翻译器默认带有防滥用措施，频繁发起大量请求可能会触发拦截。