run final

This commit is contained in:
Cezary 2020-12-15 21:52:12 +01:00
parent 02742a50fc
commit 68eb70e9b2
12 changed files with 59932 additions and 4 deletions

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@ -0,0 +1,13 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N802" />
<option value="N803" />
</list>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/retro_gap.iml" filepath="$PROJECT_DIR$/.idea/retro_gap.iml" />
</modules>
</component>
</project>

8
.idea/retro_gap.iml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

10
Main.py
View File

@ -1,12 +1,14 @@
import sys
import numpy as np
log = []
line = 0
unigrams = []
unigramsF = {}
unigramKeys = 0
unigramWords = 0
line = 0
log = []
def makeUnigrams(unigrams):
@ -16,7 +18,7 @@ def makeUnigrams(unigrams):
unigrams.append(i[2:])
def countWordsAndKeys(keys, words):
def countWordsAndKeys(keys, words, unigrams):
for u in unigrams:
for i in range(0, len(u)):
if u[i] not in unigramsF:
@ -50,5 +52,5 @@ def logic(sortedUnigrams, val):
if __name__ == '__main__':
makeUnigrams(unigrams)
countWordsAndKeys(unigramKeys, unigramWords)
countWordsAndKeys(unigramKeys, unigramWords, unigrams)
logic(sorted(unigramsF.items(), key=lambda x: x[1], reverse=True), unigramWords + unigramKeys)

19986
dev-0/out.tsv Normal file

File diff suppressed because it is too large Load Diff

11628
dev-1/out.tsv Normal file

File diff suppressed because it is too large Load Diff

14132
out.tsv Normal file

File diff suppressed because it is too large Load Diff

14132
test-A/out.tsv Normal file

File diff suppressed because it is too large Load Diff