https://github.com/yochem/starpars
:mega: A Context-Free Grammar in a galaxy far far away...
https://github.com/yochem/starpars
artificial-intelligence computational-linguistics natural-language-processing nltk
Last synced: 2 months ago
JSON representation
:mega: A Context-Free Grammar in a galaxy far far away...
- Host: GitHub
- URL: https://github.com/yochem/starpars
- Owner: yochem
- License: mit
- Created: 2019-04-12T08:10:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-02T12:55:57.000Z (almost 6 years ago)
- Last Synced: 2025-02-06T13:23:57.494Z (4 months ago)
- Topics: artificial-intelligence, computational-linguistics, natural-language-processing, nltk
- Language: Python
- Homepage:
- Size: 53.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StarPars CFG
A sentence generator trained on Star Wars opening crawls.
NTLK project for [taaltheorie en
taalverwerking](http://studiegids.uva.nl/xmlpages/page/2018-2019/zoek-vak/vak/62671).The multiple sources that form the corpus can be found in the corpus itself:
[data/corpus.txt](data/corpus.txt).### Generating sentences
```python
$ python3 -i starpars.py
>>> generate_sentences(CFG, sample_size=500, num=9000)
```### Some generated sentences
- These daring spaceships can restore.
- This first knights will gather rescue.
- All evil ashes fly.
- These hutt reigns luke.
- This few fighters find this difficult planet.
- These dooku custodian swept canon sides to these send farmers more and more.
- When tyranny summers recently deploys that thousand kashyyyk it call majority, these underwater begun spaceships leaving the spell.
- Race more but more lines.
- Shipping from Organa's congress.
- To relax her probes, starfleet grievous sinister declared completed leadership.
- This evil troops more or more when there.
- This can shipping desperate bespin speeds, doom summers kidnapped unbeknownst to an mean victims.
- Group rebel number man no to save.### License
Licensed under the [MIT license](LICENSE).A project by [Yochem van Rosmalen](@yochem) and [Lysa Ngouteau](@lysa-n).