שבת ב:ה · Shabbat 2:5
הַמְכַבֶּה אֶת הַנֵּר מִפְּנֵי שֶׁהוּא מִתְיָרֵא מִפְּנֵי גוֹיִם, מִפְּנֵי לִסְטִים, מִפְּנֵי רוּחַ רָעָה, וְאִם בִּשְׁבִיל הַחוֹלֶה שֶׁיִּישַׁן, פָּטוּר. כְּחָס עַל הַנֵּר, כְּחָס עַל הַשֶּׁמֶן, כְּחָס עַל הַפְּתִילָה, חַיָּב. וְרַבִּי יוֹסֵי פּוֹטֵר בְּכֻלָּן חוּץ מִן הַפְּתִילָה, מִפְּנֵי שֶׁהוּא עוֹשָׂהּ פֶּחָם:
One who extinguishes the lamp on Shabbat because he is afraid due to gentiles, from whom he is hiding in his home, and due to thieves, or if one is afraid due to an evil spirit, i.e., he is depressed and prefers sitting in the dark, or if he extinguished the flame due to the sick person so that he will sleep, he is exempt. However, in a case where he extinguishes the flame in order to spare the lamp, spare the oil, or spare the wick, he is liable. Rabbi Yosei exempts him in all of those cases, as in his opinion no labor prohibited by Torah law is being performed by extinguishing the flame, except for the case where he seeks to spare the wick. Only in that case is extinguishing a creative action because he makes the wick into charcoal by extinguishing the flame.
Word-by-word Breakdown (מילים ושרשים)
הַמְכַבֶּה → One who extinguishes [כ - ב - ה]אֶת → — הַנֵּר → the lamp [נ - ו - ר]מִפְּנֵי → because [פ - נ - ה]שֶׁהוּא → that he מִתְיָרֵא → is afraid [י - ר - א]מִפְּנֵי → because of [פ - נ - ה]גוֹיִם → gentiles [ג - ו - י]מִפְּנֵי → because of [פ - נ - ה]לִסְטִים → thieves [ל - ס - ט]מִפְּנֵי → because of [פ - נ - ה]רוּחַ → spirit [ר - ו - ח]רָעָה → evil [ר - ע - ה]וְאִם → and if בִּשְׁבִיל → for the sake of [ש - ב - ל]הַחוֹלֶה → the sick person [ח - ל - ה]שֶׁיִּישַׁן → that he may sleep [י - ש - ן]פָּטוּר → he is exempt [פ - ט - ר]כְּחָס → sparing [ח - ס - ה]עַל → for הַנֵּר → the lamp [נ - ו - ר]כְּחָס → sparing [ח - ס - ה]עַל → for הַשֶּׁמֶן → the oil [ש - מ - ן]כְּחָס → sparing [ח - ס - ה]עַל → for הַפְּתִילָה → the wick [פ - ת - ל]חַיָּב → he is liable [ח - י - ב]וְרַבִּי → And Rabbi [ר - ב - ה]יוֹסֵי → Yosei [י - ס - ה]פּוֹטֵר → exempts [פ - ט - ר]בְּכֻלָּן → in all of them [כ - ל - ל]חוּץ → except [ח - ו - ץ]מִן → from הַפְּתִילָה → the wick [פ - ת - ל]