
    g                     T    d Z ddlmZmZ dZ eee      Zd Zd Zedk(  r e        yy)z
Tsu bot responds to all queries with a Sun Tsu sayings

Quoted from Sun Tsu's The Art of War
Translated by LIONEL GILES, M.A. 1910
Hosted by the Gutenberg Project
https://www.gutenberg.org/
    )Chatreflections))quit)z	Good-bye.z	Plan wellzMay victory be your future)z[^\?]*\?)z9Please consider whether you can answer your own question.zAsk me no questions!)z
[0-9]+(.*))It is the rule in war, if our forces are ten to the enemy's one, to surround him; if five to one, to attack him; if twice as numerous, to divide our army into two.%There are five essentials for victory)z[A-Ca-c](.*))z3The art of war is of vital importance to the State.z"All warfare is based on deception.zhIf your opponent is secure at all points, be prepared for him. If he is in superior strength, evade him.zZIf the campaign is protracted, the resources of the State will not be equal to the strain.zEAttack him where he is unprepared, appear where you are not expected.zJThere is no instance of a country having benefited from prolonged warfare.)z[D-Fd-f](.*))zhThe skillful soldier does not raise a second levy, neither are his supply-wagons loaded more than twice.z?Bring war material with you from home, but forage on the enemy.zFIn war, then, let your great object be victory, not lengthy campaigns.zTo fight and conquer in all your battles is not supreme excellence; supreme excellence consists in breaking the enemy's resistance without fighting.)z[G-Ig-i](.*))zAHeaven signifies night and day, cold and heat, times and seasons.r   zThe good fighters of old first put themselves beyond the possibility of defeat, and then waited for an opportunity of defeating the enemy.z8One may know how to conquer without being able to do it.)z[J-Lj-l](.*))
zIThere are three ways in which a ruler can bring misfortune upon his army.zBy commanding the army to advance or to retreat, being ignorant of the fact that it cannot obey. This is called hobbling the army.zBy attempting to govern an army in the same way as he administers a kingdom, being ignorant of the conditions which obtain in an army. This causes restlessness in the soldier's minds.zBy employing the officers of his army without discrimination, through ignorance of the military principle of adaptation to circumstances. This shakes the confidence of the soldiers.r   z:He will win who knows when to fight and when not to fight.zFHe will win who knows how to handle both superior and inferior forces.zOHe will win whose army is animated by the same spirit throughout all its ranks.zFHe will win who, prepared himself, waits to take the enemy unprepared.zRHe will win who has military capacity and is not interfered with by the sovereign.)z[M-Om-o](.*))z[If you know the enemy and know yourself, you need not fear the result of a hundred battles.z_If you know yourself but not the enemy, for every victory gained you will also suffer a defeat.zMIf you know neither the enemy nor yourself, you will succumb in every battle.zThe control of a large force is the same principle as the control of a few men: it is merely a question of dividing up their numbers.)z[P-Rp-r](.*))zjSecurity against defeat implies defensive tactics; ability to defeat the enemy means taking the offensive.zcStanding on the defensive indicates insufficient strength; attacking, a superabundance of strength.zHe wins his battles by making no mistakes. Making no mistakes is what establishes the certainty of victory, for it means conquering an enemy that is already defeated.zmA victorious army opposed to a routed one, is as a pound's weight placed in the scale against a single grain.zmThe onrush of a conquering force is like the bursting of pent-up waters into a chasm a thousand fathoms deep.)z[S-Us-u](.*))zdWhat the ancients called a clever fighter is one who not only wins, but excels in winning with ease.zSHence his victories bring him neither reputation for wisdom nor credit for courage.zHence the skillful fighter puts himself into a position which makes defeat impossible, and does not miss the moment for defeating the enemy.zIn war the victorious strategist only seeks battle after the victory has been won, whereas he who is destined to defeat first fights and afterwards looks for victory.zThere are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard.zkAppear at points which the enemy must hasten to defend; march swiftly to places where you are not expected.)z[V-Zv-z](.*))zEIt is a matter of life and death, a road either to safety or to ruin.zBHold out baits to entice the enemy. Feign disorder, and crush him.zuAll men can see the tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved.zDo not repeat the tactics which have gained you one victory, but let your methods be regulated by the infinite variety of circumstances.zLSo in war, the way is to avoid what is strong and to strike at what is weak.zXJust as water retains no constant shape, so in warfare there are no constant conditions.)z(.*))zYour statement insults me. c                      t        d       t        d       t        d       t        d       t        j                          y )NzCTalk to the program by typing in plain English, using normal upper-z@and lower-case letters and punctuation.  Enter "quit" when done.zH========================================================================zYou seek enlightenment?)printsuntsu_chatbotconverse     E/var/www/openai/venv/lib/python3.12/site-packages/nltk/chat/suntsu.pysuntsu_chatr   ~   s0    	
OP	
LM	(O	
#$r   c                      t                y )N)r   r   r   r   demor      s    Mr   __main__N)	__doc__nltk.chat.utilr   r   pairsr   r   r   __name__r   r   r   <module>r      sD    -f	P e[) zF r   