semvec/pypi-packages huggingface dataset:
pxhttp 0.0.4
A pxhttp relation extractor

## Introduction
This is a zero-shot relation extractor based on the paper  [Exploring the zero-shot limit of FewRel](https://www.aclweb.org/anthology/2020.coling-main.124).

## Installation
```bash
$ pip install zero-shot-re
```

## Run the Extractor
```python
from transformers import AutoTokenizer
from zero_shot_re import RelTaggerModel, RelationExtractor

model = RelTaggerModel.from_pretrained("fractalego/fewrel-zero-shot")
tokenizer = AutoTokenizer.from_pretrained("fractalego/fewrel-zero-shot")

relations = ['noble title', 'founding date', 'occupation of a person']
extractor = RelationExtractor(model, tokenizer, relations)
ranked_rels = extractor.rank(text='John Smith received an OBE', head='John Smith', tail='OBE')
print(ranked_rels)
```
with results
```python3
[('noble title', 0.9690611883997917),
 ('occupation of a person', 0.0012609362602233887),
 ('founding date', 0.00024014711380004883)]
```

## Accuracy
The results as in the paper are

| Model                  | 0-shot 5-ways | 0-shot 10-ways |
|------------------------|--------------|----------------|
|(1) Distillbert         |70.1Â±0.5      | 55.9Â±0.6       |
|(2) Bert Large          |80.8Â±0.4      | 69.6Â±0.5       |
|(3) Distillbert + SQUAD |81.3Â±0.4      | 70.0Â±0.2       |
|(4) Bert Large + SQUAD  |86.0Â±0.6      | 76.2Â±0.4       |

This version uses the (4) Bert Large + SQUAD model

## Cite as
```bibtex
@inproceedings{cetoli-2020-exploring,
    title = "Exploring the zero-shot limit of {F}ew{R}el",
    author = "Cetoli, Alberto",
    booktitle = "Proceedings of the 28th International Conference on Computational Linguistics",
    month = dec,
    year = "2020",
    address = "Barcelona, Spain (Online)",
    publisher = "International Committee on Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2020.coling-main.124",
    doi = "10.18653/v1/2020.coling-main.124",
    pages = "1447--1451",
    abstract = "This paper proposes a general purpose relation extractor that uses Wikidata descriptions to represent the relation{'}s surface form. The results are tested on the FewRel 1.0 dataset, which provides an excellent framework for training and evaluating the proposed zero-shot learning system in English. This relation extractor architecture exploits the implicit knowledge of a language model through a question-answering approach.",
}
```
ambulance_game 0.0.7
A library to study the gaming that takes place at the interface of hospitals
Requires Python: >=3.8

[![Tests][tests-shield]][tests-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![DOI][doi-shield]][doi-url]

Ambulance Decision Game: A python library that attempts to explore a game theoretic approach to the EMS - ED interface
=======================================================================


<!-- TABLE OF CONTENTS -->
<details open="open">
  <summary>Table of Contents</summary>
  <ol>
    <li><a href="#about-the-project">About The Project</a></li>
    <li><a href="#installation">Installation</a></li>
    <li><a href="#tests">Tests</a></li>
    <li><a href="#roadmap">Roadmap</a></li>
    <li><a href="#license">License</a></li>
    <li><a href="#contact">Contact</a></li>
  </ol>
</details>



<!-- ABOUT THE PROJECT -->
## About The Project

This project revolves around modelling the interaction between the Emergency Medical Service (EMS) and Emergency Departments. 

The `ambulance_game` library is used to model:
* a discrete event simulation model of a queueing system with two waiting spaces, where individuals can be blocked.
* the equivalent Markov chain model,
* a game theoretic model between 3 players; 2 queueing systems (EDs) and a distrbutor (EMS).


## Installation

Install a development version of this library with the command:

    $ python -m pip install flit
    $ python -m flit install --symlink


<!-- TESTS EXAMPLES -->
## Tests

Run all tests developed by first installing and then running `tox`:

    $ python -m pip install tox
    $ python -m tox


<!-- ROADMAP -->
## Roadmap

See the [open issues](https://github.com/11michalis11/AmbulanceDecisionGame/issues) for a list of proposed features (and known issues).


<!-- LICENSE -->
## License

Distributed under the MIT License. See `LICENSE` for more information.



<!-- CONTACT -->
## Contact

Your Name - [@Michalis_Pan](https://twitter.com/Michalis_Pan) - PanayidesM@cardiff.ac.uk

Project Link: [AmbulanceDecisionGame](https://github.com/11michalis11/AmbulanceDecisionGame)




<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[doi-shield]: https://zenodo.org/badge/242940822.svg
[doi-url]: https://zenodo.org/badge/latestdoi/242940822
[tests-shield]: https://img.shields.io/badge/Tests-passing-GREEN.svg
[tests-url]: https://github.com/11michalis11/AmbulanceDecisionGame/actions
[issues-shield]: https://img.shields.io/github/issues/11michalis11/AmbulanceDecisionGame.svg
[issues-url]: https://github.com/11michalis11/AmbulanceDecisionGame/issues
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg
[license-url]: https://github.com/11michalis11/AmbulanceDecisionGame/blob/master/LICENSE.txt
semantha-streamlit-compare 0.2.1
This is the project for a streamlit component which uses semantha semantic compare.
Requires Python: >=3.10,<4.0

<a href="https://semantha.de"><img src="https://www.semantha.de/wp-content/uploads/semantha.svg" width="380" height="95" align="right" /></a>

# semantha-streamlit-compare: semantha building blocks for Streamlit apps

This project gives you an idea of how to use our component for building applications with streamlit. And all of this using semantha's native capabilities to process semantics in text.

tl;dr: using Streamlit, you can employ semantha's semantic comparison with just three lines of code (see below).

## Which Components Are Involved?
Streamlit.io offers easy GUI implementations. semantha.ai is a semantic processing platform which provides a REST/API for many use cases, end systems, etc.

![alt text](https://user-images.githubusercontent.com/117350133/200347538-367e9478-26cb-4f4a-8e9a-21669cf1695f.jpg  "Streamlit Component Example")

## 🚀 Quickstart

You can install `semantha-streamlit-compare` from pip:

```bash
pip install semantha-streamlit-compare
```


Then put the following example code in a file.

```python
from semantha_streamlit_compare.components.compare import SemanticCompare

compare = SemanticCompare()
compare.build_input(sentences=("First sentence", "Second sentence"))
```

## 🎛 Setup, Secret, and API Key
To use the component, you need to request a secrets.toml file. You can request that at support@thingsthinking.atlassian.net<br />
The file is structured as follows:
```
[semantha]
server_url="URL_TO_SERVER"
api_key="YOUR_API_KEY_ISSUED"
domain="USAGE_DOMAIN_PROVIDED_TO_YOU"
documenttype="document_with_contradiction_enabled"
```