diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index 610b7bf033..c9c7de52ad 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -3723,6 +3723,7 @@ Parser: "pg_catalog.default"
  pg_catalog | german_stem     | snowball stemmer for german language
  pg_catalog | hungarian_stem  | snowball stemmer for hungarian language
  pg_catalog | italian_stem    | snowball stemmer for italian language
+ pg_catalog | nepali_stem     | snowball stemmer for nepali language
  pg_catalog | norwegian_stem  | snowball stemmer for norwegian language
  pg_catalog | portuguese_stem | snowball stemmer for portuguese language
  pg_catalog | romanian_stem   | snowball stemmer for romanian language
diff --git a/src/backend/snowball/Makefile b/src/backend/snowball/Makefile
index 50cbace41d..c29f4184f2 100644
--- a/src/backend/snowball/Makefile
+++ b/src/backend/snowball/Makefile
@@ -40,6 +40,7 @@ OBJS= $(WIN32RES) dict_snowball.o api.o utilities.o \
 	stem_UTF_8_german.o \
 	stem_UTF_8_hungarian.o \
 	stem_UTF_8_italian.o \
+	stem_UTF_8_nepali.o \
 	stem_UTF_8_norwegian.o \
 	stem_UTF_8_porter.o \
 	stem_UTF_8_portuguese.o \
@@ -62,6 +63,7 @@ LANGUAGES=  \
 	german 		german		\
 	hungarian 	hungarian	\
 	italian 	italian		\
+	nepali		nepali		\
 	norwegian 	norwegian	\
 	portuguese 	portuguese	\
 	romanian 	romanian	\
diff --git a/src/backend/snowball/dict_snowball.c b/src/backend/snowball/dict_snowball.c
index 78c9f73ef0..d96c849118 100644
--- a/src/backend/snowball/dict_snowball.c
+++ b/src/backend/snowball/dict_snowball.c
@@ -49,6 +49,7 @@
 #include "snowball/libstemmer/stem_UTF_8_german.h"
 #include "snowball/libstemmer/stem_UTF_8_hungarian.h"
 #include "snowball/libstemmer/stem_UTF_8_italian.h"
+#include "snowball/libstemmer/stem_UTF_8_nepali.h"
 #include "snowball/libstemmer/stem_UTF_8_norwegian.h"
 #include "snowball/libstemmer/stem_UTF_8_porter.h"
 #include "snowball/libstemmer/stem_UTF_8_portuguese.h"
