add condition

This commit is contained in:
s444417 2022-03-13 11:08:52 +01:00
parent 0c12a2c27b
commit ede9b13a0b
9 changed files with 82 additions and 2 deletions

3
.idea/.gitignore vendored Normal file
View File

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

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>

View File

@ -0,0 +1,31 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="tensorflow" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="E251" />
<option value="E231" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N802" />
<option value="N803" />
<option value="N806" />
</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/Systemy dialogowe.iml" filepath="$PROJECT_DIR$/.idea/Systemy dialogowe.iml" />
</modules>
</component>
</project>

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>

View File

@ -7,7 +7,6 @@ reflections = {
"bylem": "byles", "bylem": "byles",
"bylam": "bylas", "bylam": "bylas",
"ja": "ty", "ja": "ty",
"jestem": "jestes",
"chcialbym": "chcialbys", "chcialbym": "chcialbys",
"chcialabym": "chcialabys", "chcialabym": "chcialabys",
"mam": "masz", "mam": "masz",
@ -21,7 +20,6 @@ reflections = {
"masz": "mam", "masz": "mam",
"bedziesz": "bede", "bedziesz": "bede",
"twoj": "moj", "twoj": "moj",
"twoja": "moja",
"twoim": "moim", "twoim": "moim",
"twojego": "mojego", "twojego": "mojego",
"ty": "ja", "ty": "ja",
@ -100,6 +98,20 @@ pairs = (
"Jesli %1, to co jeszcze musi byc prawda?", "Jesli %1, to co jeszcze musi byc prawda?",
), ),
), ),
(
r"quit", (
"Do uslyszenia",
"Czesc"
),
),
(
r"(.*)",
(
"Zmienmy na chwile temat, powiedz mi o swojej rodzinie",
"%1?",
"Dlaczego tak mowisz?",
),
),
) )
cheddar = Chat(pairs, reflections) cheddar = Chat(pairs, reflections)

2
eliza.py Normal file
View File

@ -0,0 +1,2 @@
from nltk.chat import eliza
eliza.demo()