@@ -102,6 +103,7 @@ static const stemmer_module stemmer_modules[] =
 	{"german", PG_UTF8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
 	{"hungarian", PG_UTF8, hungarian_UTF_8_create_env, hungarian_UTF_8_close_env, hungarian_UTF_8_stem},
 	{"italian", PG_UTF8, italian_UTF_8_create_env, italian_UTF_8_close_env, italian_UTF_8_stem},
+	{"nepali", PG_UTF8, nepali_UTF_8_create_env, nepali_UTF_8_close_env, nepali_UTF_8_stem},
 	{"norwegian", PG_UTF8, norwegian_UTF_8_create_env, norwegian_UTF_8_close_env, norwegian_UTF_8_stem},
 	{"porter", PG_UTF8, porter_UTF_8_create_env, porter_UTF_8_close_env, porter_UTF_8_stem},
 	{"portuguese", PG_UTF8, portuguese_UTF_8_create_env, portuguese_UTF_8_close_env, portuguese_UTF_8_stem},
diff --git a/src/backend/snowball/libstemmer/stem_UTF_8_nepali.c b/src/backend/snowball/libstemmer/stem_UTF_8_nepali.c
new file mode 100644
index 0000000000..f4f6e656ad
--- /dev/null
+++ b/src/backend/snowball/libstemmer/stem_UTF_8_nepali.c
@@ -0,0 +1,440 @@
+/* This file was generated automatically by the Snowball to ISO C compiler */
+/* http://snowballstem.org/ */
+
+#include "header.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int nepali_UTF_8_stem(struct SN_env * z);
+#ifdef __cplusplus
+}
+#endif
+static int r_remove_category_2(struct SN_env * z);
+static int r_remove_category_3(struct SN_env * z);
+static int r_check_category_2(struct SN_env * z);
+static int r_remove_category_1(struct SN_env * z);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern struct SN_env * nepali_UTF_8_create_env(void);
+extern void nepali_UTF_8_close_env(struct SN_env * z);
+
+
+#ifdef __cplusplus
+}
+#endif
+static const symbol s_0_0[6] = { 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
+static const symbol s_0_1[9] = { 0xE0, 0xA4, 0xB2, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0x87 };
+static const symbol s_0_2[6] = { 0xE0, 0xA4, 0xB2, 0xE0, 0xA5, 0x87 };
+static const symbol s_0_3[9] = { 0xE0, 0xA4, 0xB2, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0x88 };
+static const symbol s_0_4[6] = { 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
+static const symbol s_0_5[12] = { 0xE0, 0xA4, 0xB8, 0xE0, 0xA4, 0x81, 0xE0, 0xA4, 0x97, 0xE0, 0xA5, 0x88 };
+static const symbol s_0_6[6] = { 0xE0, 0xA4, 0xAE, 0xE0, 0xA5, 0x88 };
+static const symbol s_0_7[6] = { 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
+static const symbol s_0_8[9] = { 0xE0, 0xA4, 0xB8, 0xE0, 0xA4, 0x81, 0xE0, 0xA4, 0x97 };
+static const symbol s_0_9[9] = { 0xE0, 0xA4, 0xB8, 0xE0, 0xA4, 0x82, 0xE0, 0xA4, 0x97 };
+static const symbol s_0_10[18] = { 0xE0, 0xA4, 0xAE, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAB, 0xE0, 0xA4, 0xA4 };
+static const symbol s_0_11[6] = { 0xE0, 0xA4, 0xB0, 0xE0, 0xA4, 0xA4 };
+static const symbol s_0_12[6] = { 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
+static const symbol s_0_13[6] = { 0xE0, 0xA4, 0xAE, 0xE0, 0xA4, 0xBE };
+static const symbol s_0_14[18] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xB5, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xB0, 0xE0, 0xA4, 0xBE };
+static const symbol s_0_15[6] = { 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBF };
+static const symbol s_0_16[9] = { 0xE0, 0xA4, 0xAA, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xBF };
+
+static const struct among a_0[17] =
+{
+/*  0 */ { 6, s_0_0, -1, 2, 0},
+/*  1 */ { 9, s_0_1, -1, 1, 0},
+/*  2 */ { 6, s_0_2, -1, 1, 0},
+/*  3 */ { 9, s_0_3, -1, 1, 0},
+/*  4 */ { 6, s_0_4, -1, 2, 0},
+/*  5 */ { 12, s_0_5, -1, 1, 0},
+/*  6 */ { 6, s_0_6, -1, 1, 0},
+/*  7 */ { 6, s_0_7, -1, 2, 0},
+/*  8 */ { 9, s_0_8, -1, 1, 0},
+/*  9 */ { 9, s_0_9, -1, 1, 0},
+/* 10 */ { 18, s_0_10, -1, 1, 0},
+/* 11 */ { 6, s_0_11, -1, 1, 0},
+/* 12 */ { 6, s_0_12, -1, 2, 0},
+/* 13 */ { 6, s_0_13, -1, 1, 0},
+/* 14 */ { 18, s_0_14, -1, 1, 0},
+/* 15 */ { 6, s_0_15, -1, 2, 0},
+/* 16 */ { 9, s_0_16, -1, 1, 0}
+};
+
+static const symbol s_1_0[3] = { 0xE0, 0xA4, 0x81 };
+static const symbol s_1_1[3] = { 0xE0, 0xA4, 0x82 };
+static const symbol s_1_2[3] = { 0xE0, 0xA5, 0x88 };
+
+static const struct among a_1[3] =
+{
+/*  0 */ { 3, s_1_0, -1, -1, 0},
+/*  1 */ { 3, s_1_1, -1, -1, 0},
+/*  2 */ { 3, s_1_2, -1, -1, 0}
+};
+
+static const symbol s_2_0[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
+static const symbol s_2_1[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
+static const symbol s_2_2[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
+static const symbol s_2_3[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
+static const symbol s_2_4[12] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x96, 0xE0, 0xA5, 0x80 };
+static const symbol s_2_5[6] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x80 };
+static const symbol s_2_6[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x80 };
+static const symbol s_2_7[6] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
+static const symbol s_2_8[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
+static const symbol s_2_9[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
+static const symbol s_2_10[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
+static const symbol s_2_11[6] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x81 };
+static const symbol s_2_12[9] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x81 };
+static const symbol s_2_13[9] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x82 };
+static const symbol s_2_14[6] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x87 };
+static const symbol s_2_15[6] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x87 };
+static const symbol s_2_16[6] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87 };
+static const symbol s_2_17[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
+static const symbol s_2_18[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
+static const symbol s_2_19[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
+static const symbol s_2_20[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x88 };
+static const symbol s_2_21[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x88 };
+static const symbol s_2_22[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x88 };
+static const symbol s_2_23[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_24[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_25[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_26[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_27[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_28[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_29[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_30[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_31[6] = { 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_32[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_33[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_34[9] = { 0xE0, 0xA4, 0xAD, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_35[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_36[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_37[12] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
+static const symbol s_2_38[6] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_39[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_40[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_41[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_42[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_43[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_44[6] = { 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_45[12] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_46[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_47[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
+static const symbol s_2_48[9] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_49[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_50[12] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_51[15] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_52[12] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_53[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_54[12] = { 0xE0, 0xA4, 0xB2, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_55[12] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_56[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_57[9] = { 0xE0, 0xA4, 0xAA, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_58[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_59[15] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_60[12] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_61[12] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA5, 0x8B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_62[9] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_63[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_64[12] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_65[15] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_66[12] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_67[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_68[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_69[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
+static const symbol s_2_70[9] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F };
+static const symbol s_2_71[3] = { 0xE0, 0xA4, 0x9B };
+static const symbol s_2_72[6] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B };
+static const symbol s_2_73[6] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B };
+static const symbol s_2_74[9] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B };
+static const symbol s_2_75[15] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA5, 0x81, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B };
+static const symbol s_2_76[15] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA5, 0x81, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0x9B };
+static const symbol s_2_77[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0x9B };
+static const symbol s_2_78[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0x9B };
+static const symbol s_2_79[6] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B };
+static const symbol s_2_80[6] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B };
+static const symbol s_2_81[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
+static const symbol s_2_82[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
+static const symbol s_2_83[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
+static const symbol s_2_84[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
+static const symbol s_2_85[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
+static const symbol s_2_86[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBE };
+static const symbol s_2_87[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBE };
+static const symbol s_2_88[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBE };
+static const symbol s_2_89[12] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x96, 0xE0, 0xA4, 0xBF };
+static const symbol s_2_90[12] = { 0xE0, 0xA4, 0xAE, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF };
+
+static const struct among a_2[91] =
+{
+/*  0 */ { 9, s_2_0, -1, 1, 0},
+/*  1 */ { 9, s_2_1, -1, 1, 0},
+/*  2 */ { 12, s_2_2, 1, 1, 0},
+/*  3 */ { 12, s_2_3, 1, 1, 0},
+/*  4 */ { 12, s_2_4, -1, 1, 0},
+/*  5 */ { 6, s_2_5, -1, 1, 0},
+/*  6 */ { 6, s_2_6, -1, 1, 0},
+/*  7 */ { 6, s_2_7, -1, 1, 0},
+/*  8 */ { 9, s_2_8, 7, 1, 0},
+/*  9 */ { 12, s_2_9, 8, 1, 0},
+/* 10 */ { 9, s_2_10, 7, 1, 0},
+/* 11 */ { 6, s_2_11, -1, 1, 0},
+/* 12 */ { 9, s_2_12, -1, 1, 0},
+/* 13 */ { 9, s_2_13, -1, 1, 0},
+/* 14 */ { 6, s_2_14, -1, 1, 0},
+/* 15 */ { 6, s_2_15, -1, 1, 0},
+/* 16 */ { 6, s_2_16, -1, 1, 0},
+/* 17 */ { 9, s_2_17, -1, 1, 0},
+/* 18 */ { 12, s_2_18, 17, 1, 0},
+/* 19 */ { 9, s_2_19, -1, 1, 0},
+/* 20 */ { 6, s_2_20, -1, 1, 0},
+/* 21 */ { 9, s_2_21, 20, 1, 0},
+/* 22 */ { 9, s_2_22, 20, 1, 0},
+/* 23 */ { 9, s_2_23, -1, 1, 0},
+/* 24 */ { 12, s_2_24, 23, 1, 0},
+/* 25 */ { 9, s_2_25, -1, 1, 0},
+/* 26 */ { 12, s_2_26, 25, 1, 0},
+/* 27 */ { 12, s_2_27, 25, 1, 0},
+/* 28 */ { 6, s_2_28, -1, 1, 0},
+/* 29 */ { 9, s_2_29, 28, 1, 0},
+/* 30 */ { 9, s_2_30, 28, 1, 0},
+/* 31 */ { 6, s_2_31, -1, 1, 0},
+/* 32 */ { 9, s_2_32, 31, 1, 0},
+/* 33 */ { 12, s_2_33, 31, 1, 0},
+/* 34 */ { 9, s_2_34, 31, 1, 0},
+/* 35 */ { 9, s_2_35, 31, 1, 0},
+/* 36 */ { 12, s_2_36, 35, 1, 0},
+/* 37 */ { 12, s_2_37, 35, 1, 0},
+/* 38 */ { 6, s_2_38, -1, 1, 0},
+/* 39 */ { 9, s_2_39, 38, 1, 0},
+/* 40 */ { 9, s_2_40, 38, 1, 0},
+/* 41 */ { 12, s_2_41, 40, 1, 0},
+/* 42 */ { 9, s_2_42, 38, 1, 0},
+/* 43 */ { 9, s_2_43, 38, 1, 0},
+/* 44 */ { 6, s_2_44, -1, 1, 0},
+/* 45 */ { 12, s_2_45, 44, 1, 0},
+/* 46 */ { 12, s_2_46, 44, 1, 0},
+/* 47 */ { 12, s_2_47, 44, 1, 0},
+/* 48 */ { 9, s_2_48, -1, 1, 0},
+/* 49 */ { 12, s_2_49, 48, 1, 0},
+/* 50 */ { 12, s_2_50, 48, 1, 0},
+/* 51 */ { 15, s_2_51, 50, 1, 0},
+/* 52 */ { 12, s_2_52, 48, 1, 0},
+/* 53 */ { 12, s_2_53, 48, 1, 0},
+/* 54 */ { 12, s_2_54, -1, 1, 0},
+/* 55 */ { 12, s_2_55, -1, 1, 0},
+/* 56 */ { 12, s_2_56, -1, 1, 0},
+/* 57 */ { 9, s_2_57, -1, 1, 0},
+/* 58 */ { 9, s_2_58, -1, 1, 0},
+/* 59 */ { 15, s_2_59, 58, 1, 0},
+/* 60 */ { 12, s_2_60, -1, 1, 0},
+/* 61 */ { 12, s_2_61, -1, 1, 0},
+/* 62 */ { 9, s_2_62, -1, 1, 0},
+/* 63 */ { 12, s_2_63, 62, 1, 0},
+/* 64 */ { 12, s_2_64, 62, 1, 0},
+/* 65 */ { 15, s_2_65, 64, 1, 0},
+/* 66 */ { 12, s_2_66, 62, 1, 0},
+/* 67 */ { 12, s_2_67, 62, 1, 0},
+/* 68 */ { 9, s_2_68, -1, 1, 0},
+/* 69 */ { 12, s_2_69, 68, 1, 0},
+/* 70 */ { 9, s_2_70, -1, 1, 0},
+/* 71 */ { 3, s_2_71, -1, 1, 0},
+/* 72 */ { 6, s_2_72, 71, 1, 0},
+/* 73 */ { 6, s_2_73, 71, 1, 0},
+/* 74 */ { 9, s_2_74, 73, 1, 0},
+/* 75 */ { 15, s_2_75, 74, 1, 0},
+/* 76 */ { 15, s_2_76, 71, 1, 0},
+/* 77 */ { 12, s_2_77, 71, 1, 0},
+/* 78 */ { 12, s_2_78, 71, 1, 0},
+/* 79 */ { 6, s_2_79, 71, 1, 0},
+/* 80 */ { 6, s_2_80, 71, 1, 0},
+/* 81 */ { 9, s_2_81, -1, 1, 0},
+/* 82 */ { 12, s_2_82, 81, 1, 0},
+/* 83 */ { 9, s_2_83, -1, 1, 0},
+/* 84 */ { 12, s_2_84, 83, 1, 0},
+/* 85 */ { 12, s_2_85, 83, 1, 0},
+/* 86 */ { 6, s_2_86, -1, 1, 0},
+/* 87 */ { 9, s_2_87, 86, 1, 0},
+/* 88 */ { 9, s_2_88, 86, 1, 0},
+/* 89 */ { 12, s_2_89, -1, 1, 0},
+/* 90 */ { 12, s_2_90, -1, 1, 0}
+};
+
+static const symbol s_3_0[3] = { 0xE0, 0xA4, 0x81 };
+static const symbol s_3_1[3] = { 0xE0, 0xA4, 0x82 };
+static const symbol s_3_2[3] = { 0xE0, 0xA5, 0x88 };
+
+static const struct among a_3[3] =
+{
+/*  0 */ { 3, s_3_0, -1, 1, 0},
+/*  1 */ { 3, s_3_1, -1, 1, 0},
+/*  2 */ { 3, s_3_2, -1, 2, 0}
+};
+
+static const symbol s_0[] = { 0xE0, 0xA4, 0x8F };
+static const symbol s_1[] = { 0xE0, 0xA5, 0x87 };
+static const symbol s_2[] = { 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
+static const symbol s_3[] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
+static const symbol s_4[] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8C };
+static const symbol s_5[] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x87 };
+static const symbol s_6[] = { 0xE0, 0xA4, 0xA4, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xB0 };
+
+static int r_remove_category_1(struct SN_env * z) { /* backwardmode */
+    int among_var;
+    z->ket = z->c; /* [, line 13 */
+    among_var = find_among_b(z, a_0, 17); /* substring, line 13 */
+    if (!(among_var)) return 0;
+    z->bra = z->c; /* ], line 13 */
+    switch (among_var) { /* among, line 13 */
+        case 0: return 0;
+        case 1:
+            {   int ret = slice_del(z); /* delete, line 17 */
+                if (ret < 0) return ret;
+            }
+            break;
+        case 2:
+            {   int m1 = z->l - z->c; (void)m1; /* or, line 18 */
+                {   int m2 = z->l - z->c; (void)m2; /* or, line 18 */
+                    if (!(eq_s_b(z, 3, s_0))) goto lab3; /* literal, line 18 */
+                    goto lab2;
+                lab3:
+                    z->c = z->l - m2;
+                    if (!(eq_s_b(z, 3, s_1))) goto lab1; /* literal, line 18 */
+                }
+            lab2:
+                goto lab0;
+            lab1:
+                z->c = z->l - m1;
+                {   int ret = slice_del(z); /* delete, line 18 */
+                    if (ret < 0) return ret;
+                }
+            }
+        lab0:
+            break;
+    }
+    return 1;
+}
+
+static int r_check_category_2(struct SN_env * z) { /* backwardmode */
+    z->ket = z->c; /* [, line 23 */
+    if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 4 || !((262 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 23 */
+    if (!(find_among_b(z, a_1, 3))) return 0;
+    z->bra = z->c; /* ], line 23 */
+    return 1;
+}
+
+static int r_remove_category_3(struct SN_env * z) { /* backwardmode */
+    int among_var;
+    z->ket = z->c; /* [, line 29 */
+    among_var = find_among_b(z, a_2, 91); /* substring, line 29 */
+    if (!(among_var)) return 0;
+    z->bra = z->c; /* ], line 29 */
+    switch (among_var) { /* among, line 29 */
+        case 0: return 0;
+        case 1:
+            {   int ret = slice_del(z); /* delete, line 31 */
+                if (ret < 0) return ret;
+            }
+            break;
+    }
+    return 1;
+}
+
+static int r_remove_category_2(struct SN_env * z) { /* backwardmode */
+    int among_var;
+    z->ket = z->c; /* [, line 37 */
+    if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 4 || !((262 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 37 */
+    among_var = find_among_b(z, a_3, 3);
+    if (!(among_var)) return 0;
+    z->bra = z->c; /* ], line 37 */
+    switch (among_var) { /* among, line 37 */
+        case 0: return 0;
+        case 1:
+            {   int m1 = z->l - z->c; (void)m1; /* or, line 38 */
+                if (!(eq_s_b(z, 6, s_2))) goto lab1; /* literal, line 38 */
+                goto lab0;
+            lab1:
+                z->c = z->l - m1;
+                if (!(eq_s_b(z, 6, s_3))) goto lab2; /* literal, line 38 */
+                goto lab0;
+            lab2:
+                z->c = z->l - m1;
+                if (!(eq_s_b(z, 6, s_4))) goto lab3; /* literal, line 38 */
+                goto lab0;
+            lab3:
+                z->c = z->l - m1;
+                if (!(eq_s_b(z, 6, s_5))) return 0; /* literal, line 38 */
+            }
+        lab0:
+            {   int ret = slice_del(z); /* delete, line 38 */
+                if (ret < 0) return ret;
+            }
+            break;
+        case 2:
+            if (!(eq_s_b(z, 9, s_6))) return 0; /* literal, line 39 */
+            {   int ret = slice_del(z); /* delete, line 39 */
+                if (ret < 0) return ret;
+            }
+            break;
+    }
+    return 1;
+}
+
+extern int nepali_UTF_8_stem(struct SN_env * z) { /* forwardmode */
+    z->lb = z->c; z->c = z->l; /* backwards, line 46 */
+
+    {   int m1 = z->l - z->c; (void)m1; /* do, line 47 */
+        {   int ret = r_remove_category_1(z); /* call remove_category_1, line 47 */
+            if (ret == 0) goto lab0;
+            if (ret < 0) return ret;
+        }
+    lab0:
+        z->c = z->l - m1;
+    }
+    {   int m2 = z->l - z->c; (void)m2; /* do, line 48 */
+        while(1) { /* repeat, line 49 */
+            int m3 = z->l - z->c; (void)m3;
+            {   int m4 = z->l - z->c; (void)m4; /* or, line 49 */
+                {   int m5 = z->l - z->c; (void)m5; /* and, line 49 */
+                    {   int ret = r_check_category_2(z); /* call check_category_2, line 49 */
+                        if (ret == 0) goto lab4;
+                        if (ret < 0) return ret;
+                    }
+                    z->c = z->l - m5;
+                    {   int ret = r_remove_category_2(z); /* call remove_category_2, line 49 */
+                        if (ret == 0) goto lab4;
+                        if (ret < 0) return ret;
+                    }
+                    z->c = z->l - m5;
+                    {   int ret = r_remove_category_3(z); /* call remove_category_3, line 49 */
+                        if (ret == 0) goto lab4;
+                        if (ret < 0) return ret;
+                    }
+                }
+                goto lab3;
+            lab4:
+                z->c = z->l - m4;
+                {   int ret = r_remove_category_3(z); /* call remove_category_3, line 49 */
+                    if (ret == 0) goto lab2;
+                    if (ret < 0) return ret;
+                }
+            }
+        lab3:
+            continue;
+        lab2:
+            z->c = z->l - m3;
+            break;
+        }
+        z->c = z->l - m2;
+    }
+    z->c = z->lb;
+    return 1;
+}
+
+extern struct SN_env * nepali_UTF_8_create_env(void) { return SN_create_env(0, 0, 0); }
+
+extern void nepali_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
+
diff --git a/src/backend/snowball/stopwords/nepali.stop b/src/backend/snowball/stopwords/nepali.stop
new file mode 100644
index 0000000000..42e24a5959
--- /dev/null
+++ b/src/backend/snowball/stopwords/nepali.stop
@@ -0,0 +1,304 @@
+अक्सर
+अगाडि
+अगाडी
+अझै
+अनुसार
+अन्तर्गत
+अन्य
+अन्यथा
+अब
+अरु
+अरू
+अर्का
+अर्की
+अर्को
+अर्थात
+अर्थात्
+अर्ब
+अलग
+अलिकति
+असार
+आइतवार
+आए
+आज
+आठ
+आत्म
+आदि
+आफू
+आफ्नै
+आफ्नो
+आयो
+आश्विन
+उदाहरण
+उन
+उप
+उही
+एउटै
+एक
+एकदम
+एकै
+ओठ
+औं
+कति
+कतै
+कत्रा
+कत्री
+कत्रो
+करोड
+कस
+कसरी
+कसै
+कस्ता
+कस्ती
+कस्तो
+कहिल्यै
+कहीं
+का
+कार्तिक
+कि
+किन
+किनभने
+कुन
+कुनै
+कुरा
+कृपया
+के
+केहि
+केही
+को
+कोही
+क्रमशः
+खर्ब
+गयौ
+चाँडै
+चार
+चाले
+चाहनुहुन्छ
+चाहन्छु
+चाहिए
+चैत
+चौथो
+छ
+छन्
+छु
+छू
+छैन
+छौँ
+छौं
+जताततै
+जति
+जत्रा
+जत्री
+जत्रो
+जब
+जबकि
+जस
+जस्ता
+जस्ती
+जस्तो
+जस्तोसुकै
+जहाँ
+जान
+जाहिर
+जुन
+जे
+जेठ
+जो
+जोसुकै
+ठीक
+त
+तत्काल
+तथा
+तदनुसार
+तपाई
+तपाईं
+तर
+तल
+तापनि
+तापनी
+तिन
+तिनी
+तिमी
+तिर
+ती
+तीन
+तुरुन्तै
+तेस्कारण
+तेस्रो
+त्यसकारण
+त्यसपछि
+त्यसमा
+त्यसैले
+त्यहाँ
+त्यो
+त्सपछि
+त्सैले
+थिए
+थिएन
+थिएनन्
+थियो
+थोरै
+दस
+दिए
+दिनुभएको
+दिनुहुन्छ
+दुई
+देख
+देखि
+देखिन्छ
+देखियो
+देखे
+देखेको
+देखेर
+देख्न
+दोश्रो
+दोस्रो
+धेरै
+न
+नजिकै
+नत्र
+नयाँ
+नि
+निम्ति
+निम्न
+निम्नानुसार
+निर्दिष्ट
+नै
+नौ
+पक्का
+पक्कै
+पछि
+पछिल्लो
+पटक
+पनि
+पर्छ
+पर्थ्यो
+पर्याप्त
+पर्सी
+पहिले
+पहिलो
+पहिल्यै
+पाँच
+पाँचौं
+पूर्व
+पौष
+प्रति
+प्रतेक
+प्रत्येक
+प्रथम
+प्लस
+फागुन
+फेरि
+फेरी
+बने
+बन्द
+बन्न
+बरु
+बाटो
+बारे
+बाहिर
+बाहेक
+बिरुद्ध
+बिशेष
+बिहिवार
+बीच
+बुधवार
+भए
+भदौ
+भन्
+भर
+भित्र
+भित्री
+भोलि
+भोली
+म
+मंसिर
+मङ्गलवार
+महिना
+मा
+माघ
+मात्र
+माथि
+मुख्य
+मेरो
+यति
+यत्ति
+यत्रा
+यत्री
+यत्रो
+यथोचित
+यदि
+यद्यपि
+यस
+यसरी
+यसो
+यस्ता
+यस्ती
+यस्तो
+यहाँ
+या
+यिन
+यिनी
+यी
+यो
+र
+रही
+रहेका
+रहेको
+राखे
+राख्छ
+राम्रो
+रूप
+लगभग
+लाई
+लाख
+लागि
+ले
+वरिपरि
+वरीपरी
+वर्ष
+वास्तवमा
+वाहेक
+विरुद्ध
+विशेष
+वैशाख
+शनिवार
+शायद
+शुक्रवार
+सँग
+सँगै
+संग
+संगै
+सक्छ
+सट्टा
+सधै
+सधैं
+सबै
+समय
+सम्भव
+सम्म
+सय
+सही
+साँच्चै
+साउन
+सात
+साथ
+साथै
+सायद
+सारा
+सुन्ना
+सो
+सोध्न
+सोमवार
+सोही
+स्पष्ट
+हजार
+हप्ता
+हरे
+हरेक
+हामी
+हाम्रो
+हिजो
+हुन्छ
+होला
+होस्
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 2efd3b75b1..17bd1395c9 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -684,6 +684,8 @@ static const struct tsearch_config_match tsearch_config_languages[] =
 	{"hungarian", "Hungarian"},
 	{"italian", "it"},
 	{"italian", "Italian"},
+	{"nepali", "ne"},
+	{"nepali", "Nepali"},
 	{"norwegian", "no"},
 	{"norwegian", "Norwegian"},
 	{"portuguese", "pt"},
diff --git a/src/include/snowball/libstemmer/stem_UTF_8_nepali.h b/src/include/snowball/libstemmer/stem_UTF_8_nepali.h
new file mode 100644
index 0000000000..20b2b919ac
--- /dev/null
+++ b/src/include/snowball/libstemmer/stem_UTF_8_nepali.h
@@ -0,0 +1,16 @@
+/* This file was generated automatically by the Snowball to ISO C compiler */
+/* http://snowballstem.org/ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern struct SN_env * nepali_UTF_8_create_env(void);
+extern void nepali_UTF_8_close_env(struct SN_env * z);
+
+extern int nepali_UTF_8_stem(struct SN_env * z);
+
+#ifdef __cplusplus
+}
+#endif
+
