From 78eecfdd7ef4cc0aef575c828c6fef747c63da19 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Tue, 29 Oct 2013 11:00:37 -0700 Subject: Copy nplm-0.1 after removing some executable bits --- 3rdparty/tclap | 1 + 3rdparty/tclap-1.2.1/include/Makefile.am | 1 + 3rdparty/tclap-1.2.1/include/Makefile.in | 460 + 3rdparty/tclap-1.2.1/include/tclap/Arg.h | 692 + 3rdparty/tclap-1.2.1/include/tclap/ArgException.h | 200 + 3rdparty/tclap-1.2.1/include/tclap/ArgTraits.h | 87 + 3rdparty/tclap-1.2.1/include/tclap/CmdLine.h | 633 + .../tclap-1.2.1/include/tclap/CmdLineInterface.h | 150 + 3rdparty/tclap-1.2.1/include/tclap/CmdLineOutput.h | 74 + 3rdparty/tclap-1.2.1/include/tclap/Constraint.h | 68 + 3rdparty/tclap-1.2.1/include/tclap/DocBookOutput.h | 299 + 3rdparty/tclap-1.2.1/include/tclap/HelpVisitor.h | 76 + .../tclap-1.2.1/include/tclap/IgnoreRestVisitor.h | 52 + 3rdparty/tclap-1.2.1/include/tclap/Makefile.am | 28 + 3rdparty/tclap-1.2.1/include/tclap/Makefile.in | 403 + 3rdparty/tclap-1.2.1/include/tclap/MultiArg.h | 433 + .../tclap-1.2.1/include/tclap/MultiSwitchArg.h | 216 + .../include/tclap/OptionalUnlabeledTracker.h | 62 + .../tclap-1.2.1/include/tclap/StandardTraits.h | 208 + 3rdparty/tclap-1.2.1/include/tclap/StdOutput.h | 298 + 3rdparty/tclap-1.2.1/include/tclap/SwitchArg.h | 266 + .../tclap-1.2.1/include/tclap/UnlabeledMultiArg.h | 301 + .../tclap-1.2.1/include/tclap/UnlabeledValueArg.h | 340 + 3rdparty/tclap-1.2.1/include/tclap/ValueArg.h | 425 + .../tclap-1.2.1/include/tclap/ValuesConstraint.h | 148 + .../tclap-1.2.1/include/tclap/VersionVisitor.h | 81 + 3rdparty/tclap-1.2.1/include/tclap/Visitor.h | 53 + 3rdparty/tclap-1.2.1/include/tclap/XorHandler.h | 166 + .../include/tclap/ZshCompletionOutput.h | 323 + LICENSE | 20 + README.md | 188 +- example/Makefile | 13 + example/pg8800.txt | 15952 +++++++++++++++++++ example/preprocess.pl | 16 + example/train_ngram.sh | 38 + python/nplm.py | 188 + python/prepareNeuralLM.py | 80 + python/testNeuralLM.py | 25 + python/vocab.py | 33 + src/Activation_function.h | 119 + src/Makefile | 175 + src/SoftmaxLoss.h | 136 + src/USCMatrix.h | 192 + src/graphClasses.h | 60 + src/maybe_omp.h | 13 + src/model.cpp | 246 + src/model.h | 105 + src/multinomial.h | 135 + src/neuralClasses.h | 520 + src/neuralLM.cpp | 1 + src/neuralLM.h | 350 + src/param.h | 58 + src/prepareNeuralLM.cpp | 246 + src/prepareNeuralTM.cpp | 396 + src/propagator.h | 194 + src/python/nplm.pxd | 23 + src/python/nplm.pyx | 38 + src/shared/.gitignore | 0 src/testNeuralLM.cpp | 164 + src/testNeuralNetwork.cpp | 119 + src/trainNeuralNetwork.cpp | 584 + src/util.cpp | 213 + src/util.h | 219 + src/vocabulary.h | 84 + 64 files changed, 27484 insertions(+), 3 deletions(-) create mode 120000 3rdparty/tclap create mode 100644 3rdparty/tclap-1.2.1/include/Makefile.am create mode 100644 3rdparty/tclap-1.2.1/include/Makefile.in create mode 100644 3rdparty/tclap-1.2.1/include/tclap/Arg.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/ArgException.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/ArgTraits.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/CmdLine.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/CmdLineInterface.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/CmdLineOutput.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/Constraint.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/DocBookOutput.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/HelpVisitor.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/IgnoreRestVisitor.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/Makefile.am create mode 100644 3rdparty/tclap-1.2.1/include/tclap/Makefile.in create mode 100644 3rdparty/tclap-1.2.1/include/tclap/MultiArg.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/MultiSwitchArg.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/OptionalUnlabeledTracker.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/StandardTraits.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/StdOutput.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/SwitchArg.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/UnlabeledMultiArg.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/UnlabeledValueArg.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/ValueArg.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/ValuesConstraint.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/VersionVisitor.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/Visitor.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/XorHandler.h create mode 100644 3rdparty/tclap-1.2.1/include/tclap/ZshCompletionOutput.h create mode 100644 LICENSE create mode 100644 example/Makefile create mode 100644 example/pg8800.txt create mode 100755 example/preprocess.pl create mode 100755 example/train_ngram.sh create mode 100755 python/nplm.py create mode 100755 python/prepareNeuralLM.py create mode 100755 python/testNeuralLM.py create mode 100755 python/vocab.py create mode 100644 src/Activation_function.h create mode 100644 src/Makefile create mode 100644 src/SoftmaxLoss.h create mode 100644 src/USCMatrix.h create mode 100644 src/graphClasses.h create mode 100644 src/maybe_omp.h create mode 100644 src/model.cpp create mode 100644 src/model.h create mode 100644 src/multinomial.h create mode 100644 src/neuralClasses.h create mode 100644 src/neuralLM.cpp create mode 100644 src/neuralLM.h create mode 100644 src/param.h create mode 100644 src/prepareNeuralLM.cpp create mode 100644 src/prepareNeuralTM.cpp create mode 100644 src/propagator.h create mode 100644 src/python/nplm.pxd create mode 100644 src/python/nplm.pyx create mode 100755 src/shared/.gitignore create mode 100644 src/testNeuralLM.cpp create mode 100644 src/testNeuralNetwork.cpp create mode 100644 src/trainNeuralNetwork.cpp create mode 100644 src/util.cpp create mode 100644 src/util.h create mode 100644 src/vocabulary.h diff --git a/3rdparty/tclap b/3rdparty/tclap new file mode 120000 index 0000000..e9145e6 --- /dev/null +++ b/3rdparty/tclap @@ -0,0 +1 @@ +tclap-1.2.1/ \ No newline at end of file diff --git a/3rdparty/tclap-1.2.1/include/Makefile.am b/3rdparty/tclap-1.2.1/include/Makefile.am new file mode 100644 index 0000000..766f299 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = tclap diff --git a/3rdparty/tclap-1.2.1/include/Makefile.in b/3rdparty/tclap-1.2.1/include/Makefile.in new file mode 100644 index 0000000..7c0898f --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/Makefile.in @@ -0,0 +1,460 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = include +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/ac_cxx_have_long_long.m4 \ + $(top_srcdir)/config/ac_cxx_have_sstream.m4 \ + $(top_srcdir)/config/ac_cxx_have_strstream.m4 \ + $(top_srcdir)/config/ac_cxx_namespaces.m4 \ + $(top_srcdir)/config/ac_cxx_warn_effective_cxx.m4 \ + $(top_srcdir)/config/bb_enable_doxygen.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARN_EFFECTIVE_CXX = @WARN_EFFECTIVE_CXX@ +WARN_NO_EFFECTIVE_CXX = @WARN_NO_EFFECTIVE_CXX@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = tclap +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic ctags \ + ctags-recursive distclean distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/3rdparty/tclap-1.2.1/include/tclap/Arg.h b/3rdparty/tclap-1.2.1/include/tclap/Arg.h new file mode 100644 index 0000000..b28eef1 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/Arg.h @@ -0,0 +1,692 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + +/****************************************************************************** + * + * file: Arg.h + * + * Copyright (c) 2003, Michael E. Smoot . + * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno . + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_ARGUMENT_H +#define TCLAP_ARGUMENT_H + +#ifdef HAVE_CONFIG_H +#include +#else +#define HAVE_SSTREAM +#endif + +#include +#include +#include +#include +#include +#include + +#if defined(HAVE_SSTREAM) +#include +typedef std::istringstream istringstream; +#elif defined(HAVE_STRSTREAM) +#include +typedef std::istrstream istringstream; +#else +#error "Need a stringstream (sstream or strstream) to compile!" +#endif + +#include +#include +#include +#include +#include + +namespace TCLAP { + +/** + * A virtual base class that defines the essential data for all arguments. + * This class, or one of its existing children, must be subclassed to do + * anything. + */ +class Arg +{ + private: + /** + * Prevent accidental copying. + */ + Arg(const Arg& rhs); + + /** + * Prevent accidental copying. + */ + Arg& operator=(const Arg& rhs); + + /** + * Indicates whether the rest of the arguments should be ignored. + */ + static bool& ignoreRestRef() { static bool ign = false; return ign; } + + /** + * The delimiter that separates an argument flag/name from the + * value. + */ + static char& delimiterRef() { static char delim = ' '; return delim; } + + protected: + + /** + * The single char flag used to identify the argument. + * This value (preceded by a dash {-}), can be used to identify + * an argument on the command line. The _flag can be blank, + * in fact this is how unlabeled args work. Unlabeled args must + * override appropriate functions to get correct handling. Note + * that the _flag does NOT include the dash as part of the flag. + */ + std::string _flag; + + /** + * A single work namd indentifying the argument. + * This value (preceded by two dashed {--}) can also be used + * to identify an argument on the command line. Note that the + * _name does NOT include the two dashes as part of the _name. The + * _name cannot be blank. + */ + std::string _name; + + /** + * Description of the argument. + */ + std::string _description; + + /** + * Indicating whether the argument is required. + */ + bool _required; + + /** + * Label to be used in usage description. Normally set to + * "required", but can be changed when necessary. + */ + std::string _requireLabel; + + /** + * Indicates whether a value is required for the argument. + * Note that the value may be required but the argument/value + * combination may not be, as specified by _required. + */ + bool _valueRequired; + + /** + * Indicates whether the argument has been set. + * Indicates that a value on the command line has matched the + * name/flag of this argument and the values have been set accordingly. + */ + bool _alreadySet; + + /** + * A pointer to a vistitor object. + * The visitor allows special handling to occur as soon as the + * argument is matched. This defaults to NULL and should not + * be used unless absolutely necessary. + */ + Visitor* _visitor; + + /** + * Whether this argument can be ignored, if desired. + */ + bool _ignoreable; + + /** + * Indicates that the arg was set as part of an XOR and not on the + * command line. + */ + bool _xorSet; + + bool _acceptsMultipleValues; + + /** + * Performs the special handling described by the Vistitor. + */ + void _checkWithVisitor() const; + + /** + * Primary constructor. YOU (yes you) should NEVER construct an Arg + * directly, this is a base class that is extended by various children + * that are meant to be used. Use SwitchArg, ValueArg, MultiArg, + * UnlabeledValueArg, or UnlabeledMultiArg instead. + * + * \param flag - The flag identifying the argument. + * \param name - The name identifying the argument. + * \param desc - The description of the argument, used in the usage. + * \param req - Whether the argument is required. + * \param valreq - Whether the a value is required for the argument. + * \param v - The visitor checked by the argument. Defaults to NULL. + */ + Arg( const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + bool valreq, + Visitor* v = NULL ); + + public: + /** + * Destructor. + */ + virtual ~Arg(); + + /** + * Adds this to the specified list of Args. + * \param argList - The list to add this to. + */ + virtual void addToList( std::list& argList ) const; + + /** + * Begin ignoring arguments since the "--" argument was specified. + */ + static void beginIgnoring() { ignoreRestRef() = true; } + + /** + * Whether to ignore the rest. + */ + static bool ignoreRest() { return ignoreRestRef(); } + + /** + * The delimiter that separates an argument flag/name from the + * value. + */ + static char delimiter() { return delimiterRef(); } + + /** + * The char used as a place holder when SwitchArgs are combined. + * Currently set to the bell char (ASCII 7). + */ + static char blankChar() { return (char)7; } + + /** + * The char that indicates the beginning of a flag. Defaults to '-', but + * clients can define TCLAP_FLAGSTARTCHAR to override. + */ +#ifndef TCLAP_FLAGSTARTCHAR +#define TCLAP_FLAGSTARTCHAR '-' +#endif + static char flagStartChar() { return TCLAP_FLAGSTARTCHAR; } + + /** + * The sting that indicates the beginning of a flag. Defaults to "-", but + * clients can define TCLAP_FLAGSTARTSTRING to override. Should be the same + * as TCLAP_FLAGSTARTCHAR. + */ +#ifndef TCLAP_FLAGSTARTSTRING +#define TCLAP_FLAGSTARTSTRING "-" +#endif + static const std::string flagStartString() { return TCLAP_FLAGSTARTSTRING; } + + /** + * The sting that indicates the beginning of a name. Defaults to "--", but + * clients can define TCLAP_NAMESTARTSTRING to override. + */ +#ifndef TCLAP_NAMESTARTSTRING +#define TCLAP_NAMESTARTSTRING "--" +#endif + static const std::string nameStartString() { return TCLAP_NAMESTARTSTRING; } + + /** + * The name used to identify the ignore rest argument. + */ + static const std::string ignoreNameString() { return "ignore_rest"; } + + /** + * Sets the delimiter for all arguments. + * \param c - The character that delimits flags/names from values. + */ + static void setDelimiter( char c ) { delimiterRef() = c; } + + /** + * Pure virtual method meant to handle the parsing and value assignment + * of the string on the command line. + * \param i - Pointer the the current argument in the list. + * \param args - Mutable list of strings. What is + * passed in from main. + */ + virtual bool processArg(int *i, std::vector& args) = 0; + + /** + * Operator ==. + * Equality operator. Must be virtual to handle unlabeled args. + * \param a - The Arg to be compared to this. + */ + virtual bool operator==(const Arg& a) const; + + /** + * Returns the argument flag. + */ + const std::string& getFlag() const; + + /** + * Returns the argument name. + */ + const std::string& getName() const; + + /** + * Returns the argument description. + */ + std::string getDescription() const; + + /** + * Indicates whether the argument is required. + */ + virtual bool isRequired() const; + + /** + * Sets _required to true. This is used by the XorHandler. + * You really have no reason to ever use it. + */ + void forceRequired(); + + /** + * Sets the _alreadySet value to true. This is used by the XorHandler. + * You really have no reason to ever use it. + */ + void xorSet(); + + /** + * Indicates whether a value must be specified for argument. + */ + bool isValueRequired() const; + + /** + * Indicates whether the argument has already been set. Only true + * if the arg has been matched on the command line. + */ + bool isSet() const; + + /** + * Indicates whether the argument can be ignored, if desired. + */ + bool isIgnoreable() const; + + /** + * A method that tests whether a string matches this argument. + * This is generally called by the processArg() method. This + * method could be re-implemented by a child to change how + * arguments are specified on the command line. + * \param s - The string to be compared to the flag/name to determine + * whether the arg matches. + */ + virtual bool argMatches( const std::string& s ) const; + + /** + * Returns a simple string representation of the argument. + * Primarily for debugging. + */ + virtual std::string toString() const; + + /** + * Returns a short ID for the usage. + * \param valueId - The value used in the id. + */ + virtual std::string shortID( const std::string& valueId = "val" ) const; + + /** + * Returns a long ID for the usage. + * \param valueId - The value used in the id. + */ + virtual std::string longID( const std::string& valueId = "val" ) const; + + /** + * Trims a value off of the flag. + * \param flag - The string from which the flag and value will be + * trimmed. Contains the flag once the value has been trimmed. + * \param value - Where the value trimmed from the string will + * be stored. + */ + virtual void trimFlag( std::string& flag, std::string& value ) const; + + /** + * Checks whether a given string has blank chars, indicating that + * it is a combined SwitchArg. If so, return true, otherwise return + * false. + * \param s - string to be checked. + */ + bool _hasBlanks( const std::string& s ) const; + + /** + * Sets the requireLabel. Used by XorHandler. You shouldn't ever + * use this. + * \param s - Set the requireLabel to this value. + */ + void setRequireLabel( const std::string& s ); + + /** + * Used for MultiArgs and XorHandler to determine whether args + * can still be set. + */ + virtual bool allowMore(); + + /** + * Use by output classes to determine whether an Arg accepts + * multiple values. + */ + virtual bool acceptsMultipleValues(); + + /** + * Clears the Arg object and allows it to be reused by new + * command lines. + */ + virtual void reset(); +}; + +/** + * Typedef of an Arg list iterator. + */ +typedef std::list::iterator ArgListIterator; + +/** + * Typedef of an Arg vector iterator. + */ +typedef std::vector::iterator ArgVectorIterator; + +/** + * Typedef of a Visitor list iterator. + */ +typedef std::list::iterator VisitorListIterator; + +/* + * Extract a value of type T from it's string representation contained + * in strVal. The ValueLike parameter used to select the correct + * specialization of ExtractValue depending on the value traits of T. + * ValueLike traits use operator>> to assign the value from strVal. + */ +template void +ExtractValue(T &destVal, const std::string& strVal, ValueLike vl) +{ + static_cast(vl); // Avoid warning about unused vl + std::istringstream is(strVal); + + int valuesRead = 0; + while ( is.good() ) { + if ( is.peek() != EOF ) +#ifdef TCLAP_SETBASE_ZERO + is >> std::setbase(0) >> destVal; +#else + is >> destVal; +#endif + else + break; + + valuesRead++; + } + + if ( is.fail() ) + throw( ArgParseException("Couldn't read argument value " + "from string '" + strVal + "'")); + + + if ( valuesRead > 1 ) + throw( ArgParseException("More than one valid value parsed from " + "string '" + strVal + "'")); + +} + +/* + * Extract a value of type T from it's string representation contained + * in strVal. The ValueLike parameter used to select the correct + * specialization of ExtractValue depending on the value traits of T. + * StringLike uses assignment (operator=) to assign from strVal. + */ +template void +ExtractValue(T &destVal, const std::string& strVal, StringLike sl) +{ + static_cast(sl); // Avoid warning about unused sl + SetString(destVal, strVal); +} + +////////////////////////////////////////////////////////////////////// +//BEGIN Arg.cpp +////////////////////////////////////////////////////////////////////// + +inline Arg::Arg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + bool valreq, + Visitor* v) : + _flag(flag), + _name(name), + _description(desc), + _required(req), + _requireLabel("required"), + _valueRequired(valreq), + _alreadySet(false), + _visitor( v ), + _ignoreable(true), + _xorSet(false), + _acceptsMultipleValues(false) +{ + if ( _flag.length() > 1 ) + throw(SpecificationException( + "Argument flag can only be one character long", toString() ) ); + + if ( _name != ignoreNameString() && + ( _flag == Arg::flagStartString() || + _flag == Arg::nameStartString() || + _flag == " " ) ) + throw(SpecificationException("Argument flag cannot be either '" + + Arg::flagStartString() + "' or '" + + Arg::nameStartString() + "' or a space.", + toString() ) ); + + if ( ( _name.substr( 0, Arg::flagStartString().length() ) == Arg::flagStartString() ) || + ( _name.substr( 0, Arg::nameStartString().length() ) == Arg::nameStartString() ) || + ( _name.find( " ", 0 ) != std::string::npos ) ) + throw(SpecificationException("Argument name begin with either '" + + Arg::flagStartString() + "' or '" + + Arg::nameStartString() + "' or space.", + toString() ) ); + +} + +inline Arg::~Arg() { } + +inline std::string Arg::shortID( const std::string& valueId ) const +{ + std::string id = ""; + + if ( _flag != "" ) + id = Arg::flagStartString() + _flag; + else + id = Arg::nameStartString() + _name; + + if ( _valueRequired ) + id += std::string( 1, Arg::delimiter() ) + "<" + valueId + ">"; + + if ( !_required ) + id = "[" + id + "]"; + + return id; +} + +inline std::string Arg::longID( const std::string& valueId ) const +{ + std::string id = ""; + + if ( _flag != "" ) + { + id += Arg::flagStartString() + _flag; + + if ( _valueRequired ) + id += std::string( 1, Arg::delimiter() ) + "<" + valueId + ">"; + + id += ", "; + } + + id += Arg::nameStartString() + _name; + + if ( _valueRequired ) + id += std::string( 1, Arg::delimiter() ) + "<" + valueId + ">"; + + return id; + +} + +inline bool Arg::operator==(const Arg& a) const +{ + if ( ( _flag != "" && _flag == a._flag ) || _name == a._name) + return true; + else + return false; +} + +inline std::string Arg::getDescription() const +{ + std::string desc = ""; + if ( _required ) + desc = "(" + _requireLabel + ") "; + +// if ( _valueRequired ) +// desc += "(value required) "; + + desc += _description; + return desc; +} + +inline const std::string& Arg::getFlag() const { return _flag; } + +inline const std::string& Arg::getName() const { return _name; } + +inline bool Arg::isRequired() const { return _required; } + +inline bool Arg::isValueRequired() const { return _valueRequired; } + +inline bool Arg::isSet() const +{ + if ( _alreadySet && !_xorSet ) + return true; + else + return false; +} + +inline bool Arg::isIgnoreable() const { return _ignoreable; } + +inline void Arg::setRequireLabel( const std::string& s) +{ + _requireLabel = s; +} + +inline bool Arg::argMatches( const std::string& argFlag ) const +{ + if ( ( argFlag == Arg::flagStartString() + _flag && _flag != "" ) || + argFlag == Arg::nameStartString() + _name ) + return true; + else + return false; +} + +inline std::string Arg::toString() const +{ + std::string s = ""; + + if ( _flag != "" ) + s += Arg::flagStartString() + _flag + " "; + + s += "(" + Arg::nameStartString() + _name + ")"; + + return s; +} + +inline void Arg::_checkWithVisitor() const +{ + if ( _visitor != NULL ) + _visitor->visit(); +} + +/** + * Implementation of trimFlag. + */ +inline void Arg::trimFlag(std::string& flag, std::string& value) const +{ + int stop = 0; + for ( int i = 0; static_cast(i) < flag.length(); i++ ) + if ( flag[i] == Arg::delimiter() ) + { + stop = i; + break; + } + + if ( stop > 1 ) + { + value = flag.substr(stop+1); + flag = flag.substr(0,stop); + } + +} + +/** + * Implementation of _hasBlanks. + */ +inline bool Arg::_hasBlanks( const std::string& s ) const +{ + for ( int i = 1; static_cast(i) < s.length(); i++ ) + if ( s[i] == Arg::blankChar() ) + return true; + + return false; +} + +inline void Arg::forceRequired() +{ + _required = true; +} + +inline void Arg::xorSet() +{ + _alreadySet = true; + _xorSet = true; +} + +/** + * Overridden by Args that need to added to the end of the list. + */ +inline void Arg::addToList( std::list& argList ) const +{ + argList.push_front( const_cast(this) ); +} + +inline bool Arg::allowMore() +{ + return false; +} + +inline bool Arg::acceptsMultipleValues() +{ + return _acceptsMultipleValues; +} + +inline void Arg::reset() +{ + _xorSet = false; + _alreadySet = false; +} + +////////////////////////////////////////////////////////////////////// +//END Arg.cpp +////////////////////////////////////////////////////////////////////// + +} //namespace TCLAP + +#endif + diff --git a/3rdparty/tclap-1.2.1/include/tclap/ArgException.h b/3rdparty/tclap-1.2.1/include/tclap/ArgException.h new file mode 100644 index 0000000..3411aa9 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/ArgException.h @@ -0,0 +1,200 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + +/****************************************************************************** + * + * file: ArgException.h + * + * Copyright (c) 2003, Michael E. Smoot . + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_ARG_EXCEPTION_H +#define TCLAP_ARG_EXCEPTION_H + +#include +#include + +namespace TCLAP { + +/** + * A simple class that defines and argument exception. Should be caught + * whenever a CmdLine is created and parsed. + */ +class ArgException : public std::exception +{ + public: + + /** + * Constructor. + * \param text - The text of the exception. + * \param id - The text identifying the argument source. + * \param td - Text describing the type of ArgException it is. + * of the exception. + */ + ArgException( const std::string& text = "undefined exception", + const std::string& id = "undefined", + const std::string& td = "Generic ArgException") + : std::exception(), + _errorText(text), + _argId( id ), + _typeDescription(td) + { } + + /** + * Destructor. + */ + virtual ~ArgException() throw() { } + + /** + * Returns the error text. + */ + std::string error() const { return ( _errorText ); } + + /** + * Returns the argument id. + */ + std::string argId() const + { + if ( _argId == "undefined" ) + return " "; + else + return ( "Argument: " + _argId ); + } + + /** + * Returns the arg id and error text. + */ + const char* what() const throw() + { + static std::string ex; + ex = _argId + " -- " + _errorText; + return ex.c_str(); + } + + /** + * Returns the type of the exception. Used to explain and distinguish + * between different child exceptions. + */ + std::string typeDescription() const + { + return _typeDescription; + } + + + private: + + /** + * The text of the exception message. + */ + std::string _errorText; + + /** + * The argument related to this exception. + */ + std::string _argId; + + /** + * Describes the type of the exception. Used to distinguish + * between different child exceptions. + */ + std::string _typeDescription; + +}; + +/** + * Thrown from within the child Arg classes when it fails to properly + * parse the argument it has been passed. + */ +class ArgParseException : public ArgException +{ + public: + /** + * Constructor. + * \param text - The text of the exception. + * \param id - The text identifying the argument source + * of the exception. + */ + ArgParseException( const std::string& text = "undefined exception", + const std::string& id = "undefined" ) + : ArgException( text, + id, + std::string( "Exception found while parsing " ) + + std::string( "the value the Arg has been passed." )) + { } +}; + +/** + * Thrown from CmdLine when the arguments on the command line are not + * properly specified, e.g. too many arguments, required argument missing, etc. + */ +class CmdLineParseException : public ArgException +{ + public: + /** + * Constructor. + * \param text - The text of the exception. + * \param id - The text identifying the argument source + * of the exception. + */ + CmdLineParseException( const std::string& text = "undefined exception", + const std::string& id = "undefined" ) + : ArgException( text, + id, + std::string( "Exception found when the values ") + + std::string( "on the command line do not meet ") + + std::string( "the requirements of the defined ") + + std::string( "Args." )) + { } +}; + +/** + * Thrown from Arg and CmdLine when an Arg is improperly specified, e.g. + * same flag as another Arg, same name, etc. + */ +class SpecificationException : public ArgException +{ + public: + /** + * Constructor. + * \param text - The text of the exception. + * \param id - The text identifying the argument source + * of the exception. + */ + SpecificationException( const std::string& text = "undefined exception", + const std::string& id = "undefined" ) + : ArgException( text, + id, + std::string("Exception found when an Arg object ")+ + std::string("is improperly defined by the ") + + std::string("developer." )) + { } + +}; + +class ExitException { +public: + ExitException(int estat) : _estat(estat) {} + + int getExitStatus() const { return _estat; } + +private: + int _estat; +}; + +} // namespace TCLAP + +#endif + diff --git a/3rdparty/tclap-1.2.1/include/tclap/ArgTraits.h b/3rdparty/tclap-1.2.1/include/tclap/ArgTraits.h new file mode 100644 index 0000000..0b2c18f --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/ArgTraits.h @@ -0,0 +1,87 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + +/****************************************************************************** + * + * file: ArgTraits.h + * + * Copyright (c) 2007, Daniel Aarno, Michael E. Smoot . + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +// This is an internal tclap file, you should probably not have to +// include this directly + +#ifndef TCLAP_ARGTRAITS_H +#define TCLAP_ARGTRAITS_H + +namespace TCLAP { + +// We use two empty structs to get compile type specialization +// function to work + +/** + * A value like argument value type is a value that can be set using + * operator>>. This is the default value type. + */ +struct ValueLike { + typedef ValueLike ValueCategory; + virtual ~ValueLike() {} +}; + +/** + * A string like argument value type is a value that can be set using + * operator=(string). Usefull if the value type contains spaces which + * will be broken up into individual tokens by operator>>. + */ +struct StringLike { + virtual ~StringLike() {} +}; + +/** + * A class can inherit from this object to make it have string like + * traits. This is a compile time thing and does not add any overhead + * to the inherenting class. + */ +struct StringLikeTrait { + typedef StringLike ValueCategory; + virtual ~StringLikeTrait() {} +}; + +/** + * A class can inherit from this object to make it have value like + * traits. This is a compile time thing and does not add any overhead + * to the inherenting class. + */ +struct ValueLikeTrait { + typedef ValueLike ValueCategory; + virtual ~ValueLikeTrait() {} +}; + +/** + * Arg traits are used to get compile type specialization when parsing + * argument values. Using an ArgTraits you can specify the way that + * values gets assigned to any particular type during parsing. The two + * supported types are StringLike and ValueLike. + */ +template +struct ArgTraits { + typedef typename T::ValueCategory ValueCategory; + virtual ~ArgTraits() {} + //typedef ValueLike ValueCategory; +}; + +#endif + +} // namespace diff --git a/3rdparty/tclap-1.2.1/include/tclap/CmdLine.h b/3rdparty/tclap-1.2.1/include/tclap/CmdLine.h new file mode 100644 index 0000000..0fec8d8 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/CmdLine.h @@ -0,0 +1,633 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + +/****************************************************************************** + * + * file: CmdLine.h + * + * Copyright (c) 2003, Michael E. Smoot . + * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_CMDLINE_H +#define TCLAP_CMDLINE_H + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include // Needed for exit(), which isn't defined in some envs. + +namespace TCLAP { + +template void DelPtr(T ptr) +{ + delete ptr; +} + +template void ClearContainer(C &c) +{ + typedef typename C::value_type value_type; + std::for_each(c.begin(), c.end(), DelPtr); + c.clear(); +} + + +/** + * The base class that manages the command line definition and passes + * along the parsing to the appropriate Arg classes. + */ +class CmdLine : public CmdLineInterface +{ + protected: + + /** + * The list of arguments that will be tested against the + * command line. + */ + std::list _argList; + + /** + * The name of the program. Set to argv[0]. + */ + std::string _progName; + + /** + * A message used to describe the program. Used in the usage output. + */ + std::string _message; + + /** + * The version to be displayed with the --version switch. + */ + std::string _version; + + /** + * The number of arguments that are required to be present on + * the command line. This is set dynamically, based on the + * Args added to the CmdLine object. + */ + int _numRequired; + + /** + * The character that is used to separate the argument flag/name + * from the value. Defaults to ' ' (space). + */ + char _delimiter; + + /** + * The handler that manages xoring lists of args. + */ + XorHandler _xorHandler; + + /** + * A list of Args to be explicitly deleted when the destructor + * is called. At the moment, this only includes the three default + * Args. + */ + std::list _argDeleteOnExitList; + + /** + * A list of Visitors to be explicitly deleted when the destructor + * is called. At the moment, these are the Vistors created for the + * default Args. + */ + std::list _visitorDeleteOnExitList; + + /** + * Object that handles all output for the CmdLine. + */ + CmdLineOutput* _output; + + /** + * Should CmdLine handle parsing exceptions internally? + */ + bool _handleExceptions; + + /** + * Throws an exception listing the missing args. + */ + void missingArgsException(); + + /** + * Checks whether a name/flag string matches entirely matches + * the Arg::blankChar. Used when multiple switches are combined + * into a single argument. + * \param s - The message to be used in the usage. + */ + bool _emptyCombined(const std::string& s); + + /** + * Perform a delete ptr; operation on ptr when this object is deleted. + */ + void deleteOnExit(Arg* ptr); + + /** + * Perform a delete ptr; operation on ptr when this object is deleted. + */ + void deleteOnExit(Visitor* ptr); + +private: + + /** + * Prevent accidental copying. + */ + CmdLine(const CmdLine& rhs); + CmdLine& operator=(const CmdLine& rhs); + + /** + * Encapsulates the code common to the constructors + * (which is all of it). + */ + void _constructor(); + + + /** + * Is set to true when a user sets the output object. We use this so + * that we don't delete objects that are created outside of this lib. + */ + bool _userSetOutput; + + /** + * Whether or not to automatically create help and version switches. + */ + bool _helpAndVersion; + + public: + + /** + * Command line constructor. Defines how the arguments will be + * parsed. + * \param message - The message to be used in the usage + * output. + * \param delimiter - The character that is used to separate + * the argument flag/name from the value. Defaults to ' ' (space). + * \param version - The version number to be used in the + * --version switch. + * \param helpAndVersion - Whether or not to create the Help and + * Version switches. Defaults to true. + */ + CmdLine(const std::string& message, + const char delimiter = ' ', + const std::string& version = "none", + bool helpAndVersion = true); + + /** + * Deletes any resources allocated by a CmdLine object. + */ + virtual ~CmdLine(); + + /** + * Adds an argument to the list of arguments to be parsed. + * \param a - Argument to be added. + */ + void add( Arg& a ); + + /** + * An alternative add. Functionally identical. + * \param a - Argument to be added. + */ + void add( Arg* a ); + + /** + * Add two Args that will be xor'd. If this method is used, add does + * not need to be called. + * \param a - Argument to be added and xor'd. + * \param b - Argument to be added and xor'd. + */ + void xorAdd( Arg& a, Arg& b ); + + /** + * Add a list of Args that will be xor'd. If this method is used, + * add does not need to be called. + * \param xors - List of Args to be added and xor'd. + */ + void xorAdd( std::vector& xors ); + + /** + * Parses the command line. + * \param argc - Number of arguments. + * \param argv - Array of arguments. + */ + void parse(int argc, const char * const * argv); + + /** + * Parses the command line. + * \param args - A vector of strings representing the args. + * args[0] is still the program name. + */ + void parse(std::vector& args); + + /** + * + */ + CmdLineOutput* getOutput(); + + /** + * + */ + void setOutput(CmdLineOutput* co); + + /** + * + */ + std::string& getVersion(); + + /** + * + */ + std::string& getProgramName(); + + /** + * + */ + std::list& getArgList(); + + /** + * + */ + XorHandler& getXorHandler(); + + /** + * + */ + char getDelimiter(); + + /** + * + */ + std::string& getMessage(); + + /** + * + */ + bool hasHelpAndVersion(); + + /** + * Disables or enables CmdLine's internal parsing exception handling. + * + * @param state Should CmdLine handle parsing exceptions internally? + */ + void setExceptionHandling(const bool state); + + /** + * Returns the current state of the internal exception handling. + * + * @retval true Parsing exceptions are handled internally. + * @retval false Parsing exceptions are propagated to the caller. + */ + bool getExceptionHandling() const; + + /** + * Allows the CmdLine object to be reused. + */ + void reset(); + +}; + + +/////////////////////////////////////////////////////////////////////////////// +//Begin CmdLine.cpp +/////////////////////////////////////////////////////////////////////////////// + +inline CmdLine::CmdLine(const std::string& m, + char delim, + const std::string& v, + bool help ) + : + _argList(std::list()), + _progName("not_set_yet"), + _message(m), + _version(v), + _numRequired(0), + _delimiter(delim), + _xorHandler(XorHandler()), + _argDeleteOnExitList(std::list()), + _visitorDeleteOnExitList(std::list()), + _output(0), + _handleExceptions(true), + _userSetOutput(false), + _helpAndVersion(help) +{ + _constructor(); +} + +inline CmdLine::~CmdLine() +{ + ClearContainer(_argDeleteOnExitList); + ClearContainer(_visitorDeleteOnExitList); + + if ( !_userSetOutput ) { + delete _output; + _output = 0; + } +} + +inline void CmdLine::_constructor() +{ + _output = new StdOutput; + + Arg::setDelimiter( _delimiter ); + + Visitor* v; + + if ( _helpAndVersion ) + { + v = new HelpVisitor( this, &_output ); + SwitchArg* help = new SwitchArg("h","help", + "Displays usage information and exits.", + false, v); + add( help ); + deleteOnExit(help); + deleteOnExit(v); + + v = new VersionVisitor( this, &_output ); + SwitchArg* vers = new SwitchArg("","version", + "Displays version information and exits.", + false, v); + add( vers ); + deleteOnExit(vers); + deleteOnExit(v); + } + + v = new IgnoreRestVisitor(); + SwitchArg* ignore = new SwitchArg(Arg::flagStartString(), + Arg::ignoreNameString(), + "Ignores the rest of the labeled arguments following this flag.", + false, v); + add( ignore ); + deleteOnExit(ignore); + deleteOnExit(v); +} + +inline void CmdLine::xorAdd( std::vector& ors ) +{ + _xorHandler.add( ors ); + + for (ArgVectorIterator it = ors.begin(); it != ors.end(); it++) + { + (*it)->forceRequired(); + (*it)->setRequireLabel( "OR required" ); + add( *it ); + } +} + +inline void CmdLine::xorAdd( Arg& a, Arg& b ) +{ + std::vector ors; + ors.push_back( &a ); + ors.push_back( &b ); + xorAdd( ors ); +} + +inline void CmdLine::add( Arg& a ) +{ + add( &a ); +} + +inline void CmdLine::add( Arg* a ) +{ + for( ArgListIterator it = _argList.begin(); it != _argList.end(); it++ ) + if ( *a == *(*it) ) + throw( SpecificationException( + "Argument with same flag/name already exists!", + a->longID() ) ); + + a->addToList( _argList ); + + if ( a->isRequired() ) + _numRequired++; +} + + +inline void CmdLine::parse(int argc, const char * const * argv) +{ + // this step is necessary so that we have easy access to + // mutable strings. + std::vector args; + for (int i = 0; i < argc; i++) + args.push_back(argv[i]); + + parse(args); +} + +inline void CmdLine::parse(std::vector& args) +{ + bool shouldExit = false; + int estat = 0; + + try { + _progName = args.front(); + args.erase(args.begin()); + + int requiredCount = 0; + + for (int i = 0; static_cast(i) < args.size(); i++) + { + bool matched = false; + for (ArgListIterator it = _argList.begin(); + it != _argList.end(); it++) { + if ( (*it)->processArg( &i, args ) ) + { + requiredCount += _xorHandler.check( *it ); + matched = true; + break; + } + } + + // checks to see if the argument is an empty combined + // switch and if so, then we've actually matched it + if ( !matched && _emptyCombined( args[i] ) ) + matched = true; + + if ( !matched && !Arg::ignoreRest() ) + throw(CmdLineParseException("Couldn't find match " + "for argument", + args[i])); + } + + if ( requiredCount < _numRequired ) + missingArgsException(); + + if ( requiredCount > _numRequired ) + throw(CmdLineParseException("Too many arguments!")); + + } catch ( ArgException& e ) { + // If we're not handling the exceptions, rethrow. + if ( !_handleExceptions) { + throw; + } + + try { + _output->failure(*this,e); + } catch ( ExitException &ee ) { + estat = ee.getExitStatus(); + shouldExit = true; + } + } catch (ExitException &ee) { + // If we're not handling the exceptions, rethrow. + if ( !_handleExceptions) { + throw; + } + + estat = ee.getExitStatus(); + shouldExit = true; + } + + if (shouldExit) + exit(estat); +} + +inline bool CmdLine::_emptyCombined(const std::string& s) +{ + if ( s.length() > 0 && s[0] != Arg::flagStartChar() ) + return false; + + for ( int i = 1; static_cast(i) < s.length(); i++ ) + if ( s[i] != Arg::blankChar() ) + return false; + + return true; +} + +inline void CmdLine::missingArgsException() +{ + int count = 0; + + std::string missingArgList; + for (ArgListIterator it = _argList.begin(); it != _argList.end(); it++) + { + if ( (*it)->isRequired() && !(*it)->isSet() ) + { + missingArgList += (*it)->getName(); + missingArgList += ", "; + count++; + } + } + missingArgList = missingArgList.substr(0,missingArgList.length()-2); + + std::string msg; + if ( count > 1 ) + msg = "Required arguments missing: "; + else + msg = "Required argument missing: "; + + msg += missingArgList; + + throw(CmdLineParseException(msg)); +} + +inline void CmdLine::deleteOnExit(Arg* ptr) +{ + _argDeleteOnExitList.push_back(ptr); +} + +inline void CmdLine::deleteOnExit(Visitor* ptr) +{ + _visitorDeleteOnExitList.push_back(ptr); +} + +inline CmdLineOutput* CmdLine::getOutput() +{ + return _output; +} + +inline void CmdLine::setOutput(CmdLineOutput* co) +{ + if ( !_userSetOutput ) + delete _output; + _userSetOutput = true; + _output = co; +} + +inline std::string& CmdLine::getVersion() +{ + return _version; +} + +inline std::string& CmdLine::getProgramName() +{ + return _progName; +} + +inline std::list& CmdLine::getArgList() +{ + return _argList; +} + +inline XorHandler& CmdLine::getXorHandler() +{ + return _xorHandler; +} + +inline char CmdLine::getDelimiter() +{ + return _delimiter; +} + +inline std::string& CmdLine::getMessage() +{ + return _message; +} + +inline bool CmdLine::hasHelpAndVersion() +{ + return _helpAndVersion; +} + +inline void CmdLine::setExceptionHandling(const bool state) +{ + _handleExceptions = state; +} + +inline bool CmdLine::getExceptionHandling() const +{ + return _handleExceptions; +} + +inline void CmdLine::reset() +{ + for( ArgListIterator it = _argList.begin(); it != _argList.end(); it++ ) + (*it)->reset(); + + _progName.clear(); +} + +/////////////////////////////////////////////////////////////////////////////// +//End CmdLine.cpp +/////////////////////////////////////////////////////////////////////////////// + + + +} //namespace TCLAP +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/CmdLineInterface.h b/3rdparty/tclap-1.2.1/include/tclap/CmdLineInterface.h new file mode 100644 index 0000000..1b25e9b --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/CmdLineInterface.h @@ -0,0 +1,150 @@ + +/****************************************************************************** + * + * file: CmdLineInterface.h + * + * Copyright (c) 2003, Michael E. Smoot . + * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_COMMANDLINE_INTERFACE_H +#define TCLAP_COMMANDLINE_INTERFACE_H + +#include +#include +#include +#include +#include + + +namespace TCLAP { + +class Arg; +class CmdLineOutput; +class XorHandler; + +/** + * The base class that manages the command line definition and passes + * along the parsing to the appropriate Arg classes. + */ +class CmdLineInterface +{ + public: + + /** + * Destructor + */ + virtual ~CmdLineInterface() {} + + /** + * Adds an argument to the list of arguments to be parsed. + * \param a - Argument to be added. + */ + virtual void add( Arg& a )=0; + + /** + * An alternative add. Functionally identical. + * \param a - Argument to be added. + */ + virtual void add( Arg* a )=0; + + /** + * Add two Args that will be xor'd. + * If this method is used, add does + * not need to be called. + * \param a - Argument to be added and xor'd. + * \param b - Argument to be added and xor'd. + */ + virtual void xorAdd( Arg& a, Arg& b )=0; + + /** + * Add a list of Args that will be xor'd. If this method is used, + * add does not need to be called. + * \param xors - List of Args to be added and xor'd. + */ + virtual void xorAdd( std::vector& xors )=0; + + /** + * Parses the command line. + * \param argc - Number of arguments. + * \param argv - Array of arguments. + */ + virtual void parse(int argc, const char * const * argv)=0; + + /** + * Parses the command line. + * \param args - A vector of strings representing the args. + * args[0] is still the program name. + */ + void parse(std::vector& args); + + /** + * Returns the CmdLineOutput object. + */ + virtual CmdLineOutput* getOutput()=0; + + /** + * \param co - CmdLineOutput object that we want to use instead. + */ + virtual void setOutput(CmdLineOutput* co)=0; + + /** + * Returns the version string. + */ + virtual std::string& getVersion()=0; + + /** + * Returns the program name string. + */ + virtual std::string& getProgramName()=0; + + /** + * Returns the argList. + */ + virtual std::list& getArgList()=0; + + /** + * Returns the XorHandler. + */ + virtual XorHandler& getXorHandler()=0; + + /** + * Returns the delimiter string. + */ + virtual char getDelimiter()=0; + + /** + * Returns the message string. + */ + virtual std::string& getMessage()=0; + + /** + * Indicates whether or not the help and version switches were created + * automatically. + */ + virtual bool hasHelpAndVersion()=0; + + /** + * Resets the instance as if it had just been constructed so that the + * instance can be reused. + */ + virtual void reset()=0; +}; + +} //namespace + + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/CmdLineOutput.h b/3rdparty/tclap-1.2.1/include/tclap/CmdLineOutput.h new file mode 100644 index 0000000..71ee5a3 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/CmdLineOutput.h @@ -0,0 +1,74 @@ + + +/****************************************************************************** + * + * file: CmdLineOutput.h + * + * Copyright (c) 2004, Michael E. Smoot + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_CMDLINEOUTPUT_H +#define TCLAP_CMDLINEOUTPUT_H + +#include +#include +#include +#include +#include +#include + +namespace TCLAP { + +class CmdLineInterface; +class ArgException; + +/** + * The interface that any output object must implement. + */ +class CmdLineOutput +{ + + public: + + /** + * Virtual destructor. + */ + virtual ~CmdLineOutput() {} + + /** + * Generates some sort of output for the USAGE. + * \param c - The CmdLine object the output is generated for. + */ + virtual void usage(CmdLineInterface& c)=0; + + /** + * Generates some sort of output for the version. + * \param c - The CmdLine object the output is generated for. + */ + virtual void version(CmdLineInterface& c)=0; + + /** + * Generates some sort of output for a failure. + * \param c - The CmdLine object the output is generated for. + * \param e - The ArgException that caused the failure. + */ + virtual void failure( CmdLineInterface& c, + ArgException& e )=0; + +}; + +} //namespace TCLAP +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/Constraint.h b/3rdparty/tclap-1.2.1/include/tclap/Constraint.h new file mode 100644 index 0000000..a92acf9 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/Constraint.h @@ -0,0 +1,68 @@ + +/****************************************************************************** + * + * file: Constraint.h + * + * Copyright (c) 2005, Michael E. Smoot + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_CONSTRAINT_H +#define TCLAP_CONSTRAINT_H + +#include +#include +#include +#include +#include +#include + +namespace TCLAP { + +/** + * The interface that defines the interaction between the Arg and Constraint. + */ +template +class Constraint +{ + + public: + /** + * Returns a description of the Constraint. + */ + virtual std::string description() const =0; + + /** + * Returns the short ID for the Constraint. + */ + virtual std::string shortID() const =0; + + /** + * The method used to verify that the value parsed from the command + * line meets the constraint. + * \param value - The value that will be checked. + */ + virtual bool check(const T& value) const =0; + + /** + * Destructor. + * Silences warnings about Constraint being a base class with virtual + * functions but without a virtual destructor. + */ + virtual ~Constraint() { ; } +}; + +} //namespace TCLAP +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/DocBookOutput.h b/3rdparty/tclap-1.2.1/include/tclap/DocBookOutput.h new file mode 100644 index 0000000..a42ca27 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/DocBookOutput.h @@ -0,0 +1,299 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + +/****************************************************************************** + * + * file: DocBookOutput.h + * + * Copyright (c) 2004, Michael E. Smoot + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_DOCBOOKOUTPUT_H +#define TCLAP_DOCBOOKOUTPUT_H + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace TCLAP { + +/** + * A class that generates DocBook output for usage() method for the + * given CmdLine and its Args. + */ +class DocBookOutput : public CmdLineOutput +{ + + public: + + /** + * Prints the usage to stdout. Can be overridden to + * produce alternative behavior. + * \param c - The CmdLine object the output is generated for. + */ + virtual void usage(CmdLineInterface& c); + + /** + * Prints the version to stdout. Can be overridden + * to produce alternative behavior. + * \param c - The CmdLine object the output is generated for. + */ + virtual void version(CmdLineInterface& c); + + /** + * Prints (to stderr) an error message, short usage + * Can be overridden to produce alternative behavior. + * \param c - The CmdLine object the output is generated for. + * \param e - The ArgException that caused the failure. + */ + virtual void failure(CmdLineInterface& c, + ArgException& e ); + + protected: + + /** + * Substitutes the char r for string x in string s. + * \param s - The string to operate on. + * \param r - The char to replace. + * \param x - What to replace r with. + */ + void substituteSpecialChars( std::string& s, char r, std::string& x ); + void removeChar( std::string& s, char r); + void basename( std::string& s ); + + void printShortArg(Arg* it); + void printLongArg(Arg* it); + + char theDelimiter; +}; + + +inline void DocBookOutput::version(CmdLineInterface& _cmd) +{ + std::cout << _cmd.getVersion() << std::endl; +} + +inline void DocBookOutput::usage(CmdLineInterface& _cmd ) +{ + std::list argList = _cmd.getArgList(); + std::string progName = _cmd.getProgramName(); + std::string xversion = _cmd.getVersion(); + theDelimiter = _cmd.getDelimiter(); + XorHandler xorHandler = _cmd.getXorHandler(); + std::vector< std::vector > xorList = xorHandler.getXorList(); + basename(progName); + + std::cout << "" << std::endl; + std::cout << "" << std::endl << std::endl; + + std::cout << "" << std::endl; + + std::cout << "" << std::endl; + std::cout << "" << progName << "" << std::endl; + std::cout << "1" << std::endl; + std::cout << "" << std::endl; + + std::cout << "" << std::endl; + std::cout << "" << progName << "" << std::endl; + std::cout << "" << _cmd.getMessage() << "" << std::endl; + std::cout << "" << std::endl; + + std::cout << "" << std::endl; + std::cout << "" << std::endl; + + std::cout << "" << progName << "" << std::endl; + + // xor + for ( int i = 0; (unsigned int)i < xorList.size(); i++ ) + { + std::cout << "" << std::endl; + for ( ArgVectorIterator it = xorList[i].begin(); + it != xorList[i].end(); it++ ) + printShortArg((*it)); + + std::cout << "" << std::endl; + } + + // rest of args + for (ArgListIterator it = argList.begin(); it != argList.end(); it++) + if ( !xorHandler.contains( (*it) ) ) + printShortArg((*it)); + + std::cout << "" << std::endl; + std::cout << "" << std::endl; + + std::cout << "" << std::endl; + std::cout << "Description" << std::endl; + std::cout << "" << std::endl; + std::cout << _cmd.getMessage() << std::endl; + std::cout << "" << std::endl; + std::cout << "" << std::endl; + + std::cout << "" << std::endl; + std::cout << "Options" << std::endl; + + std::cout << "" << std::endl; + + for (ArgListIterator it = argList.begin(); it != argList.end(); it++) + printLongArg((*it)); + + std::cout << "" << std::endl; + std::cout << "" << std::endl; + + std::cout << "" << std::endl; + std::cout << "Version" << std::endl; + std::cout << "" << std::endl; + std::cout << xversion << std::endl; + std::cout << "" << std::endl; + std::cout << "" << std::endl; + + std::cout << "" << std::endl; + +} + +inline void DocBookOutput::failure( CmdLineInterface& _cmd, + ArgException& e ) +{ + static_cast(_cmd); // unused + std::cout << e.what() << std::endl; + throw ExitException(1); +} + +inline void DocBookOutput::substituteSpecialChars( std::string& s, + char r, + std::string& x ) +{ + size_t p; + while ( (p = s.find_first_of(r)) != std::string::npos ) + { + s.erase(p,1); + s.insert(p,x); + } +} + +inline void DocBookOutput::removeChar( std::string& s, char r) +{ + size_t p; + while ( (p = s.find_first_of(r)) != std::string::npos ) + { + s.erase(p,1); + } +} + +inline void DocBookOutput::basename( std::string& s ) +{ + size_t p = s.find_last_of('/'); + if ( p != std::string::npos ) + { + s.erase(0, p + 1); + } +} + +inline void DocBookOutput::printShortArg(Arg* a) +{ + std::string lt = "<"; + std::string gt = ">"; + + std::string id = a->shortID(); + substituteSpecialChars(id,'<',lt); + substituteSpecialChars(id,'>',gt); + removeChar(id,'['); + removeChar(id,']'); + + std::string choice = "opt"; + if ( a->isRequired() ) + choice = "plain"; + + std::cout << "acceptsMultipleValues() ) + std::cout << " rep='repeat'"; + + + std::cout << '>'; + if ( !a->getFlag().empty() ) + std::cout << a->flagStartChar() << a->getFlag(); + else + std::cout << a->nameStartString() << a->getName(); + if ( a->isValueRequired() ) + { + std::string arg = a->shortID(); + removeChar(arg,'['); + removeChar(arg,']'); + removeChar(arg,'<'); + removeChar(arg,'>'); + arg.erase(0, arg.find_last_of(theDelimiter) + 1); + std::cout << theDelimiter; + std::cout << "" << arg << ""; + } + std::cout << "" << std::endl; + +} + +inline void DocBookOutput::printLongArg(Arg* a) +{ + std::string lt = "<"; + std::string gt = ">"; + + std::string desc = a->getDescription(); + substituteSpecialChars(desc,'<',lt); + substituteSpecialChars(desc,'>',gt); + + std::cout << "" << std::endl; + + if ( !a->getFlag().empty() ) + { + std::cout << "" << std::endl; + std::cout << "" << std::endl; + std::cout << "" << std::endl; + } + + std::cout << "" << std::endl; + std::cout << "" << std::endl; + std::cout << "" << std::endl; + + std::cout << "" << std::endl; + std::cout << "" << std::endl; + std::cout << desc << std::endl; + std::cout << "" << std::endl; + std::cout << "" << std::endl; + + std::cout << "" << std::endl; +} + +} //namespace TCLAP +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/HelpVisitor.h b/3rdparty/tclap-1.2.1/include/tclap/HelpVisitor.h new file mode 100644 index 0000000..cc3bd07 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/HelpVisitor.h @@ -0,0 +1,76 @@ + +/****************************************************************************** + * + * file: HelpVisitor.h + * + * Copyright (c) 2003, Michael E. Smoot . + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_HELP_VISITOR_H +#define TCLAP_HELP_VISITOR_H + +#include +#include +#include + +namespace TCLAP { + +/** + * A Visitor object that calls the usage method of the given CmdLineOutput + * object for the specified CmdLine object. + */ +class HelpVisitor: public Visitor +{ + private: + /** + * Prevent accidental copying. + */ + HelpVisitor(const HelpVisitor& rhs); + HelpVisitor& operator=(const HelpVisitor& rhs); + + protected: + + /** + * The CmdLine the output will be generated for. + */ + CmdLineInterface* _cmd; + + /** + * The output object. + */ + CmdLineOutput** _out; + + public: + + /** + * Constructor. + * \param cmd - The CmdLine the output will be generated for. + * \param out - The type of output. + */ + HelpVisitor(CmdLineInterface* cmd, CmdLineOutput** out) + : Visitor(), _cmd( cmd ), _out( out ) { } + + /** + * Calls the usage method of the CmdLineOutput for the + * specified CmdLine. + */ + void visit() { (*_out)->usage(*_cmd); throw ExitException(0); } + +}; + +} + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/IgnoreRestVisitor.h b/3rdparty/tclap-1.2.1/include/tclap/IgnoreRestVisitor.h new file mode 100644 index 0000000..e328649 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/IgnoreRestVisitor.h @@ -0,0 +1,52 @@ + +/****************************************************************************** + * + * file: IgnoreRestVisitor.h + * + * Copyright (c) 2003, Michael E. Smoot . + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_IGNORE_REST_VISITOR_H +#define TCLAP_IGNORE_REST_VISITOR_H + +#include +#include + +namespace TCLAP { + +/** + * A Vistor that tells the CmdLine to begin ignoring arguments after + * this one is parsed. + */ +class IgnoreRestVisitor: public Visitor +{ + public: + + /** + * Constructor. + */ + IgnoreRestVisitor() : Visitor() {} + + /** + * Sets Arg::_ignoreRest. + */ + void visit() { Arg::beginIgnoring(); } +}; + +} + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/Makefile.am b/3rdparty/tclap-1.2.1/include/tclap/Makefile.am new file mode 100644 index 0000000..0e247bf --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/Makefile.am @@ -0,0 +1,28 @@ + +libtclapincludedir = $(includedir)/tclap + +libtclapinclude_HEADERS = \ + CmdLineInterface.h \ + ArgException.h \ + CmdLine.h \ + XorHandler.h \ + MultiArg.h \ + UnlabeledMultiArg.h \ + ValueArg.h \ + UnlabeledValueArg.h \ + Visitor.h Arg.h \ + HelpVisitor.h \ + SwitchArg.h \ + MultiSwitchArg.h \ + VersionVisitor.h \ + IgnoreRestVisitor.h \ + CmdLineOutput.h \ + StdOutput.h \ + DocBookOutput.h \ + ZshCompletionOutput.h \ + OptionalUnlabeledTracker.h \ + Constraint.h \ + ValuesConstraint.h \ + ArgTraits.h \ + StandardTraits.h + diff --git a/3rdparty/tclap-1.2.1/include/tclap/Makefile.in b/3rdparty/tclap-1.2.1/include/tclap/Makefile.in new file mode 100644 index 0000000..65ef251 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/Makefile.in @@ -0,0 +1,403 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = include/tclap +DIST_COMMON = $(libtclapinclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/ac_cxx_have_long_long.m4 \ + $(top_srcdir)/config/ac_cxx_have_sstream.m4 \ + $(top_srcdir)/config/ac_cxx_have_strstream.m4 \ + $(top_srcdir)/config/ac_cxx_namespaces.m4 \ + $(top_srcdir)/config/ac_cxx_warn_effective_cxx.m4 \ + $(top_srcdir)/config/bb_enable_doxygen.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libtclapincludedir)" +libtclapincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(libtclapinclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARN_EFFECTIVE_CXX = @WARN_EFFECTIVE_CXX@ +WARN_NO_EFFECTIVE_CXX = @WARN_NO_EFFECTIVE_CXX@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libtclapincludedir = $(includedir)/tclap +libtclapinclude_HEADERS = \ + CmdLineInterface.h \ + ArgException.h \ + CmdLine.h \ + XorHandler.h \ + MultiArg.h \ + UnlabeledMultiArg.h \ + ValueArg.h \ + UnlabeledValueArg.h \ + Visitor.h Arg.h \ + HelpVisitor.h \ + SwitchArg.h \ + MultiSwitchArg.h \ + VersionVisitor.h \ + IgnoreRestVisitor.h \ + CmdLineOutput.h \ + StdOutput.h \ + DocBookOutput.h \ + ZshCompletionOutput.h \ + OptionalUnlabeledTracker.h \ + Constraint.h \ + ValuesConstraint.h \ + ArgTraits.h \ + StandardTraits.h + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/tclap/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/tclap/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libtclapincludeHEADERS: $(libtclapinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(libtclapincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libtclapincludedir)" + @list='$(libtclapinclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(libtclapincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libtclapincludedir)/$$f'"; \ + $(libtclapincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libtclapincludedir)/$$f"; \ + done + +uninstall-libtclapincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libtclapinclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(libtclapincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(libtclapincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libtclapincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-libtclapincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libtclapincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + ctags distclean distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libtclapincludeHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + uninstall uninstall-am uninstall-libtclapincludeHEADERS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/3rdparty/tclap-1.2.1/include/tclap/MultiArg.h b/3rdparty/tclap-1.2.1/include/tclap/MultiArg.h new file mode 100644 index 0000000..34bb2d7 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/MultiArg.h @@ -0,0 +1,433 @@ +/****************************************************************************** + * + * file: MultiArg.h + * + * Copyright (c) 2003, Michael E. Smoot . + * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_MULTIPLE_ARGUMENT_H +#define TCLAP_MULTIPLE_ARGUMENT_H + +#include +#include + +#include +#include + +namespace TCLAP { +/** + * An argument that allows multiple values of type T to be specified. Very + * similar to a ValueArg, except a vector of values will be returned + * instead of just one. + */ +template +class MultiArg : public Arg +{ +public: + typedef std::vector container_type; + typedef typename container_type::iterator iterator; + typedef typename container_type::const_iterator const_iterator; + +protected: + + /** + * The list of values parsed from the CmdLine. + */ + std::vector _values; + + /** + * The description of type T to be used in the usage. + */ + std::string _typeDesc; + + /** + * A list of constraint on this Arg. + */ + Constraint* _constraint; + + /** + * Extracts the value from the string. + * Attempts to parse string as type T, if this fails an exception + * is thrown. + * \param val - The string to be read. + */ + void _extractValue( const std::string& val ); + + /** + * Used by XorHandler to decide whether to keep parsing for this arg. + */ + bool _allowMore; + +public: + + /** + * Constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param typeDesc - A short, human readable description of the + * type that this object expects. This is used in the generation + * of the USAGE statement. The goal is to be helpful to the end user + * of the program. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + MultiArg( const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + const std::string& typeDesc, + Visitor* v = NULL); + + /** + * Constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param typeDesc - A short, human readable description of the + * type that this object expects. This is used in the generation + * of the USAGE statement. The goal is to be helpful to the end user + * of the program. + * \param parser - A CmdLine parser object to add this Arg to + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + MultiArg( const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + const std::string& typeDesc, + CmdLineInterface& parser, + Visitor* v = NULL ); + + /** + * Constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param constraint - A pointer to a Constraint object used + * to constrain this Arg. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + MultiArg( const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + Constraint* constraint, + Visitor* v = NULL ); + + /** + * Constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param constraint - A pointer to a Constraint object used + * to constrain this Arg. + * \param parser - A CmdLine parser object to add this Arg to + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + MultiArg( const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + Constraint* constraint, + CmdLineInterface& parser, + Visitor* v = NULL ); + + /** + * Handles the processing of the argument. + * This re-implements the Arg version of this method to set the + * _value of the argument appropriately. It knows the difference + * between labeled and unlabeled. + * \param i - Pointer the the current argument in the list. + * \param args - Mutable list of strings. Passed from main(). + */ + virtual bool processArg(int* i, std::vector& args); + + /** + * Returns a vector of type T containing the values parsed from + * the command line. + */ + const std::vector& getValue(); + + /** + * Returns an iterator over the values parsed from the command + * line. + */ + const_iterator begin() const { return _values.begin(); } + + /** + * Returns the end of the values parsed from the command + * line. + */ + const_iterator end() const { return _values.end(); } + + /** + * Returns the a short id string. Used in the usage. + * \param val - value to be used. + */ + virtual std::string shortID(const std::string& val="val") const; + + /** + * Returns the a long id string. Used in the usage. + * \param val - value to be used. + */ + virtual std::string longID(const std::string& val="val") const; + + /** + * Once we've matched the first value, then the arg is no longer + * required. + */ + virtual bool isRequired() const; + + virtual bool allowMore(); + + virtual void reset(); + +private: + /** + * Prevent accidental copying + */ + MultiArg(const MultiArg& rhs); + MultiArg& operator=(const MultiArg& rhs); + +}; + +template +MultiArg::MultiArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + const std::string& typeDesc, + Visitor* v) : + Arg( flag, name, desc, req, true, v ), + _values(std::vector()), + _typeDesc( typeDesc ), + _constraint( NULL ), + _allowMore(false) +{ + _acceptsMultipleValues = true; +} + +template +MultiArg::MultiArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + const std::string& typeDesc, + CmdLineInterface& parser, + Visitor* v) +: Arg( flag, name, desc, req, true, v ), + _values(std::vector()), + _typeDesc( typeDesc ), + _constraint( NULL ), + _allowMore(false) +{ + parser.add( this ); + _acceptsMultipleValues = true; +} + +/** + * + */ +template +MultiArg::MultiArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + Constraint* constraint, + Visitor* v) +: Arg( flag, name, desc, req, true, v ), + _values(std::vector()), + _typeDesc( constraint->shortID() ), + _constraint( constraint ), + _allowMore(false) +{ + _acceptsMultipleValues = true; +} + +template +MultiArg::MultiArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + Constraint* constraint, + CmdLineInterface& parser, + Visitor* v) +: Arg( flag, name, desc, req, true, v ), + _values(std::vector()), + _typeDesc( constraint->shortID() ), + _constraint( constraint ), + _allowMore(false) +{ + parser.add( this ); + _acceptsMultipleValues = true; +} + +template +const std::vector& MultiArg::getValue() { return _values; } + +template +bool MultiArg::processArg(int *i, std::vector& args) +{ + if ( _ignoreable && Arg::ignoreRest() ) + return false; + + if ( _hasBlanks( args[*i] ) ) + return false; + + std::string flag = args[*i]; + std::string value = ""; + + trimFlag( flag, value ); + + if ( argMatches( flag ) ) + { + if ( Arg::delimiter() != ' ' && value == "" ) + throw( ArgParseException( + "Couldn't find delimiter for this argument!", + toString() ) ); + + // always take the first one, regardless of start string + if ( value == "" ) + { + (*i)++; + if ( static_cast(*i) < args.size() ) + _extractValue( args[*i] ); + else + throw( ArgParseException("Missing a value for this argument!", + toString() ) ); + } + else + _extractValue( value ); + + /* + // continuing taking the args until we hit one with a start string + while ( (unsigned int)(*i)+1 < args.size() && + args[(*i)+1].find_first_of( Arg::flagStartString() ) != 0 && + args[(*i)+1].find_first_of( Arg::nameStartString() ) != 0 ) + _extractValue( args[++(*i)] ); + */ + + _alreadySet = true; + _checkWithVisitor(); + + return true; + } + else + return false; +} + +/** + * + */ +template +std::string MultiArg::shortID(const std::string& val) const +{ + static_cast(val); // Ignore input, don't warn + return Arg::shortID(_typeDesc) + " ... "; +} + +/** + * + */ +template +std::string MultiArg::longID(const std::string& val) const +{ + static_cast(val); // Ignore input, don't warn + return Arg::longID(_typeDesc) + " (accepted multiple times)"; +} + +/** + * Once we've matched the first value, then the arg is no longer + * required. + */ +template +bool MultiArg::isRequired() const +{ + if ( _required ) + { + if ( _values.size() > 1 ) + return false; + else + return true; + } + else + return false; + +} + +template +void MultiArg::_extractValue( const std::string& val ) +{ + try { + T tmp; + ExtractValue(tmp, val, typename ArgTraits::ValueCategory()); + _values.push_back(tmp); + } catch( ArgParseException &e) { + throw ArgParseException(e.error(), toString()); + } + + if ( _constraint != NULL ) + if ( ! _constraint->check( _values.back() ) ) + throw( CmdLineParseException( "Value '" + val + + "' does not meet constraint: " + + _constraint->description(), + toString() ) ); +} + +template +bool MultiArg::allowMore() +{ + bool am = _allowMore; + _allowMore = true; + return am; +} + +template +void MultiArg::reset() +{ + Arg::reset(); + _values.clear(); +} + +} // namespace TCLAP + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/MultiSwitchArg.h b/3rdparty/tclap-1.2.1/include/tclap/MultiSwitchArg.h new file mode 100644 index 0000000..8820b64 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/MultiSwitchArg.h @@ -0,0 +1,216 @@ + +/****************************************************************************** +* +* file: MultiSwitchArg.h +* +* Copyright (c) 2003, Michael E. Smoot . +* Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. +* Copyright (c) 2005, Michael E. Smoot, Daniel Aarno, Erik Zeek. +* All rights reverved. +* +* See the file COPYING in the top directory of this distribution for +* more information. +* +* THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +* +*****************************************************************************/ + + +#ifndef TCLAP_MULTI_SWITCH_ARG_H +#define TCLAP_MULTI_SWITCH_ARG_H + +#include +#include + +#include + +namespace TCLAP { + +/** +* A multiple switch argument. If the switch is set on the command line, then +* the getValue method will return the number of times the switch appears. +*/ +class MultiSwitchArg : public SwitchArg +{ + protected: + + /** + * The value of the switch. + */ + int _value; + + /** + * Used to support the reset() method so that ValueArg can be + * reset to their constructed value. + */ + int _default; + + public: + + /** + * MultiSwitchArg constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param init - Optional. The initial/default value of this Arg. + * Defaults to 0. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + MultiSwitchArg(const std::string& flag, + const std::string& name, + const std::string& desc, + int init = 0, + Visitor* v = NULL); + + + /** + * MultiSwitchArg constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param parser - A CmdLine parser object to add this Arg to + * \param init - Optional. The initial/default value of this Arg. + * Defaults to 0. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + MultiSwitchArg(const std::string& flag, + const std::string& name, + const std::string& desc, + CmdLineInterface& parser, + int init = 0, + Visitor* v = NULL); + + + /** + * Handles the processing of the argument. + * This re-implements the SwitchArg version of this method to set the + * _value of the argument appropriately. + * \param i - Pointer the the current argument in the list. + * \param args - Mutable list of strings. Passed + * in from main(). + */ + virtual bool processArg(int* i, std::vector& args); + + /** + * Returns int, the number of times the switch has been set. + */ + int getValue(); + + /** + * Returns the shortID for this Arg. + */ + std::string shortID(const std::string& val) const; + + /** + * Returns the longID for this Arg. + */ + std::string longID(const std::string& val) const; + + void reset(); + +}; + +////////////////////////////////////////////////////////////////////// +//BEGIN MultiSwitchArg.cpp +////////////////////////////////////////////////////////////////////// +inline MultiSwitchArg::MultiSwitchArg(const std::string& flag, + const std::string& name, + const std::string& desc, + int init, + Visitor* v ) +: SwitchArg(flag, name, desc, false, v), +_value( init ), +_default( init ) +{ } + +inline MultiSwitchArg::MultiSwitchArg(const std::string& flag, + const std::string& name, + const std::string& desc, + CmdLineInterface& parser, + int init, + Visitor* v ) +: SwitchArg(flag, name, desc, false, v), +_value( init ), +_default( init ) +{ + parser.add( this ); +} + +inline int MultiSwitchArg::getValue() { return _value; } + +inline bool MultiSwitchArg::processArg(int *i, std::vector& args) +{ + if ( _ignoreable && Arg::ignoreRest() ) + return false; + + if ( argMatches( args[*i] )) + { + // so the isSet() method will work + _alreadySet = true; + + // Matched argument: increment value. + ++_value; + + _checkWithVisitor(); + + return true; + } + else if ( combinedSwitchesMatch( args[*i] ) ) + { + // so the isSet() method will work + _alreadySet = true; + + // Matched argument: increment value. + ++_value; + + // Check for more in argument and increment value. + while ( combinedSwitchesMatch( args[*i] ) ) + ++_value; + + _checkWithVisitor(); + + return false; + } + else + return false; +} + +inline std::string +MultiSwitchArg::shortID(const std::string& val) const +{ + return Arg::shortID(val) + " ... "; +} + +inline std::string +MultiSwitchArg::longID(const std::string& val) const +{ + return Arg::longID(val) + " (accepted multiple times)"; +} + +inline void +MultiSwitchArg::reset() +{ + MultiSwitchArg::_value = MultiSwitchArg::_default; +} + +////////////////////////////////////////////////////////////////////// +//END MultiSwitchArg.cpp +////////////////////////////////////////////////////////////////////// + +} //namespace TCLAP + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/OptionalUnlabeledTracker.h b/3rdparty/tclap-1.2.1/include/tclap/OptionalUnlabeledTracker.h new file mode 100644 index 0000000..8174c5f --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/OptionalUnlabeledTracker.h @@ -0,0 +1,62 @@ + + +/****************************************************************************** + * + * file: OptionalUnlabeledTracker.h + * + * Copyright (c) 2005, Michael E. Smoot . + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H +#define TCLAP_OPTIONAL_UNLABELED_TRACKER_H + +#include + +namespace TCLAP { + +class OptionalUnlabeledTracker +{ + + public: + + static void check( bool req, const std::string& argName ); + + static void gotOptional() { alreadyOptionalRef() = true; } + + static bool& alreadyOptional() { return alreadyOptionalRef(); } + + private: + + static bool& alreadyOptionalRef() { static bool ct = false; return ct; } +}; + + +inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName ) +{ + if ( OptionalUnlabeledTracker::alreadyOptional() ) + throw( SpecificationException( + "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg", + argName ) ); + + if ( !req ) + OptionalUnlabeledTracker::gotOptional(); +} + + +} // namespace TCLAP + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/StandardTraits.h b/3rdparty/tclap-1.2.1/include/tclap/StandardTraits.h new file mode 100644 index 0000000..46d7f6f --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/StandardTraits.h @@ -0,0 +1,208 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + +/****************************************************************************** + * + * file: StandardTraits.h + * + * Copyright (c) 2007, Daniel Aarno, Michael E. Smoot . + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +// This is an internal tclap file, you should probably not have to +// include this directly + +#ifndef TCLAP_STANDARD_TRAITS_H +#define TCLAP_STANDARD_TRAITS_H + +#ifdef HAVE_CONFIG_H +#include // To check for long long +#endif + +// If Microsoft has already typedef'd wchar_t as an unsigned +// short, then compiles will break because it's as if we're +// creating ArgTraits twice for unsigned short. Thus... +#ifdef _MSC_VER +#ifndef _NATIVE_WCHAR_T_DEFINED +#define TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS +#endif +#endif + +namespace TCLAP { + +// ====================================================================== +// Integer types +// ====================================================================== + +/** + * longs have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +/** + * ints have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +/** + * shorts have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +/** + * chars have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +#ifdef HAVE_LONG_LONG +/** + * long longs have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; +#endif + +// ====================================================================== +// Unsigned integer types +// ====================================================================== + +/** + * unsigned longs have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +/** + * unsigned ints have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +/** + * unsigned shorts have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +/** + * unsigned chars have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +// Microsoft implements size_t awkwardly. +#if defined(_MSC_VER) && defined(_M_X64) +/** + * size_ts have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; +#endif + + +#ifdef HAVE_LONG_LONG +/** + * unsigned long longs have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; +#endif + +// ====================================================================== +// Float types +// ====================================================================== + +/** + * floats have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +/** + * doubles have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + +// ====================================================================== +// Other types +// ====================================================================== + +/** + * bools have value-like semantics. + */ +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; + + +/** + * wchar_ts have value-like semantics. + */ +#ifndef TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS +template<> +struct ArgTraits { + typedef ValueLike ValueCategory; +}; +#endif + +/** + * Strings have string like argument traits. + */ +template<> +struct ArgTraits { + typedef StringLike ValueCategory; +}; + +template +void SetString(T &dst, const std::string &src) +{ + dst = src; +} + +} // namespace + +#endif + diff --git a/3rdparty/tclap-1.2.1/include/tclap/StdOutput.h b/3rdparty/tclap-1.2.1/include/tclap/StdOutput.h new file mode 100644 index 0000000..35f7b99 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/StdOutput.h @@ -0,0 +1,298 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + +/****************************************************************************** + * + * file: StdOutput.h + * + * Copyright (c) 2004, Michael E. Smoot + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_STDCMDLINEOUTPUT_H +#define TCLAP_STDCMDLINEOUTPUT_H + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace TCLAP { + +/** + * A class that isolates any output from the CmdLine object so that it + * may be easily modified. + */ +class StdOutput : public CmdLineOutput +{ + + public: + + /** + * Prints the usage to stdout. Can be overridden to + * produce alternative behavior. + * \param c - The CmdLine object the output is generated for. + */ + virtual void usage(CmdLineInterface& c); + + /** + * Prints the version to stdout. Can be overridden + * to produce alternative behavior. + * \param c - The CmdLine object the output is generated for. + */ + virtual void version(CmdLineInterface& c); + + /** + * Prints (to stderr) an error message, short usage + * Can be overridden to produce alternative behavior. + * \param c - The CmdLine object the output is generated for. + * \param e - The ArgException that caused the failure. + */ + virtual void failure(CmdLineInterface& c, + ArgException& e ); + + protected: + + /** + * Writes a brief usage message with short args. + * \param c - The CmdLine object the output is generated for. + * \param os - The stream to write the message to. + */ + void _shortUsage( CmdLineInterface& c, std::ostream& os ) const; + + /** + * Writes a longer usage message with long and short args, + * provides descriptions and prints message. + * \param c - The CmdLine object the output is generated for. + * \param os - The stream to write the message to. + */ + void _longUsage( CmdLineInterface& c, std::ostream& os ) const; + + /** + * This function inserts line breaks and indents long strings + * according the params input. It will only break lines at spaces, + * commas and pipes. + * \param os - The stream to be printed to. + * \param s - The string to be printed. + * \param maxWidth - The maxWidth allowed for the output line. + * \param indentSpaces - The number of spaces to indent the first line. + * \param secondLineOffset - The number of spaces to indent the second + * and all subsequent lines in addition to indentSpaces. + */ + void spacePrint( std::ostream& os, + const std::string& s, + int maxWidth, + int indentSpaces, + int secondLineOffset ) const; + +}; + + +inline void StdOutput::version(CmdLineInterface& _cmd) +{ + std::string progName = _cmd.getProgramName(); + std::string xversion = _cmd.getVersion(); + + std::cout << std::endl << progName << " version: " + << xversion << std::endl << std::endl; +} + +inline void StdOutput::usage(CmdLineInterface& _cmd ) +{ + std::cout << std::endl << "USAGE: " << std::endl << std::endl; + + _shortUsage( _cmd, std::cout ); + + std::cout << std::endl << std::endl << "Where: " << std::endl << std::endl; + + _longUsage( _cmd, std::cout ); + + std::cout << std::endl; + +} + +inline void StdOutput::failure( CmdLineInterface& _cmd, + ArgException& e ) +{ + std::string progName = _cmd.getProgramName(); + + std::cerr << "PARSE ERROR: " << e.argId() << std::endl + << " " << e.error() << std::endl << std::endl; + + if ( _cmd.hasHelpAndVersion() ) + { + std::cerr << "Brief USAGE: " << std::endl; + + _shortUsage( _cmd, std::cerr ); + + std::cerr << std::endl << "For complete USAGE and HELP type: " + << std::endl << " " << progName << " --help" + << std::endl << std::endl; + } + else + usage(_cmd); + + throw ExitException(1); +} + +inline void +StdOutput::_shortUsage( CmdLineInterface& _cmd, + std::ostream& os ) const +{ + std::list argList = _cmd.getArgList(); + std::string progName = _cmd.getProgramName(); + XorHandler xorHandler = _cmd.getXorHandler(); + std::vector< std::vector > xorList = xorHandler.getXorList(); + + std::string s = progName + " "; + + // first the xor + for ( int i = 0; static_cast(i) < xorList.size(); i++ ) + { + s += " {"; + for ( ArgVectorIterator it = xorList[i].begin(); + it != xorList[i].end(); it++ ) + s += (*it)->shortID() + "|"; + + s[s.length()-1] = '}'; + } + + // then the rest + for (ArgListIterator it = argList.begin(); it != argList.end(); it++) + if ( !xorHandler.contains( (*it) ) ) + s += " " + (*it)->shortID(); + + // if the program name is too long, then adjust the second line offset + int secondLineOffset = static_cast(progName.length()) + 2; + if ( secondLineOffset > 75/2 ) + secondLineOffset = static_cast(75/2); + + spacePrint( os, s, 75, 3, secondLineOffset ); +} + +inline void +StdOutput::_longUsage( CmdLineInterface& _cmd, + std::ostream& os ) const +{ + std::list argList = _cmd.getArgList(); + std::string message = _cmd.getMessage(); + XorHandler xorHandler = _cmd.getXorHandler(); + std::vector< std::vector > xorList = xorHandler.getXorList(); + + // first the xor + for ( int i = 0; static_cast(i) < xorList.size(); i++ ) + { + for ( ArgVectorIterator it = xorList[i].begin(); + it != xorList[i].end(); + it++ ) + { + spacePrint( os, (*it)->longID(), 75, 3, 3 ); + spacePrint( os, (*it)->getDescription(), 75, 5, 0 ); + + if ( it+1 != xorList[i].end() ) + spacePrint(os, "-- OR --", 75, 9, 0); + } + os << std::endl << std::endl; + } + + // then the rest + for (ArgListIterator it = argList.begin(); it != argList.end(); it++) + if ( !xorHandler.contains( (*it) ) ) + { + spacePrint( os, (*it)->longID(), 75, 3, 3 ); + spacePrint( os, (*it)->getDescription(), 75, 5, 0 ); + os << std::endl; + } + + os << std::endl; + + spacePrint( os, message, 75, 3, 0 ); +} + +inline void StdOutput::spacePrint( std::ostream& os, + const std::string& s, + int maxWidth, + int indentSpaces, + int secondLineOffset ) const +{ + int len = static_cast(s.length()); + + if ( (len + indentSpaces > maxWidth) && maxWidth > 0 ) + { + int allowedLen = maxWidth - indentSpaces; + int start = 0; + while ( start < len ) + { + // find the substring length + // int stringLen = std::min( len - start, allowedLen ); + // doing it this way to support a VisualC++ 2005 bug + using namespace std; + int stringLen = min( len - start, allowedLen ); + + // trim the length so it doesn't end in middle of a word + if ( stringLen == allowedLen ) + while ( stringLen >= 0 && + s[stringLen+start] != ' ' && + s[stringLen+start] != ',' && + s[stringLen+start] != '|' ) + stringLen--; + + // ok, the word is longer than the line, so just split + // wherever the line ends + if ( stringLen <= 0 ) + stringLen = allowedLen; + + // check for newlines + for ( int i = 0; i < stringLen; i++ ) + if ( s[start+i] == '\n' ) + stringLen = i+1; + + // print the indent + for ( int i = 0; i < indentSpaces; i++ ) + os << " "; + + if ( start == 0 ) + { + // handle second line offsets + indentSpaces += secondLineOffset; + + // adjust allowed len + allowedLen -= secondLineOffset; + } + + os << s.substr(start,stringLen) << std::endl; + + // so we don't start a line with a space + while ( s[stringLen+start] == ' ' && start < len ) + start++; + + start += stringLen; + } + } + else + { + for ( int i = 0; i < indentSpaces; i++ ) + os << " "; + os << s << std::endl; + } +} + +} //namespace TCLAP +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/SwitchArg.h b/3rdparty/tclap-1.2.1/include/tclap/SwitchArg.h new file mode 100644 index 0000000..3916109 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/SwitchArg.h @@ -0,0 +1,266 @@ + +/****************************************************************************** + * + * file: SwitchArg.h + * + * Copyright (c) 2003, Michael E. Smoot . + * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_SWITCH_ARG_H +#define TCLAP_SWITCH_ARG_H + +#include +#include + +#include + +namespace TCLAP { + +/** + * A simple switch argument. If the switch is set on the command line, then + * the getValue method will return the opposite of the default value for the + * switch. + */ +class SwitchArg : public Arg +{ + protected: + + /** + * The value of the switch. + */ + bool _value; + + /** + * Used to support the reset() method so that ValueArg can be + * reset to their constructed value. + */ + bool _default; + + public: + + /** + * SwitchArg constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param def - The default value for this Switch. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + SwitchArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool def = false, + Visitor* v = NULL); + + + /** + * SwitchArg constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param parser - A CmdLine parser object to add this Arg to + * \param def - The default value for this Switch. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + SwitchArg(const std::string& flag, + const std::string& name, + const std::string& desc, + CmdLineInterface& parser, + bool def = false, + Visitor* v = NULL); + + + /** + * Handles the processing of the argument. + * This re-implements the Arg version of this method to set the + * _value of the argument appropriately. + * \param i - Pointer the the current argument in the list. + * \param args - Mutable list of strings. Passed + * in from main(). + */ + virtual bool processArg(int* i, std::vector& args); + + /** + * Checks a string to see if any of the chars in the string + * match the flag for this Switch. + */ + bool combinedSwitchesMatch(std::string& combined); + + /** + * Returns bool, whether or not the switch has been set. + */ + bool getValue(); + + virtual void reset(); + + private: + /** + * Checks to see if we've found the last match in + * a combined string. + */ + bool lastCombined(std::string& combined); + + /** + * Does the common processing of processArg. + */ + void commonProcessing(); +}; + +////////////////////////////////////////////////////////////////////// +//BEGIN SwitchArg.cpp +////////////////////////////////////////////////////////////////////// +inline SwitchArg::SwitchArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool default_val, + Visitor* v ) +: Arg(flag, name, desc, false, false, v), + _value( default_val ), + _default( default_val ) +{ } + +inline SwitchArg::SwitchArg(const std::string& flag, + const std::string& name, + const std::string& desc, + CmdLineInterface& parser, + bool default_val, + Visitor* v ) +: Arg(flag, name, desc, false, false, v), + _value( default_val ), + _default(default_val) +{ + parser.add( this ); +} + +inline bool SwitchArg::getValue() { return _value; } + +inline bool SwitchArg::lastCombined(std::string& combinedSwitches ) +{ + for ( unsigned int i = 1; i < combinedSwitches.length(); i++ ) + if ( combinedSwitches[i] != Arg::blankChar() ) + return false; + + return true; +} + +inline bool SwitchArg::combinedSwitchesMatch(std::string& combinedSwitches ) +{ + // make sure this is actually a combined switch + if ( combinedSwitches.length() > 0 && + combinedSwitches[0] != Arg::flagStartString()[0] ) + return false; + + // make sure it isn't a long name + if ( combinedSwitches.substr( 0, Arg::nameStartString().length() ) == + Arg::nameStartString() ) + return false; + + // make sure the delimiter isn't in the string + if ( combinedSwitches.find_first_of( Arg::delimiter() ) != std::string::npos ) + return false; + + // ok, we're not specifying a ValueArg, so we know that we have + // a combined switch list. + for ( unsigned int i = 1; i < combinedSwitches.length(); i++ ) + if ( _flag.length() > 0 && + combinedSwitches[i] == _flag[0] && + _flag[0] != Arg::flagStartString()[0] ) + { + // update the combined switches so this one is no longer present + // this is necessary so that no unlabeled args are matched + // later in the processing. + //combinedSwitches.erase(i,1); + combinedSwitches[i] = Arg::blankChar(); + return true; + } + + // none of the switches passed in the list match. + return false; +} + +inline void SwitchArg::commonProcessing() +{ + if ( _xorSet ) + throw(CmdLineParseException( + "Mutually exclusive argument already set!", toString())); + + if ( _alreadySet ) + throw(CmdLineParseException("Argument already set!", toString())); + + _alreadySet = true; + + if ( _value == true ) + _value = false; + else + _value = true; + + _checkWithVisitor(); +} + +inline bool SwitchArg::processArg(int *i, std::vector& args) +{ + if ( _ignoreable && Arg::ignoreRest() ) + return false; + + // if the whole string matches the flag or name string + if ( argMatches( args[*i] ) ) + { + commonProcessing(); + + return true; + } + // if a substring matches the flag as part of a combination + else if ( combinedSwitchesMatch( args[*i] ) ) + { + // check again to ensure we don't misinterpret + // this as a MultiSwitchArg + if ( combinedSwitchesMatch( args[*i] ) ) + throw(CmdLineParseException("Argument already set!", + toString())); + + commonProcessing(); + + // We only want to return true if we've found the last combined + // match in the string, otherwise we return true so that other + // switches in the combination will have a chance to match. + return lastCombined( args[*i] ); + } + else + return false; +} + +inline void SwitchArg::reset() +{ + Arg::reset(); + _value = _default; +} +////////////////////////////////////////////////////////////////////// +//End SwitchArg.cpp +////////////////////////////////////////////////////////////////////// + +} //namespace TCLAP + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/UnlabeledMultiArg.h b/3rdparty/tclap-1.2.1/include/tclap/UnlabeledMultiArg.h new file mode 100644 index 0000000..d5e1781 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/UnlabeledMultiArg.h @@ -0,0 +1,301 @@ + +/****************************************************************************** + * + * file: UnlabeledMultiArg.h + * + * Copyright (c) 2003, Michael E. Smoot. + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H +#define TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H + +#include +#include + +#include +#include + +namespace TCLAP { + +/** + * Just like a MultiArg, except that the arguments are unlabeled. Basically, + * this Arg will slurp up everything that hasn't been matched to another + * Arg. + */ +template +class UnlabeledMultiArg : public MultiArg +{ + + // If compiler has two stage name lookup (as gcc >= 3.4 does) + // this is requried to prevent undef. symbols + using MultiArg::_ignoreable; + using MultiArg::_hasBlanks; + using MultiArg::_extractValue; + using MultiArg::_typeDesc; + using MultiArg::_name; + using MultiArg::_description; + using MultiArg::_alreadySet; + using MultiArg::toString; + + public: + + /** + * Constructor. + * \param name - The name of the Arg. Note that this is used for + * identification, not as a long flag. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param typeDesc - A short, human readable description of the + * type that this object expects. This is used in the generation + * of the USAGE statement. The goal is to be helpful to the end user + * of the program. + * \param ignoreable - Whether or not this argument can be ignored + * using the "--" flag. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + UnlabeledMultiArg( const std::string& name, + const std::string& desc, + bool req, + const std::string& typeDesc, + bool ignoreable = false, + Visitor* v = NULL ); + /** + * Constructor. + * \param name - The name of the Arg. Note that this is used for + * identification, not as a long flag. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param typeDesc - A short, human readable description of the + * type that this object expects. This is used in the generation + * of the USAGE statement. The goal is to be helpful to the end user + * of the program. + * \param parser - A CmdLine parser object to add this Arg to + * \param ignoreable - Whether or not this argument can be ignored + * using the "--" flag. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + UnlabeledMultiArg( const std::string& name, + const std::string& desc, + bool req, + const std::string& typeDesc, + CmdLineInterface& parser, + bool ignoreable = false, + Visitor* v = NULL ); + + /** + * Constructor. + * \param name - The name of the Arg. Note that this is used for + * identification, not as a long flag. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param constraint - A pointer to a Constraint object used + * to constrain this Arg. + * \param ignoreable - Whether or not this argument can be ignored + * using the "--" flag. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + UnlabeledMultiArg( const std::string& name, + const std::string& desc, + bool req, + Constraint* constraint, + bool ignoreable = false, + Visitor* v = NULL ); + + /** + * Constructor. + * \param name - The name of the Arg. Note that this is used for + * identification, not as a long flag. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param constraint - A pointer to a Constraint object used + * to constrain this Arg. + * \param parser - A CmdLine parser object to add this Arg to + * \param ignoreable - Whether or not this argument can be ignored + * using the "--" flag. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + UnlabeledMultiArg( const std::string& name, + const std::string& desc, + bool req, + Constraint* constraint, + CmdLineInterface& parser, + bool ignoreable = false, + Visitor* v = NULL ); + + /** + * Handles the processing of the argument. + * This re-implements the Arg version of this method to set the + * _value of the argument appropriately. It knows the difference + * between labeled and unlabeled. + * \param i - Pointer the the current argument in the list. + * \param args - Mutable list of strings. Passed from main(). + */ + virtual bool processArg(int* i, std::vector& args); + + /** + * Returns the a short id string. Used in the usage. + * \param val - value to be used. + */ + virtual std::string shortID(const std::string& val="val") const; + + /** + * Returns the a long id string. Used in the usage. + * \param val - value to be used. + */ + virtual std::string longID(const std::string& val="val") const; + + /** + * Opertor ==. + * \param a - The Arg to be compared to this. + */ + virtual bool operator==(const Arg& a) const; + + /** + * Pushes this to back of list rather than front. + * \param argList - The list this should be added to. + */ + virtual void addToList( std::list& argList ) const; +}; + +template +UnlabeledMultiArg::UnlabeledMultiArg(const std::string& name, + const std::string& desc, + bool req, + const std::string& typeDesc, + bool ignoreable, + Visitor* v) +: MultiArg("", name, desc, req, typeDesc, v) +{ + _ignoreable = ignoreable; + OptionalUnlabeledTracker::check(true, toString()); +} + +template +UnlabeledMultiArg::UnlabeledMultiArg(const std::string& name, + const std::string& desc, + bool req, + const std::string& typeDesc, + CmdLineInterface& parser, + bool ignoreable, + Visitor* v) +: MultiArg("", name, desc, req, typeDesc, v) +{ + _ignoreable = ignoreable; + OptionalUnlabeledTracker::check(true, toString()); + parser.add( this ); +} + + +template +UnlabeledMultiArg::UnlabeledMultiArg(const std::string& name, + const std::string& desc, + bool req, + Constraint* constraint, + bool ignoreable, + Visitor* v) +: MultiArg("", name, desc, req, constraint, v) +{ + _ignoreable = ignoreable; + OptionalUnlabeledTracker::check(true, toString()); +} + +template +UnlabeledMultiArg::UnlabeledMultiArg(const std::string& name, + const std::string& desc, + bool req, + Constraint* constraint, + CmdLineInterface& parser, + bool ignoreable, + Visitor* v) +: MultiArg("", name, desc, req, constraint, v) +{ + _ignoreable = ignoreable; + OptionalUnlabeledTracker::check(true, toString()); + parser.add( this ); +} + + +template +bool UnlabeledMultiArg::processArg(int *i, std::vector& args) +{ + + if ( _hasBlanks( args[*i] ) ) + return false; + + // never ignore an unlabeled multi arg + + + // always take the first value, regardless of the start string + _extractValue( args[(*i)] ); + + /* + // continue taking args until we hit the end or a start string + while ( (unsigned int)(*i)+1 < args.size() && + args[(*i)+1].find_first_of( Arg::flagStartString() ) != 0 && + args[(*i)+1].find_first_of( Arg::nameStartString() ) != 0 ) + _extractValue( args[++(*i)] ); + */ + + _alreadySet = true; + + return true; +} + +template +std::string UnlabeledMultiArg::shortID(const std::string& val) const +{ + static_cast(val); // Ignore input, don't warn + return std::string("<") + _typeDesc + "> ..."; +} + +template +std::string UnlabeledMultiArg::longID(const std::string& val) const +{ + static_cast(val); // Ignore input, don't warn + return std::string("<") + _typeDesc + "> (accepted multiple times)"; +} + +template +bool UnlabeledMultiArg::operator==(const Arg& a) const +{ + if ( _name == a.getName() || _description == a.getDescription() ) + return true; + else + return false; +} + +template +void UnlabeledMultiArg::addToList( std::list& argList ) const +{ + argList.push_back( const_cast(static_cast(this)) ); +} + +} + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/UnlabeledValueArg.h b/3rdparty/tclap-1.2.1/include/tclap/UnlabeledValueArg.h new file mode 100644 index 0000000..5721d61 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/UnlabeledValueArg.h @@ -0,0 +1,340 @@ + +/****************************************************************************** + * + * file: UnlabeledValueArg.h + * + * Copyright (c) 2003, Michael E. Smoot . + * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_UNLABELED_VALUE_ARGUMENT_H +#define TCLAP_UNLABELED_VALUE_ARGUMENT_H + +#include +#include + +#include +#include + + +namespace TCLAP { + +/** + * The basic unlabeled argument that parses a value. + * This is a template class, which means the type T defines the type + * that a given object will attempt to parse when an UnlabeledValueArg + * is reached in the list of args that the CmdLine iterates over. + */ +template +class UnlabeledValueArg : public ValueArg +{ + + // If compiler has two stage name lookup (as gcc >= 3.4 does) + // this is requried to prevent undef. symbols + using ValueArg::_ignoreable; + using ValueArg::_hasBlanks; + using ValueArg::_extractValue; + using ValueArg::_typeDesc; + using ValueArg::_name; + using ValueArg::_description; + using ValueArg::_alreadySet; + using ValueArg::toString; + + public: + + /** + * UnlabeledValueArg constructor. + * \param name - A one word name for the argument. Note that this is used for + * identification, not as a long flag. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param value - The default value assigned to this argument if it + * is not present on the command line. + * \param typeDesc - A short, human readable description of the + * type that this object expects. This is used in the generation + * of the USAGE statement. The goal is to be helpful to the end user + * of the program. + * \param ignoreable - Allows you to specify that this argument can be + * ignored if the '--' flag is set. This defaults to false (cannot + * be ignored) and should generally stay that way unless you have + * some special need for certain arguments to be ignored. + * \param v - Optional Vistor. You should leave this blank unless + * you have a very good reason. + */ + UnlabeledValueArg( const std::string& name, + const std::string& desc, + bool req, + T value, + const std::string& typeDesc, + bool ignoreable = false, + Visitor* v = NULL); + + /** + * UnlabeledValueArg constructor. + * \param name - A one word name for the argument. Note that this is used for + * identification, not as a long flag. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param value - The default value assigned to this argument if it + * is not present on the command line. + * \param typeDesc - A short, human readable description of the + * type that this object expects. This is used in the generation + * of the USAGE statement. The goal is to be helpful to the end user + * of the program. + * \param parser - A CmdLine parser object to add this Arg to + * \param ignoreable - Allows you to specify that this argument can be + * ignored if the '--' flag is set. This defaults to false (cannot + * be ignored) and should generally stay that way unless you have + * some special need for certain arguments to be ignored. + * \param v - Optional Vistor. You should leave this blank unless + * you have a very good reason. + */ + UnlabeledValueArg( const std::string& name, + const std::string& desc, + bool req, + T value, + const std::string& typeDesc, + CmdLineInterface& parser, + bool ignoreable = false, + Visitor* v = NULL ); + + /** + * UnlabeledValueArg constructor. + * \param name - A one word name for the argument. Note that this is used for + * identification, not as a long flag. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param value - The default value assigned to this argument if it + * is not present on the command line. + * \param constraint - A pointer to a Constraint object used + * to constrain this Arg. + * \param ignoreable - Allows you to specify that this argument can be + * ignored if the '--' flag is set. This defaults to false (cannot + * be ignored) and should generally stay that way unless you have + * some special need for certain arguments to be ignored. + * \param v - Optional Vistor. You should leave this blank unless + * you have a very good reason. + */ + UnlabeledValueArg( const std::string& name, + const std::string& desc, + bool req, + T value, + Constraint* constraint, + bool ignoreable = false, + Visitor* v = NULL ); + + + /** + * UnlabeledValueArg constructor. + * \param name - A one word name for the argument. Note that this is used for + * identification, not as a long flag. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param value - The default value assigned to this argument if it + * is not present on the command line. + * \param constraint - A pointer to a Constraint object used + * to constrain this Arg. + * \param parser - A CmdLine parser object to add this Arg to + * \param ignoreable - Allows you to specify that this argument can be + * ignored if the '--' flag is set. This defaults to false (cannot + * be ignored) and should generally stay that way unless you have + * some special need for certain arguments to be ignored. + * \param v - Optional Vistor. You should leave this blank unless + * you have a very good reason. + */ + UnlabeledValueArg( const std::string& name, + const std::string& desc, + bool req, + T value, + Constraint* constraint, + CmdLineInterface& parser, + bool ignoreable = false, + Visitor* v = NULL); + + /** + * Handles the processing of the argument. + * This re-implements the Arg version of this method to set the + * _value of the argument appropriately. Handling specific to + * unlabled arguments. + * \param i - Pointer the the current argument in the list. + * \param args - Mutable list of strings. + */ + virtual bool processArg(int* i, std::vector& args); + + /** + * Overrides shortID for specific behavior. + */ + virtual std::string shortID(const std::string& val="val") const; + + /** + * Overrides longID for specific behavior. + */ + virtual std::string longID(const std::string& val="val") const; + + /** + * Overrides operator== for specific behavior. + */ + virtual bool operator==(const Arg& a ) const; + + /** + * Instead of pushing to the front of list, push to the back. + * \param argList - The list to add this to. + */ + virtual void addToList( std::list& argList ) const; + +}; + +/** + * Constructor implemenation. + */ +template +UnlabeledValueArg::UnlabeledValueArg(const std::string& name, + const std::string& desc, + bool req, + T val, + const std::string& typeDesc, + bool ignoreable, + Visitor* v) +: ValueArg("", name, desc, req, val, typeDesc, v) +{ + _ignoreable = ignoreable; + + OptionalUnlabeledTracker::check(req, toString()); + +} + +template +UnlabeledValueArg::UnlabeledValueArg(const std::string& name, + const std::string& desc, + bool req, + T val, + const std::string& typeDesc, + CmdLineInterface& parser, + bool ignoreable, + Visitor* v) +: ValueArg("", name, desc, req, val, typeDesc, v) +{ + _ignoreable = ignoreable; + OptionalUnlabeledTracker::check(req, toString()); + parser.add( this ); +} + +/** + * Constructor implemenation. + */ +template +UnlabeledValueArg::UnlabeledValueArg(const std::string& name, + const std::string& desc, + bool req, + T val, + Constraint* constraint, + bool ignoreable, + Visitor* v) +: ValueArg("", name, desc, req, val, constraint, v) +{ + _ignoreable = ignoreable; + OptionalUnlabeledTracker::check(req, toString()); +} + +template +UnlabeledValueArg::UnlabeledValueArg(const std::string& name, + const std::string& desc, + bool req, + T val, + Constraint* constraint, + CmdLineInterface& parser, + bool ignoreable, + Visitor* v) +: ValueArg("", name, desc, req, val, constraint, v) +{ + _ignoreable = ignoreable; + OptionalUnlabeledTracker::check(req, toString()); + parser.add( this ); +} + +/** + * Implementation of processArg(). + */ +template +bool UnlabeledValueArg::processArg(int *i, std::vector& args) +{ + + if ( _alreadySet ) + return false; + + if ( _hasBlanks( args[*i] ) ) + return false; + + // never ignore an unlabeled arg + + _extractValue( args[*i] ); + _alreadySet = true; + return true; +} + +/** + * Overriding shortID for specific output. + */ +template +std::string UnlabeledValueArg::shortID(const std::string& val) const +{ + static_cast(val); // Ignore input, don't warn + return std::string("<") + _typeDesc + ">"; +} + +/** + * Overriding longID for specific output. + */ +template +std::string UnlabeledValueArg::longID(const std::string& val) const +{ + static_cast(val); // Ignore input, don't warn + + // Ideally we would like to be able to use RTTI to return the name + // of the type required for this argument. However, g++ at least, + // doesn't appear to return terribly useful "names" of the types. + return std::string("<") + _typeDesc + ">"; +} + +/** + * Overriding operator== for specific behavior. + */ +template +bool UnlabeledValueArg::operator==(const Arg& a ) const +{ + if ( _name == a.getName() || _description == a.getDescription() ) + return true; + else + return false; +} + +template +void UnlabeledValueArg::addToList( std::list& argList ) const +{ + argList.push_back( const_cast(static_cast(this)) ); +} + +} +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/ValueArg.h b/3rdparty/tclap-1.2.1/include/tclap/ValueArg.h new file mode 100644 index 0000000..7ac2952 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/ValueArg.h @@ -0,0 +1,425 @@ +/****************************************************************************** + * + * file: ValueArg.h + * + * Copyright (c) 2003, Michael E. Smoot . + * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_VALUE_ARGUMENT_H +#define TCLAP_VALUE_ARGUMENT_H + +#include +#include + +#include +#include + +namespace TCLAP { + +/** + * The basic labeled argument that parses a value. + * This is a template class, which means the type T defines the type + * that a given object will attempt to parse when the flag/name is matched + * on the command line. While there is nothing stopping you from creating + * an unflagged ValueArg, it is unwise and would cause significant problems. + * Instead use an UnlabeledValueArg. + */ +template +class ValueArg : public Arg +{ + protected: + + /** + * The value parsed from the command line. + * Can be of any type, as long as the >> operator for the type + * is defined. + */ + T _value; + + /** + * Used to support the reset() method so that ValueArg can be + * reset to their constructed value. + */ + T _default; + + /** + * A human readable description of the type to be parsed. + * This is a hack, plain and simple. Ideally we would use RTTI to + * return the name of type T, but until there is some sort of + * consistent support for human readable names, we are left to our + * own devices. + */ + std::string _typeDesc; + + /** + * A Constraint this Arg must conform to. + */ + Constraint* _constraint; + + /** + * Extracts the value from the string. + * Attempts to parse string as type T, if this fails an exception + * is thrown. + * \param val - value to be parsed. + */ + void _extractValue( const std::string& val ); + + public: + + /** + * Labeled ValueArg constructor. + * You could conceivably call this constructor with a blank flag, + * but that would make you a bad person. It would also cause + * an exception to be thrown. If you want an unlabeled argument, + * use the other constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param value - The default value assigned to this argument if it + * is not present on the command line. + * \param typeDesc - A short, human readable description of the + * type that this object expects. This is used in the generation + * of the USAGE statement. The goal is to be helpful to the end user + * of the program. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + ValueArg( const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + T value, + const std::string& typeDesc, + Visitor* v = NULL); + + + /** + * Labeled ValueArg constructor. + * You could conceivably call this constructor with a blank flag, + * but that would make you a bad person. It would also cause + * an exception to be thrown. If you want an unlabeled argument, + * use the other constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param value - The default value assigned to this argument if it + * is not present on the command line. + * \param typeDesc - A short, human readable description of the + * type that this object expects. This is used in the generation + * of the USAGE statement. The goal is to be helpful to the end user + * of the program. + * \param parser - A CmdLine parser object to add this Arg to + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + ValueArg( const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + T value, + const std::string& typeDesc, + CmdLineInterface& parser, + Visitor* v = NULL ); + + /** + * Labeled ValueArg constructor. + * You could conceivably call this constructor with a blank flag, + * but that would make you a bad person. It would also cause + * an exception to be thrown. If you want an unlabeled argument, + * use the other constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param value - The default value assigned to this argument if it + * is not present on the command line. + * \param constraint - A pointer to a Constraint object used + * to constrain this Arg. + * \param parser - A CmdLine parser object to add this Arg to. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + ValueArg( const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + T value, + Constraint* constraint, + CmdLineInterface& parser, + Visitor* v = NULL ); + + /** + * Labeled ValueArg constructor. + * You could conceivably call this constructor with a blank flag, + * but that would make you a bad person. It would also cause + * an exception to be thrown. If you want an unlabeled argument, + * use the other constructor. + * \param flag - The one character flag that identifies this + * argument on the command line. + * \param name - A one word name for the argument. Can be + * used as a long flag on the command line. + * \param desc - A description of what the argument is for or + * does. + * \param req - Whether the argument is required on the command + * line. + * \param value - The default value assigned to this argument if it + * is not present on the command line. + * \param constraint - A pointer to a Constraint object used + * to constrain this Arg. + * \param v - An optional visitor. You probably should not + * use this unless you have a very good reason. + */ + ValueArg( const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + T value, + Constraint* constraint, + Visitor* v = NULL ); + + /** + * Handles the processing of the argument. + * This re-implements the Arg version of this method to set the + * _value of the argument appropriately. It knows the difference + * between labeled and unlabeled. + * \param i - Pointer the the current argument in the list. + * \param args - Mutable list of strings. Passed + * in from main(). + */ + virtual bool processArg(int* i, std::vector& args); + + /** + * Returns the value of the argument. + */ + T& getValue() ; + + /** + * Specialization of shortID. + * \param val - value to be used. + */ + virtual std::string shortID(const std::string& val = "val") const; + + /** + * Specialization of longID. + * \param val - value to be used. + */ + virtual std::string longID(const std::string& val = "val") const; + + virtual void reset() ; + +private: + /** + * Prevent accidental copying + */ + ValueArg(const ValueArg& rhs); + ValueArg& operator=(const ValueArg& rhs); +}; + + +/** + * Constructor implementation. + */ +template +ValueArg::ValueArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + T val, + const std::string& typeDesc, + Visitor* v) +: Arg(flag, name, desc, req, true, v), + _value( val ), + _default( val ), + _typeDesc( typeDesc ), + _constraint( NULL ) +{ } + +template +ValueArg::ValueArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + T val, + const std::string& typeDesc, + CmdLineInterface& parser, + Visitor* v) +: Arg(flag, name, desc, req, true, v), + _value( val ), + _default( val ), + _typeDesc( typeDesc ), + _constraint( NULL ) +{ + parser.add( this ); +} + +template +ValueArg::ValueArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + T val, + Constraint* constraint, + Visitor* v) +: Arg(flag, name, desc, req, true, v), + _value( val ), + _default( val ), + _typeDesc( constraint->shortID() ), + _constraint( constraint ) +{ } + +template +ValueArg::ValueArg(const std::string& flag, + const std::string& name, + const std::string& desc, + bool req, + T val, + Constraint* constraint, + CmdLineInterface& parser, + Visitor* v) +: Arg(flag, name, desc, req, true, v), + _value( val ), + _default( val ), + _typeDesc( constraint->shortID() ), + _constraint( constraint ) +{ + parser.add( this ); +} + + +/** + * Implementation of getValue(). + */ +template +T& ValueArg::getValue() { return _value; } + +/** + * Implementation of processArg(). + */ +template +bool ValueArg::processArg(int *i, std::vector& args) +{ + if ( _ignoreable && Arg::ignoreRest() ) + return false; + + if ( _hasBlanks( args[*i] ) ) + return false; + + std::string flag = args[*i]; + + std::string value = ""; + trimFlag( flag, value ); + + if ( argMatches( flag ) ) + { + if ( _alreadySet ) + { + if ( _xorSet ) + throw( CmdLineParseException( + "Mutually exclusive argument already set!", + toString()) ); + else + throw( CmdLineParseException("Argument already set!", + toString()) ); + } + + if ( Arg::delimiter() != ' ' && value == "" ) + throw( ArgParseException( + "Couldn't find delimiter for this argument!", + toString() ) ); + + if ( value == "" ) + { + (*i)++; + if ( static_cast(*i) < args.size() ) + _extractValue( args[*i] ); + else + throw( ArgParseException("Missing a value for this argument!", + toString() ) ); + } + else + _extractValue( value ); + + _alreadySet = true; + _checkWithVisitor(); + return true; + } + else + return false; +} + +/** + * Implementation of shortID. + */ +template +std::string ValueArg::shortID(const std::string& val) const +{ + static_cast(val); // Ignore input, don't warn + return Arg::shortID( _typeDesc ); +} + +/** + * Implementation of longID. + */ +template +std::string ValueArg::longID(const std::string& val) const +{ + static_cast(val); // Ignore input, don't warn + return Arg::longID( _typeDesc ); +} + +template +void ValueArg::_extractValue( const std::string& val ) +{ + try { + ExtractValue(_value, val, typename ArgTraits::ValueCategory()); + } catch( ArgParseException &e) { + throw ArgParseException(e.error(), toString()); + } + + if ( _constraint != NULL ) + if ( ! _constraint->check( _value ) ) + throw( CmdLineParseException( "Value '" + val + + + "' does not meet constraint: " + + _constraint->description(), + toString() ) ); +} + +template +void ValueArg::reset() +{ + Arg::reset(); + _value = _default; +} + +} // namespace TCLAP + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/ValuesConstraint.h b/3rdparty/tclap-1.2.1/include/tclap/ValuesConstraint.h new file mode 100644 index 0000000..cb41f64 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/ValuesConstraint.h @@ -0,0 +1,148 @@ + + +/****************************************************************************** + * + * file: ValuesConstraint.h + * + * Copyright (c) 2005, Michael E. Smoot + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_VALUESCONSTRAINT_H +#define TCLAP_VALUESCONSTRAINT_H + +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include +#else +#define HAVE_SSTREAM +#endif + +#if defined(HAVE_SSTREAM) +#include +#elif defined(HAVE_STRSTREAM) +#include +#else +#error "Need a stringstream (sstream or strstream) to compile!" +#endif + +namespace TCLAP { + +/** + * A Constraint that constrains the Arg to only those values specified + * in the constraint. + */ +template +class ValuesConstraint : public Constraint +{ + + public: + + /** + * Constructor. + * \param allowed - vector of allowed values. + */ + ValuesConstraint(std::vector& allowed); + + /** + * Virtual destructor. + */ + virtual ~ValuesConstraint() {} + + /** + * Returns a description of the Constraint. + */ + virtual std::string description() const; + + /** + * Returns the short ID for the Constraint. + */ + virtual std::string shortID() const; + + /** + * The method used to verify that the value parsed from the command + * line meets the constraint. + * \param value - The value that will be checked. + */ + virtual bool check(const T& value) const; + + protected: + + /** + * The list of valid values. + */ + std::vector _allowed; + + /** + * The string used to describe the allowed values of this constraint. + */ + std::string _typeDesc; + +}; + +template +ValuesConstraint::ValuesConstraint(std::vector& allowed) +: _allowed(allowed), + _typeDesc("") +{ + for ( unsigned int i = 0; i < _allowed.size(); i++ ) + { + +#if defined(HAVE_SSTREAM) + std::ostringstream os; +#elif defined(HAVE_STRSTREAM) + std::ostrstream os; +#else +#error "Need a stringstream (sstream or strstream) to compile!" +#endif + + os << _allowed[i]; + + std::string temp( os.str() ); + + if ( i > 0 ) + _typeDesc += "|"; + _typeDesc += temp; + } +} + +template +bool ValuesConstraint::check( const T& val ) const +{ + if ( std::find(_allowed.begin(),_allowed.end(),val) == _allowed.end() ) + return false; + else + return true; +} + +template +std::string ValuesConstraint::shortID() const +{ + return _typeDesc; +} + +template +std::string ValuesConstraint::description() const +{ + return _typeDesc; +} + + +} //namespace TCLAP +#endif + diff --git a/3rdparty/tclap-1.2.1/include/tclap/VersionVisitor.h b/3rdparty/tclap-1.2.1/include/tclap/VersionVisitor.h new file mode 100644 index 0000000..c110d4f --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/VersionVisitor.h @@ -0,0 +1,81 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + +/****************************************************************************** + * + * file: VersionVisitor.h + * + * Copyright (c) 2003, Michael E. Smoot . + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_VERSION_VISITOR_H +#define TCLAP_VERSION_VISITOR_H + +#include +#include +#include + +namespace TCLAP { + +/** + * A Vistor that will call the version method of the given CmdLineOutput + * for the specified CmdLine object and then exit. + */ +class VersionVisitor: public Visitor +{ + private: + /** + * Prevent accidental copying + */ + VersionVisitor(const VersionVisitor& rhs); + VersionVisitor& operator=(const VersionVisitor& rhs); + + protected: + + /** + * The CmdLine of interest. + */ + CmdLineInterface* _cmd; + + /** + * The output object. + */ + CmdLineOutput** _out; + + public: + + /** + * Constructor. + * \param cmd - The CmdLine the output is generated for. + * \param out - The type of output. + */ + VersionVisitor( CmdLineInterface* cmd, CmdLineOutput** out ) + : Visitor(), _cmd( cmd ), _out( out ) { } + + /** + * Calls the version method of the output object using the + * specified CmdLine. + */ + void visit() { + (*_out)->version(*_cmd); + throw ExitException(0); + } + +}; + +} + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/Visitor.h b/3rdparty/tclap-1.2.1/include/tclap/Visitor.h new file mode 100644 index 0000000..38ddcbd --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/Visitor.h @@ -0,0 +1,53 @@ + +/****************************************************************************** + * + * file: Visitor.h + * + * Copyright (c) 2003, Michael E. Smoot . + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + + +#ifndef TCLAP_VISITOR_H +#define TCLAP_VISITOR_H + +namespace TCLAP { + +/** + * A base class that defines the interface for visitors. + */ +class Visitor +{ + public: + + /** + * Constructor. Does nothing. + */ + Visitor() { } + + /** + * Destructor. Does nothing. + */ + virtual ~Visitor() { } + + /** + * Does nothing. Should be overridden by child. + */ + virtual void visit() { } +}; + +} + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/XorHandler.h b/3rdparty/tclap-1.2.1/include/tclap/XorHandler.h new file mode 100644 index 0000000..d9dfad3 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/XorHandler.h @@ -0,0 +1,166 @@ + +/****************************************************************************** + * + * file: XorHandler.h + * + * Copyright (c) 2003, Michael E. Smoot . + * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_XORHANDLER_H +#define TCLAP_XORHANDLER_H + +#include +#include +#include +#include +#include + +namespace TCLAP { + +/** + * This class handles lists of Arg's that are to be XOR'd on the command + * line. This is used by CmdLine and you shouldn't ever use it. + */ +class XorHandler +{ + protected: + + /** + * The list of of lists of Arg's to be or'd together. + */ + std::vector< std::vector > _orList; + + public: + + /** + * Constructor. Does nothing. + */ + XorHandler( ) : _orList(std::vector< std::vector >()) {} + + /** + * Add a list of Arg*'s that will be orred together. + * \param ors - list of Arg* that will be xor'd. + */ + void add( std::vector& ors ); + + /** + * Checks whether the specified Arg is in one of the xor lists and + * if it does match one, returns the size of the xor list that the + * Arg matched. If the Arg matches, then it also sets the rest of + * the Arg's in the list. You shouldn't use this. + * \param a - The Arg to be checked. + */ + int check( const Arg* a ); + + /** + * Returns the XOR specific short usage. + */ + std::string shortUsage(); + + /** + * Prints the XOR specific long usage. + * \param os - Stream to print to. + */ + void printLongUsage(std::ostream& os); + + /** + * Simply checks whether the Arg is contained in one of the arg + * lists. + * \param a - The Arg to be checked. + */ + bool contains( const Arg* a ); + + std::vector< std::vector >& getXorList(); + +}; + + +////////////////////////////////////////////////////////////////////// +//BEGIN XOR.cpp +////////////////////////////////////////////////////////////////////// +inline void XorHandler::add( std::vector& ors ) +{ + _orList.push_back( ors ); +} + +inline int XorHandler::check( const Arg* a ) +{ + // iterate over each XOR list + for ( int i = 0; static_cast(i) < _orList.size(); i++ ) + { + // if the XOR list contains the arg.. + ArgVectorIterator ait = std::find( _orList[i].begin(), + _orList[i].end(), a ); + if ( ait != _orList[i].end() ) + { + // first check to see if a mutually exclusive switch + // has not already been set + for ( ArgVectorIterator it = _orList[i].begin(); + it != _orList[i].end(); + it++ ) + if ( a != (*it) && (*it)->isSet() ) + throw(CmdLineParseException( + "Mutually exclusive argument already set!", + (*it)->toString())); + + // go through and set each arg that is not a + for ( ArgVectorIterator it = _orList[i].begin(); + it != _orList[i].end(); + it++ ) + if ( a != (*it) ) + (*it)->xorSet(); + + // return the number of required args that have now been set + if ( (*ait)->allowMore() ) + return 0; + else + return static_cast(_orList[i].size()); + } + } + + if ( a->isRequired() ) + return 1; + else + return 0; +} + +inline bool XorHandler::contains( const Arg* a ) +{ + for ( int i = 0; static_cast(i) < _orList.size(); i++ ) + for ( ArgVectorIterator it = _orList[i].begin(); + it != _orList[i].end(); + it++ ) + if ( a == (*it) ) + return true; + + return false; +} + +inline std::vector< std::vector >& XorHandler::getXorList() +{ + return _orList; +} + + + +////////////////////////////////////////////////////////////////////// +//END XOR.cpp +////////////////////////////////////////////////////////////////////// + +} //namespace TCLAP + +#endif diff --git a/3rdparty/tclap-1.2.1/include/tclap/ZshCompletionOutput.h b/3rdparty/tclap-1.2.1/include/tclap/ZshCompletionOutput.h new file mode 100644 index 0000000..0b37fc7 --- /dev/null +++ b/3rdparty/tclap-1.2.1/include/tclap/ZshCompletionOutput.h @@ -0,0 +1,323 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + +/****************************************************************************** + * + * file: ZshCompletionOutput.h + * + * Copyright (c) 2006, Oliver Kiddle + * All rights reverved. + * + * See the file COPYING in the top directory of this distribution for + * more information. + * + * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + *****************************************************************************/ + +#ifndef TCLAP_ZSHCOMPLETIONOUTPUT_H +#define TCLAP_ZSHCOMPLETIONOUTPUT_H + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace TCLAP { + +/** + * A class that generates a Zsh completion function as output from the usage() + * method for the given CmdLine and its Args. + */ +class ZshCompletionOutput : public CmdLineOutput +{ + + public: + + ZshCompletionOutput(); + + /** + * Prints the usage to stdout. Can be overridden to + * produce alternative behavior. + * \param c - The CmdLine object the output is generated for. + */ + virtual void usage(CmdLineInterface& c); + + /** + * Prints the version to stdout. Can be overridden + * to produce alternative behavior. + * \param c - The CmdLine object the output is generated for. + */ + virtual void version(CmdLineInterface& c); + + /** + * Prints (to stderr) an error message, short usage + * Can be overridden to produce alternative behavior. + * \param c - The CmdLine object the output is generated for. + * \param e - The ArgException that caused the failure. + */ + virtual void failure(CmdLineInterface& c, + ArgException& e ); + + protected: + + void basename( std::string& s ); + void quoteSpecialChars( std::string& s ); + + std::string getMutexList( CmdLineInterface& _cmd, Arg* a ); + void printOption( Arg* it, std::string mutex ); + void printArg( Arg* it ); + + std::map common; + char theDelimiter; +}; + +ZshCompletionOutput::ZshCompletionOutput() +: common(std::map()), + theDelimiter('=') +{ + common["host"] = "_hosts"; + common["hostname"] = "_hosts"; + common["file"] = "_files"; + common["filename"] = "_files"; + common["user"] = "_users"; + common["username"] = "_users"; + common["directory"] = "_directories"; + common["path"] = "_directories"; + common["url"] = "_urls"; +} + +inline void ZshCompletionOutput::version(CmdLineInterface& _cmd) +{ + std::cout << _cmd.getVersion() << std::endl; +} + +inline void ZshCompletionOutput::usage(CmdLineInterface& _cmd ) +{ + std::list argList = _cmd.getArgList(); + std::string progName = _cmd.getProgramName(); + std::string xversion = _cmd.getVersion(); + theDelimiter = _cmd.getDelimiter(); + basename(progName); + + std::cout << "#compdef " << progName << std::endl << std::endl << + "# " << progName << " version " << _cmd.getVersion() << std::endl << std::endl << + "_arguments -s -S"; + + for (ArgListIterator it = argList.begin(); it != argList.end(); it++) + { + if ( (*it)->shortID().at(0) == '<' ) + printArg((*it)); + else if ( (*it)->getFlag() != "-" ) + printOption((*it), getMutexList(_cmd, *it)); + } + + std::cout << std::endl; +} + +inline void ZshCompletionOutput::failure( CmdLineInterface& _cmd, + ArgException& e ) +{ + static_cast(_cmd); // unused + std::cout << e.what() << std::endl; +} + +inline void ZshCompletionOutput::quoteSpecialChars( std::string& s ) +{ + size_t idx = s.find_last_of(':'); + while ( idx != std::string::npos ) + { + s.insert(idx, 1, '\\'); + idx = s.find_last_of(':', idx); + } + idx = s.find_last_of('\''); + while ( idx != std::string::npos ) + { + s.insert(idx, "'\\'"); + if (idx == 0) + idx = std::string::npos; + else + idx = s.find_last_of('\'', --idx); + } +} + +inline void ZshCompletionOutput::basename( std::string& s ) +{ + size_t p = s.find_last_of('/'); + if ( p != std::string::npos ) + { + s.erase(0, p + 1); + } +} + +inline void ZshCompletionOutput::printArg(Arg* a) +{ + static int count = 1; + + std::cout << " \\" << std::endl << " '"; + if ( a->acceptsMultipleValues() ) + std::cout << '*'; + else + std::cout << count++; + std::cout << ':'; + if ( !a->isRequired() ) + std::cout << ':'; + + std::cout << a->getName() << ':'; + std::map::iterator compArg = common.find(a->getName()); + if ( compArg != common.end() ) + { + std::cout << compArg->second; + } + else + { + std::cout << "_guard \"^-*\" " << a->getName(); + } + std::cout << '\''; +} + +inline void ZshCompletionOutput::printOption(Arg* a, std::string mutex) +{ + std::string flag = a->flagStartChar() + a->getFlag(); + std::string name = a->nameStartString() + a->getName(); + std::string desc = a->getDescription(); + + // remove full stop and capitalisation from description as + // this is the convention for zsh function + if (!desc.compare(0, 12, "(required) ")) + { + desc.erase(0, 12); + } + if (!desc.compare(0, 15, "(OR required) ")) + { + desc.erase(0, 15); + } + size_t len = desc.length(); + if (len && desc.at(--len) == '.') + { + desc.erase(len); + } + if (len) + { + desc.replace(0, 1, 1, tolower(desc.at(0))); + } + + std::cout << " \\" << std::endl << " '" << mutex; + + if ( a->getFlag().empty() ) + { + std::cout << name; + } + else + { + std::cout << "'{" << flag << ',' << name << "}'"; + } + if ( theDelimiter == '=' && a->isValueRequired() ) + std::cout << "=-"; + quoteSpecialChars(desc); + std::cout << '[' << desc << ']'; + + if ( a->isValueRequired() ) + { + std::string arg = a->shortID(); + arg.erase(0, arg.find_last_of(theDelimiter) + 1); + if ( arg.at(arg.length()-1) == ']' ) + arg.erase(arg.length()-1); + if ( arg.at(arg.length()-1) == ']' ) + { + arg.erase(arg.length()-1); + } + if ( arg.at(0) == '<' ) + { + arg.erase(arg.length()-1); + arg.erase(0, 1); + } + size_t p = arg.find('|'); + if ( p != std::string::npos ) + { + do + { + arg.replace(p, 1, 1, ' '); + } + while ( (p = arg.find_first_of('|', p)) != std::string::npos ); + quoteSpecialChars(arg); + std::cout << ": :(" << arg << ')'; + } + else + { + std::cout << ':' << arg; + std::map::iterator compArg = common.find(arg); + if ( compArg != common.end() ) + { + std::cout << ':' << compArg->second; + } + } + } + + std::cout << '\''; +} + +inline std::string ZshCompletionOutput::getMutexList( CmdLineInterface& _cmd, Arg* a) +{ + XorHandler xorHandler = _cmd.getXorHandler(); + std::vector< std::vector > xorList = xorHandler.getXorList(); + + if (a->getName() == "help" || a->getName() == "version") + { + return "(-)"; + } + + std::ostringstream list; + if ( a->acceptsMultipleValues() ) + { + list << '*'; + } + + for ( int i = 0; static_cast(i) < xorList.size(); i++ ) + { + for ( ArgVectorIterator it = xorList[i].begin(); + it != xorList[i].end(); + it++) + if ( a == (*it) ) + { + list << '('; + for ( ArgVectorIterator iu = xorList[i].begin(); + iu != xorList[i].end(); + iu++ ) + { + bool notCur = (*iu) != a; + bool hasFlag = !(*iu)->getFlag().empty(); + if ( iu != xorList[i].begin() && (notCur || hasFlag) ) + list << ' '; + if (hasFlag) + list << (*iu)->flagStartChar() << (*iu)->getFlag() << ' '; + if ( notCur || hasFlag ) + list << (*iu)->nameStartString() << (*iu)->getName(); + } + list << ')'; + return list.str(); + } + } + + // wasn't found in xor list + if (!a->getFlag().empty()) { + list << "(" << a->flagStartChar() << a->getFlag() << ' ' << + a->nameStartString() << a->getName() << ')'; + } + + return list.str(); +} + +} //namespace TCLAP +#endif diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f5a2394 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 University of Southern California. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 59fe5a6..d818557 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,186 @@ -nplm -==== +2013-07-30 + +Prerequisites +------------- + +Before compiling, you must have the following: + +A C++ compiler and GNU make + +Boost 1.47.0 or later +http://www.boost.org + +Eigen 3.1.x +http://eigen.tuxfamily.org + +Optional: + +Intel MKL 11.x +http://software.intel.com/en-us/intel-mkl +Recommended for better performance. + +Python 2.7.x, not 3.x +http://python.org + +Cython 0.19.x +http://cython.org +Needed only for building Python bindings. + +Building +-------- + +To compile, edit the Makefile to reflect the locations of the Boost +and Eigen include directories. + +If you want to use the Intel MKL library (recommended if you have it), +uncomment the line + MKL=/path/to/mkl +editing it to point to the MKL root directory. + +By default, multithreading using OpenMP is enabled. To turn it off, +comment out the line + OMP=1 + +Then run 'make install'. This creates several programs in the bin/ +directory and a library lib/neuralLM.a. + +Notes on particular configurations: + +- Intel C++ compiler and OpenMP. With version 12, you may get a + "pragma not found" error. This is reportedly fixed in ComposerXE + update 9. + +- Mac OS X and OpenMP. The Clang compiler (/usr/bin/c++) doesn't + support OpenMP. If the g++ that comes with XCode doesn't work + either, try the one installed by MacPorts (/opt/local/bin/g++ or + /opt/local/bin/g++-mp-*). + +Training a language model +------------------------- + +Building a language model requires some preprocessing. In addition to +any preprocessing of your own (tokenization, lowercasing, mapping of +digits, etc.), prepareNeuralLM (run with --help for options) does the +following: + +- Splits into training and validation data. The training data is used + to actually train the model, while the validation data is used to + check its performance. +- Creates a vocabulary of the k most frequent words, mapping all other + words to . +- Adds start and stop symbols. +- Converts to numberized n-grams. + +A typical invocation would be: + + prepareNeuralLM --train_text mydata.txt --ngram_size 3 \ + --n_vocab 5000 --words_file words \ + --train_file train.ngrams \ + --validation_size 500 --validation_file validation.ngrams + +which would generate the files train.ngrams, validation.ngrams, and words. + +These files are fed into trainNeuralNetwork (run with --help for +options). A typical invocation would be: + + trainNeuralNetwork --train_file train.ngrams \ + --validation_file validation.ngrams \ + --num_epochs 10 \ + --words_file words \ + --model_prefix model + +After each pass through the data, the trainer will print the +log-likelihood of both the training data and validation data (higher +is better) and generate a series of model files called model.1, +model.2, and so on. You choose which model you want based on the +validation log-likelihood. + +You can find a working example in the example/ directory. The Makefile +there generates a language model from a raw text file. + +Notes: + +- Vocabulary. You should set --n_vocab to something less than the + actual vocabulary size of the training data (and will receive a + warning if it's not). Otherwise, no probability will be learned for + unknown words. On the other hand, there is no need to limit n_vocab + for the sake of speed. At present, we have tested it up to 100000. + +- Normalization. Most of the computational cost normally (no pun + intended) associated with a large vocabulary has to do with + normalization of the conditional probability distribution P(word | + context). The trainer uses noise-contrastive estimation to avoid + this cost during training (Gutmann and Hyvärinen, 2010), and, by + default, sets the normalization factors to one to avoid this cost + during testing (Mnih and Hinton, 2009). + + If you set --normalization 1, the trainer will try to learn the + normalization factors, and you should accordingly turn on + normalization when using the resulting model. The default initial + value --normalization_init 0 should be fine; you can try setting it + a little higher, but not lower. + +- Validation. The trainer computes the log-likelihood of a validation + data set (which should be disjoint from the training data). You use + this to decide when to stop training, and the trainer also uses it + to throttle the learning rate. This computation always uses exact + normalization and is therefore much slower, per instance, than + training. Therefore, you should make the validation data + (--validation_size) as small as you can. (For example, Section 00 of + the Penn Treebank has about 2000 sentences and 50,000 words.) + +Python code +----------- + +prepareNeuralLM.py performs the same function as prepareNeuralLM, but in +Python. This may be handy if you want to make modifications. + +nplm.py is a pure Python module for reading and using language models +created by trainNeuralNetwork. See testNeuralLM.py for example usage. + +In src/python are Python bindings (using Cython) for the C++ code. To +build them, run 'make python/nplm.so'. + +Using in a decoder +------------------ + +To use the language model in a decoder, include neuralLM.h and link +against neuralLM.a. This provides a class nplm::neuralLM, with the +following methods: + + void set_normalization(bool normalization); + +Turn normalization on or off (default: off). If normalization is off, +the probabilities output by the model will not be normalized. In +general, this means that summing over all possible words will not give +a probability of one. If normalization is on, computes exact +probabilities (too slow to be recommended for decoding). + + void set_map_digits(char c); + +Map all digits (0-9) to the specified character. This should match +whatever mapping you used during preprocessing. + + void set_log_base(double base); + +Set the base of the log-probabilities returned by lookup_ngram. The +default is e (natural log), whereas most other language modeling +toolkits use base 10. + + void read(const string &filename); + +Read model from file. + + int get_order(); + +Return the order of the language model. + + int lookup_word(const string &word); + +Map a word to an index for use with lookup_ngram(). + + double lookup_ngram(const vector &ngram); + double lookup_ngram(const int *ngram, int n); + +Look up the log-probability of ngram. -Fork of http://nlg.isi.edu/software/nplm/ for threadsafety and efficiency. diff --git a/example/Makefile b/example/Makefile new file mode 100644 index 0000000..7984ebd --- /dev/null +++ b/example/Makefile @@ -0,0 +1,13 @@ +all: inferno.nnlm + +%.nnlm: %.txt + ./train_ngram.sh $^ $@ work + +inferno.txt: pg8800.txt + sed -n 10339,15586p $^ | ./preprocess.pl > $@ + +purgatorio.txt: pg8800.txt + sed -n 5135,10307p $^ | ./preprocess.pl > $@ + +paradiso.txt: pg8800.txt + sed -n 107,5104p $^ | ./preprocess.pl > $@ diff --git a/example/pg8800.txt b/example/pg8800.txt new file mode 100644 index 0000000..259ddcf --- /dev/null +++ b/example/pg8800.txt @@ -0,0 +1,15952 @@ +Project Gutenberg's The Divine Comedy, Complete, by Dante Alighieri + +This eBook is for the use of anyone anywhere at no cost and with +almost no restrictions whatsoever. You may copy it, give it away or +re-use it under the terms of the Project Gutenberg License included +with this eBook or online at www.gutenberg.org + + +Title: The Divine Comedy, Complete + The Vision of Paradise, Purgatory and Hell + +Author: Dante Alighieri + +Illustrator: Gustave Dore + +Translator: Rev. H. F. Cary + +Release Date: September, 2005 [Etext #8800] +Posting Date: June 11, 2009 + +Language: English + + +*** START OF THIS PROJECT GUTENBERG EBOOK THE DIVINE COMEDY, COMPLETE *** + + + + +Produced by David Widger + + + + + +THE DIVINE COMEDY + + +THE VISION + +OF + +HELL, PURGATORY, AND PARADISE + +BY + +DANTE ALIGHIERI + + + + + + +PARADISE + +Complete + + + +TRANSLATED BY + +THE REV. H. F. CARY, M.A. + + + +PARADISE + + + +LIST OF CANTOS +Canto 1 +Canto 2 +Canto 3 +Canto 4 +Canto 5 +Canto 6 +Canto 7 +Canto 8 +Canto 9 +Canto 10 +Canto 11 +Canto 12 +Canto 13 +Canto 14 +Canto 15 +Canto 16 +Canto 17 +Canto 18 +Canto 19 +Canto 20 +Canto 21 +Canto 22 +Canto 23 +Canto 24 +Canto 25 +Canto 26 +Canto 27 +Canto 28 +Canto 29 +Canto 30 +Canto 31 +Canto 32 +Canto 33 + + + + +CANTO I + +His glory, by whose might all things are mov'd, +Pierces the universe, and in one part +Sheds more resplendence, elsewhere less. In heav'n, +That largeliest of his light partakes, was I, +Witness of things, which to relate again +Surpasseth power of him who comes from thence; +For that, so near approaching its desire +Our intellect is to such depth absorb'd, +That memory cannot follow. Nathless all, +That in my thoughts I of that sacred realm +Could store, shall now be matter of my song. + +Benign Apollo! this last labour aid, +And make me such a vessel of thy worth, +As thy own laurel claims of me belov'd. +Thus far hath one of steep Parnassus' brows +Suffic'd me; henceforth there is need of both +For my remaining enterprise Do thou +Enter into my bosom, and there breathe +So, as when Marsyas by thy hand was dragg'd +Forth from his limbs unsheath'd. O power divine! +If thou to me of shine impart so much, +That of that happy realm the shadow'd form +Trac'd in my thoughts I may set forth to view, +Thou shalt behold me of thy favour'd tree +Come to the foot, and crown myself with leaves; +For to that honour thou, and my high theme +Will fit me. If but seldom, mighty Sire! +To grace his triumph gathers thence a wreath +Caesar or bard (more shame for human wills +Deprav'd) joy to the Delphic god must spring +From the Pierian foliage, when one breast +Is with such thirst inspir'd. From a small spark +Great flame hath risen: after me perchance +Others with better voice may pray, and gain +From the Cirrhaean city answer kind. + +Through diver passages, the world's bright lamp +Rises to mortals, but through that which joins +Four circles with the threefold cross, in best +Course, and in happiest constellation set +He comes, and to the worldly wax best gives +Its temper and impression. Morning there, +Here eve was by almost such passage made; +And whiteness had o'erspread that hemisphere, +Blackness the other part; when to the left +I saw Beatrice turn'd, and on the sun +Gazing, as never eagle fix'd his ken. +As from the first a second beam is wont +To issue, and reflected upwards rise, +E'en as a pilgrim bent on his return, +So of her act, that through the eyesight pass'd +Into my fancy, mine was form'd; and straight, +Beyond our mortal wont, I fix'd mine eyes +Upon the sun. Much is allowed us there, +That here exceeds our pow'r; thanks to the place +Made for the dwelling of the human kind + +I suffer'd it not long, and yet so long +That I beheld it bick'ring sparks around, +As iron that comes boiling from the fire. +And suddenly upon the day appear'd +A day new-ris'n, as he, who hath the power, +Had with another sun bedeck'd the sky. + +Her eyes fast fix'd on the eternal wheels, +Beatrice stood unmov'd; and I with ken +Fix'd upon her, from upward gaze remov'd +At her aspect, such inwardly became +As Glaucus, when he tasted of the herb, +That made him peer among the ocean gods; +Words may not tell of that transhuman change: +And therefore let the example serve, though weak, +For those whom grace hath better proof in store + +If I were only what thou didst create, +Then newly, Love! by whom the heav'n is rul'd, +Thou know'st, who by thy light didst bear me up. +Whenas the wheel which thou dost ever guide, +Desired Spirit! with its harmony +Temper'd of thee and measur'd, charm'd mine ear, +Then seem'd to me so much of heav'n to blaze +With the sun's flame, that rain or flood ne'er made +A lake so broad. The newness of the sound, +And that great light, inflam'd me with desire, +Keener than e'er was felt, to know their cause. + +Whence she who saw me, clearly as myself, +To calm my troubled mind, before I ask'd, +Open'd her lips, and gracious thus began: +"With false imagination thou thyself +Mak'st dull, so that thou seest not the thing, +Which thou hadst seen, had that been shaken off. +Thou art not on the earth as thou believ'st; +For light'ning scap'd from its own proper place +Ne'er ran, as thou hast hither now return'd." + +Although divested of my first-rais'd doubt, +By those brief words, accompanied with smiles, +Yet in new doubt was I entangled more, +And said: "Already satisfied, I rest +From admiration deep, but now admire +How I above those lighter bodies rise." + +Whence, after utt'rance of a piteous sigh, +She tow'rds me bent her eyes, with such a look, +As on her frenzied child a mother casts; +Then thus began: "Among themselves all things +Have order; and from hence the form, which makes +The universe resemble God. In this +The higher creatures see the printed steps +Of that eternal worth, which is the end +Whither the line is drawn. All natures lean, +In this their order, diversely, some more, +Some less approaching to their primal source. +Thus they to different havens are mov'd on +Through the vast sea of being, and each one +With instinct giv'n, that bears it in its course; +This to the lunar sphere directs the fire, +This prompts the hearts of mortal animals, +This the brute earth together knits, and binds. +Nor only creatures, void of intellect, +Are aim'd at by this bow; but even those, +That have intelligence and love, are pierc'd. +That Providence, who so well orders all, +With her own light makes ever calm the heaven, +In which the substance, that hath greatest speed, +Is turn'd: and thither now, as to our seat +Predestin'd, we are carried by the force +Of that strong cord, that never looses dart, +But at fair aim and glad. Yet is it true, +That as ofttimes but ill accords the form +To the design of art, through sluggishness +Of unreplying matter, so this course +Is sometimes quitted by the creature, who +Hath power, directed thus, to bend elsewhere; +As from a cloud the fire is seen to fall, +From its original impulse warp'd, to earth, +By vicious fondness. Thou no more admire +Thy soaring, (if I rightly deem,) than lapse +Of torrent downwards from a mountain's height. +There would in thee for wonder be more cause, +If, free of hind'rance, thou hadst fix'd thyself +Below, like fire unmoving on the earth." + +So said, she turn'd toward the heav'n her face. + + + + +CANTO II + +All ye, who in small bark have following sail'd, +Eager to listen, on the advent'rous track +Of my proud keel, that singing cuts its way, +Backward return with speed, and your own shores +Revisit, nor put out to open sea, +Where losing me, perchance ye may remain +Bewilder'd in deep maze. The way I pass +Ne'er yet was run: Minerva breathes the gale, +Apollo guides me, and another Nine +To my rapt sight the arctic beams reveal. +Ye other few, who have outstretch'd the neck. +Timely for food of angels, on which here +They live, yet never know satiety, +Through the deep brine ye fearless may put out +Your vessel, marking, well the furrow broad +Before you in the wave, that on both sides +Equal returns. Those, glorious, who pass'd o'er +To Colchos, wonder'd not as ye will do, +When they saw Jason following the plough. + +The increate perpetual thirst, that draws +Toward the realm of God's own form, bore us +Swift almost as the heaven ye behold. + +Beatrice upward gaz'd, and I on her, +And in such space as on the notch a dart +Is plac'd, then loosen'd flies, I saw myself +Arriv'd, where wond'rous thing engag'd my sight. +Whence she, to whom no work of mine was hid, +Turning to me, with aspect glad as fair, +Bespake me: "Gratefully direct thy mind +To God, through whom to this first star we come." + +Me seem'd as if a cloud had cover'd us, +Translucent, solid, firm, and polish'd bright, +Like adamant, which the sun's beam had smit +Within itself the ever-during pearl +Receiv'd us, as the wave a ray of light +Receives, and rests unbroken. If I then +Was of corporeal frame, and it transcend +Our weaker thought, how one dimension thus +Another could endure, which needs must be +If body enter body, how much more +Must the desire inflame us to behold +That essence, which discovers by what means +God and our nature join'd! There will be seen +That which we hold through faith, not shown by proof, +But in itself intelligibly plain, +E'en as the truth that man at first believes. + +I answered: "Lady! I with thoughts devout, +Such as I best can frame, give thanks to Him, +Who hath remov'd me from the mortal world. +But tell, I pray thee, whence the gloomy spots +Upon this body, which below on earth +Give rise to talk of Cain in fabling quaint?" + +She somewhat smil'd, then spake: "If mortals err +In their opinion, when the key of sense +Unlocks not, surely wonder's weapon keen +Ought not to pierce thee; since thou find'st, the wings +Of reason to pursue the senses' flight +Are short. But what thy own thought is, declare." + +Then I: "What various here above appears, +Is caus'd, I deem, by bodies dense or rare." + +She then resum'd: "Thou certainly wilt see +In falsehood thy belief o'erwhelm'd, if well +Thou listen to the arguments, which I +Shall bring to face it. The eighth sphere displays +Numberless lights, the which in kind and size +May be remark'd of different aspects; +If rare or dense of that were cause alone, +One single virtue then would be in all, +Alike distributed, or more, or less. +Different virtues needs must be the fruits +Of formal principles, and these, save one, +Will by thy reasoning be destroy'd. Beside, +If rarity were of that dusk the cause, +Which thou inquirest, either in some part +That planet must throughout be void, nor fed +With its own matter; or, as bodies share +Their fat and leanness, in like manner this +Must in its volume change the leaves. The first, +If it were true, had through the sun's eclipse +Been manifested, by transparency +Of light, as through aught rare beside effus'd. +But this is not. Therefore remains to see +The other cause: and if the other fall, +Erroneous so must prove what seem'd to thee. +If not from side to side this rarity +Pass through, there needs must be a limit, whence +Its contrary no further lets it pass. +And hence the beam, that from without proceeds, +Must be pour'd back, as colour comes, through glass +Reflected, which behind it lead conceals. +Now wilt thou say, that there of murkier hue +Than in the other part the ray is shown, +By being thence refracted farther back. +From this perplexity will free thee soon +Experience, if thereof thou trial make, +The fountain whence your arts derive their streame. +Three mirrors shalt thou take, and two remove +From thee alike, and more remote the third. +Betwixt the former pair, shall meet thine eyes; +Then turn'd toward them, cause behind thy back +A light to stand, that on the three shall shine, +And thus reflected come to thee from all. +Though that beheld most distant do not stretch +A space so ample, yet in brightness thou +Will own it equaling the rest. But now, +As under snow the ground, if the warm ray +Smites it, remains dismantled of the hue +And cold, that cover'd it before, so thee, +Dismantled in thy mind, I will inform +With light so lively, that the tremulous beam +Shall quiver where it falls. Within the heaven, +Where peace divine inhabits, circles round +A body, in whose virtue dies the being +Of all that it contains. The following heaven, +That hath so many lights, this being divides, +Through different essences, from it distinct, +And yet contain'd within it. The other orbs +Their separate distinctions variously +Dispose, for their own seed and produce apt. +Thus do these organs of the world proceed, +As thou beholdest now, from step to step, +Their influences from above deriving, +And thence transmitting downwards. Mark me well, +How through this passage to the truth I ford, +The truth thou lov'st, that thou henceforth alone, +May'st know to keep the shallows, safe, untold. + +"The virtue and motion of the sacred orbs, +As mallet by the workman's hand, must needs +By blessed movers be inspir'd. This heaven, +Made beauteous by so many luminaries, +From the deep spirit, that moves its circling sphere, +Its image takes an impress as a seal: +And as the soul, that dwells within your dust, +Through members different, yet together form'd, +In different pow'rs resolves itself; e'en so +The intellectual efficacy unfolds +Its goodness multiplied throughout the stars; +On its own unity revolving still. +Different virtue compact different +Makes with the precious body it enlivens, +With which it knits, as life in you is knit. +From its original nature full of joy, +The virtue mingled through the body shines, +As joy through pupil of the living eye. +From hence proceeds, that which from light to light +Seems different, and not from dense or rare. +This is the formal cause, that generates +Proportion'd to its power, the dusk or clear." + + + + +CANTO III + +That sun, which erst with love my bosom warm'd +Had of fair truth unveil'd the sweet aspect, +By proof of right, and of the false reproof; +And I, to own myself convinc'd and free +Of doubt, as much as needed, rais'd my head +Erect for speech. But soon a sight appear'd, +Which, so intent to mark it, held me fix'd, +That of confession I no longer thought. + +As through translucent and smooth glass, or wave +Clear and unmov'd, and flowing not so deep +As that its bed is dark, the shape returns +So faint of our impictur'd lineaments, +That on white forehead set a pearl as strong +Comes to the eye: such saw I many a face, +All stretch'd to speak, from whence I straight conceiv'd +Delusion opposite to that, which rais'd +Between the man and fountain, amorous flame. + +Sudden, as I perceiv'd them, deeming these +Reflected semblances to see of whom +They were, I turn'd mine eyes, and nothing saw; +Then turn'd them back, directed on the light +Of my sweet guide, who smiling shot forth beams +From her celestial eyes. "Wonder not thou," +She cry'd, "at this my smiling, when I see +Thy childish judgment; since not yet on truth +It rests the foot, but, as it still is wont, +Makes thee fall back in unsound vacancy. +True substances are these, which thou behold'st, +Hither through failure of their vow exil'd. +But speak thou with them; listen, and believe, +That the true light, which fills them with desire, +Permits not from its beams their feet to stray." + +Straight to the shadow which for converse seem'd +Most earnest, I addressed me, and began, +As one by over-eagerness perplex'd: +"O spirit, born for joy! who in the rays +Of life eternal, of that sweetness know'st +The flavour, which, not tasted, passes far +All apprehension, me it well would please, +If thou wouldst tell me of thy name, and this +Your station here." Whence she, with kindness prompt, +And eyes glist'ning with smiles: "Our charity, +To any wish by justice introduc'd, +Bars not the door, no more than she above, +Who would have all her court be like herself. +I was a virgin sister in the earth; +And if thy mind observe me well, this form, +With such addition grac'd of loveliness, +Will not conceal me long, but thou wilt know +Piccarda, in the tardiest sphere thus plac'd, +Here 'mid these other blessed also blest. +Our hearts, whose high affections burn alone +With pleasure, from the Holy Spirit conceiv'd, +Admitted to his order dwell in joy. +And this condition, which appears so low, +Is for this cause assign'd us, that our vows +Were in some part neglected and made void." + +Whence I to her replied: "Something divine +Beams in your countenance, wond'rous fair, +From former knowledge quite transmuting you. +Therefore to recollect was I so slow. +But what thou sayst hath to my memory +Given now such aid, that to retrace your forms +Is easier. Yet inform me, ye, who here +Are happy, long ye for a higher place +More to behold, and more in love to dwell?" + +She with those other spirits gently smil'd, +Then answer'd with such gladness, that she seem'd +With love's first flame to glow: "Brother! our will +Is in composure settled by the power +Of charity, who makes us will alone +What we possess, and nought beyond desire; +If we should wish to be exalted more, +Then must our wishes jar with the high will +Of him, who sets us here, which in these orbs +Thou wilt confess not possible, if here +To be in charity must needs befall, +And if her nature well thou contemplate. +Rather it is inherent in this state +Of blessedness, to keep ourselves within +The divine will, by which our wills with his +Are one. So that as we from step to step +Are plac'd throughout this kingdom, pleases all, +E'en as our King, who in us plants his will; +And in his will is our tranquillity; +It is the mighty ocean, whither tends +Whatever it creates and nature makes." + +Then saw I clearly how each spot in heav'n +Is Paradise, though with like gracious dew +The supreme virtue show'r not over all. + +But as it chances, if one sort of food +Hath satiated, and of another still +The appetite remains, that this is ask'd, +And thanks for that return'd; e'en so did I +In word and motion, bent from her to learn +What web it was, through which she had not drawn +The shuttle to its point. She thus began: +"Exalted worth and perfectness of life +The Lady higher up enshrine in heaven, +By whose pure laws upon your nether earth +The robe and veil they wear, to that intent, +That e'en till death they may keep watch or sleep +With their great bridegroom, who accepts each vow, +Which to his gracious pleasure love conforms. +from the world, to follow her, when young +Escap'd; and, in her vesture mantling me, +Made promise of the way her sect enjoins. +Thereafter men, for ill than good more apt, +Forth snatch'd me from the pleasant cloister's pale. +God knows how after that my life was fram'd. +This other splendid shape, which thou beholdst +At my right side, burning with all the light +Of this our orb, what of myself I tell +May to herself apply. From her, like me +A sister, with like violence were torn +The saintly folds, that shaded her fair brows. +E'en when she to the world again was brought +In spite of her own will and better wont, +Yet not for that the bosom's inward veil +Did she renounce. This is the luminary +Of mighty Constance, who from that loud blast, +Which blew the second over Suabia's realm, +That power produc'd, which was the third and last." + +She ceas'd from further talk, and then began +"Ave Maria" singing, and with that song +Vanish'd, as heavy substance through deep wave. + +Mine eye, that far as it was capable, +Pursued her, when in dimness she was lost, +Turn'd to the mark where greater want impell'd, +And bent on Beatrice all its gaze. +But she as light'ning beam'd upon my looks: +So that the sight sustain'd it not at first. +Whence I to question her became less prompt. + + + + +CANTO IV + +Between two kinds of food, both equally +Remote and tempting, first a man might die +Of hunger, ere he one could freely choose. +E'en so would stand a lamb between the maw +Of two fierce wolves, in dread of both alike: +E'en so between two deer a dog would stand, +Wherefore, if I was silent, fault nor praise +I to myself impute, by equal doubts +Held in suspense, since of necessity +It happen'd. Silent was I, yet desire +Was painted in my looks; and thus I spake +My wish more earnestly than language could. + +As Daniel, when the haughty king he freed +From ire, that spurr'd him on to deeds unjust +And violent; so look'd Beatrice then. + +"Well I discern," she thus her words address'd, +"How contrary desires each way constrain thee, +So that thy anxious thought is in itself +Bound up and stifled, nor breathes freely forth. +Thou arguest; if the good intent remain; +What reason that another's violence +Should stint the measure of my fair desert? + +"Cause too thou findst for doubt, in that it seems, +That spirits to the stars, as Plato deem'd, +Return. These are the questions which thy will +Urge equally; and therefore I the first +Of that will treat which hath the more of gall. +Of seraphim he who is most ensky'd, +Moses and Samuel, and either John, +Choose which thou wilt, nor even Mary's self, +Have not in any other heav'n their seats, +Than have those spirits which so late thou saw'st; +Nor more or fewer years exist; but all +Make the first circle beauteous, diversely +Partaking of sweet life, as more or less +Afflation of eternal bliss pervades them. +Here were they shown thee, not that fate assigns +This for their sphere, but for a sign to thee +Of that celestial furthest from the height. +Thus needs, that ye may apprehend, we speak: +Since from things sensible alone ye learn +That, which digested rightly after turns +To intellectual. For no other cause +The scripture, condescending graciously +To your perception, hands and feet to God +Attributes, nor so means: and holy church +Doth represent with human countenance +Gabriel, and Michael, and him who made +Tobias whole. Unlike what here thou seest, +The judgment of Timaeus, who affirms +Each soul restor'd to its particular star, +Believing it to have been taken thence, +When nature gave it to inform her mold: +Since to appearance his intention is +E'en what his words declare: or else to shun +Derision, haply thus he hath disguis'd +His true opinion. If his meaning be, +That to the influencing of these orbs revert +The honour and the blame in human acts, +Perchance he doth not wholly miss the truth. +This principle, not understood aright, +Erewhile perverted well nigh all the world; +So that it fell to fabled names of Jove, +And Mercury, and Mars. That other doubt, +Which moves thee, is less harmful; for it brings +No peril of removing thee from me. + +"That, to the eye of man, our justice seems +Unjust, is argument for faith, and not +For heretic declension. To the end +This truth may stand more clearly in your view, +I will content thee even to thy wish + +"If violence be, when that which suffers, nought +Consents to that which forceth, not for this +These spirits stood exculpate. For the will, +That will not, still survives unquench'd, and doth +As nature doth in fire, tho' violence +Wrest it a thousand times; for, if it yield +Or more or less, so far it follows force. +And thus did these, whom they had power to seek +The hallow'd place again. In them, had will +Been perfect, such as once upon the bars +Held Laurence firm, or wrought in Scaevola +To his own hand remorseless, to the path, +Whence they were drawn, their steps had hasten'd back, +When liberty return'd: but in too few +Resolve so steadfast dwells. And by these words +If duly weigh'd, that argument is void, +Which oft might have perplex'd thee still. But now +Another question thwarts thee, which to solve +Might try thy patience without better aid. +I have, no doubt, instill'd into thy mind, +That blessed spirit may not lie; since near +The source of primal truth it dwells for aye: +And thou might'st after of Piccarda learn +That Constance held affection to the veil; +So that she seems to contradict me here. +Not seldom, brother, it hath chanc'd for men +To do what they had gladly left undone, +Yet to shun peril they have done amiss: +E'en as Alcmaeon, at his father's suit +Slew his own mother, so made pitiless +Not to lose pity. On this point bethink thee, +That force and will are blended in such wise +As not to make the' offence excusable. +Absolute will agrees not to the wrong, +That inasmuch as there is fear of woe +From non-compliance, it agrees. Of will +Thus absolute Piccarda spake, and I +Of th' other; so that both have truly said." + +Such was the flow of that pure rill, that well'd +From forth the fountain of all truth; and such +The rest, that to my wond'ring thoughts I found. + +"O thou of primal love the prime delight! +Goddess!" I straight reply'd, "whose lively words +Still shed new heat and vigour through my soul! +Affection fails me to requite thy grace +With equal sum of gratitude: be his +To recompense, who sees and can reward thee. +Well I discern, that by that truth alone +Enlighten'd, beyond which no truth may roam, +Our mind can satisfy her thirst to know: +Therein she resteth, e'en as in his lair +The wild beast, soon as she hath reach'd that bound, +And she hath power to reach it; else desire +Were given to no end. And thence doth doubt +Spring, like a shoot, around the stock of truth; +And it is nature which from height to height +On to the summit prompts us. This invites, +This doth assure me, lady, rev'rently +To ask thee of other truth, that yet +Is dark to me. I fain would know, if man +By other works well done may so supply +The failure of his vows, that in your scale +They lack not weight." I spake; and on me straight +Beatrice look'd with eyes that shot forth sparks +Of love celestial in such copious stream, +That, virtue sinking in me overpower'd, +I turn'd, and downward bent confus'd my sight. + + + + +CANTO V + +"If beyond earthly wont, the flame of love +Illume me, so that I o'ercome thy power +Of vision, marvel not: but learn the cause +In that perfection of the sight, which soon +As apprehending, hasteneth on to reach +The good it apprehends. I well discern, +How in thine intellect already shines +The light eternal, which to view alone +Ne'er fails to kindle love; and if aught else +Your love seduces, 't is but that it shows +Some ill-mark'd vestige of that primal beam. + +"This would'st thou know, if failure of the vow +By other service may be so supplied, +As from self-question to assure the soul." + +Thus she her words, not heedless of my wish, +Began; and thus, as one who breaks not off +Discourse, continued in her saintly strain. +"Supreme of gifts, which God creating gave +Of his free bounty, sign most evident +Of goodness, and in his account most priz'd, +Was liberty of will, the boon wherewith +All intellectual creatures, and them sole +He hath endow'd. Hence now thou mayst infer +Of what high worth the vow, which so is fram'd +That when man offers, God well-pleas'd accepts; +For in the compact between God and him, +This treasure, such as I describe it to thee, +He makes the victim, and of his own act. +What compensation therefore may he find? +If that, whereof thou hast oblation made, +By using well thou think'st to consecrate, +Thou would'st of theft do charitable deed. +Thus I resolve thee of the greater point. + +"But forasmuch as holy church, herein +Dispensing, seems to contradict the truth +I have discover'd to thee, yet behooves +Thou rest a little longer at the board, +Ere the crude aliment, which thou hast taken, +Digested fitly to nutrition turn. +Open thy mind to what I now unfold, +And give it inward keeping. Knowledge comes +Of learning well retain'd, unfruitful else. + +"This sacrifice in essence of two things +Consisteth; one is that, whereof 't is made, +The covenant the other. For the last, +It ne'er is cancell'd if not kept: and hence +I spake erewhile so strictly of its force. +For this it was enjoin'd the Israelites, +Though leave were giv'n them, as thou know'st, to change +The offering, still to offer. Th' other part, +The matter and the substance of the vow, +May well be such, to that without offence +It may for other substance be exchang'd. +But at his own discretion none may shift +The burden on his shoulders, unreleas'd +By either key, the yellow and the white. +Nor deem of any change, as less than vain, +If the last bond be not within the new +Included, as the quatre in the six. +No satisfaction therefore can be paid +For what so precious in the balance weighs, +That all in counterpoise must kick the beam. +Take then no vow at random: ta'en, with faith +Preserve it; yet not bent, as Jephthah once, +Blindly to execute a rash resolve, +Whom better it had suited to exclaim, +'I have done ill,' than to redeem his pledge +By doing worse or, not unlike to him +In folly, that great leader of the Greeks: +Whence, on the alter, Iphigenia mourn'd +Her virgin beauty, and hath since made mourn +Both wise and simple, even all, who hear +Of so fell sacrifice. Be ye more staid, +O Christians, not, like feather, by each wind +Removable: nor think to cleanse ourselves +In every water. Either testament, +The old and new, is yours: and for your guide +The shepherd of the church let this suffice +To save you. When by evil lust entic'd, +Remember ye be men, not senseless beasts; +Nor let the Jew, who dwelleth in your streets, +Hold you in mock'ry. Be not, as the lamb, +That, fickle wanton, leaves its mother's milk, +To dally with itself in idle play." + +Such were the words that Beatrice spake: +These ended, to that region, where the world +Is liveliest, full of fond desire she turn'd. + +Though mainly prompt new question to propose, +Her silence and chang'd look did keep me dumb. +And as the arrow, ere the cord is still, +Leapeth unto its mark; so on we sped +Into the second realm. There I beheld +The dame, so joyous enter, that the orb +Grew brighter at her smiles; and, if the star +Were mov'd to gladness, what then was my cheer, +Whom nature hath made apt for every change! + +As in a quiet and clear lake the fish, +If aught approach them from without, do draw +Towards it, deeming it their food; so drew +Full more than thousand splendours towards us, +And in each one was heard: "Lo! one arriv'd +To multiply our loves!" and as each came +The shadow, streaming forth effulgence new, +Witness'd augmented joy. Here, reader! think, +If thou didst miss the sequel of my tale, +To know the rest how sorely thou wouldst crave; +And thou shalt see what vehement desire +Possess'd me, as soon as these had met my view, +To know their state. "O born in happy hour! +Thou to whom grace vouchsafes, or ere thy close +Of fleshly warfare, to behold the thrones +Of that eternal triumph, know to us +The light communicated, which through heaven +Expatiates without bound. Therefore, if aught +Thou of our beams wouldst borrow for thine aid, +Spare not; and of our radiance take thy fill." + +Thus of those piteous spirits one bespake me; +And Beatrice next: "Say on; and trust +As unto gods!"--"How in the light supreme +Thou harbour'st, and from thence the virtue bring'st, +That, sparkling in thine eyes, denotes thy joy, +I mark; but, who thou art, am still to seek; +Or wherefore, worthy spirit! for thy lot +This sphere assign'd, that oft from mortal ken +Is veil'd by others' beams." I said, and turn'd +Toward the lustre, that with greeting, kind +Erewhile had hail'd me. Forthwith brighter far +Than erst, it wax'd: and, as himself the sun +Hides through excess of light, when his warm gaze +Hath on the mantle of thick vapours prey'd; +Within its proper ray the saintly shape +Was, through increase of gladness, thus conceal'd; +And, shrouded so in splendour answer'd me, +E'en as the tenour of my song declares. + + + + +CANTO VI + +"After that Constantine the eagle turn'd +Against the motions of the heav'n, that roll'd +Consenting with its course, when he of yore, +Lavinia's spouse, was leader of the flight, +A hundred years twice told and more, his seat +At Europe's extreme point, the bird of Jove +Held, near the mountains, whence he issued first. +There, under shadow of his sacred plumes +Swaying the world, till through successive hands +To mine he came devolv'd. Caesar I was, +And am Justinian; destin'd by the will +Of that prime love, whose influence I feel, +From vain excess to clear th' encumber'd laws. +Or ere that work engag'd me, I did hold +Christ's nature merely human, with such faith +Contented. But the blessed Agapete, +Who was chief shepherd, he with warning voice +To the true faith recall'd me. I believ'd +His words: and what he taught, now plainly see, +As thou in every contradiction seest +The true and false oppos'd. Soon as my feet +Were to the church reclaim'd, to my great task, +By inspiration of God's grace impell'd, +I gave me wholly, and consign'd mine arms +To Belisarius, with whom heaven's right hand +Was link'd in such conjointment, 't was a sign +That I should rest. To thy first question thus +I shape mine answer, which were ended here, +But that its tendency doth prompt perforce +To some addition; that thou well, mayst mark +What reason on each side they have to plead, +By whom that holiest banner is withstood, +Both who pretend its power and who oppose. + +"Beginning from that hour, when Pallas died +To give it rule, behold the valorous deeds +Have made it worthy reverence. Not unknown +To thee, how for three hundred years and more +It dwelt in Alba, up to those fell lists +Where for its sake were met the rival three; +Nor aught unknown to thee, which it achiev'd +Down to the Sabines' wrong to Lucrece' woe, +With its sev'n kings conqu'ring the nation round; +Nor all it wrought, by Roman worthies home +'Gainst Brennus and th' Epirot prince, and hosts +Of single chiefs, or states in league combin'd +Of social warfare; hence Torquatus stern, +And Quintius nam'd of his neglected locks, +The Decii, and the Fabii hence acquir'd +Their fame, which I with duteous zeal embalm. +By it the pride of Arab hordes was quell'd, +When they led on by Hannibal o'erpass'd +The Alpine rocks, whence glide thy currents, Po! +Beneath its guidance, in their prime of days +Scipio and Pompey triumph'd; and that hill, +Under whose summit thou didst see the light, +Rued its stern bearing. After, near the hour, +When heav'n was minded that o'er all the world +His own deep calm should brood, to Caesar's hand +Did Rome consign it; and what then it wrought +From Var unto the Rhine, saw Isere's flood, +Saw Loire and Seine, and every vale, that fills +The torrent Rhone. What after that it wrought, +When from Ravenna it came forth, and leap'd +The Rubicon, was of so bold a flight, +That tongue nor pen may follow it. Tow'rds Spain +It wheel'd its bands, then tow'rd Dyrrachium smote, +And on Pharsalia with so fierce a plunge, +E'en the warm Nile was conscious to the pang; +Its native shores Antandros, and the streams +Of Simois revisited, and there +Where Hector lies; then ill for Ptolemy +His pennons shook again; lightning thence fell +On Juba; and the next upon your west, +At sound of the Pompeian trump, return'd. + +"What following and in its next bearer's gripe +It wrought, is now by Cassius and Brutus +Bark'd off in hell, and by Perugia's sons +And Modena's was mourn'd. Hence weepeth still +Sad Cleopatra, who, pursued by it, +Took from the adder black and sudden death. +With him it ran e'en to the Red Sea coast; +With him compos'd the world to such a peace, +That of his temple Janus barr'd the door. + +"But all the mighty standard yet had wrought, +And was appointed to perform thereafter, +Throughout the mortal kingdom which it sway'd, +Falls in appearance dwindled and obscur'd, +If one with steady eye and perfect thought +On the third Caesar look; for to his hands, +The living Justice, in whose breath I move, +Committed glory, e'en into his hands, +To execute the vengeance of its wrath. + +"Hear now and wonder at what next I tell. +After with Titus it was sent to wreak +Vengeance for vengeance of the ancient sin, +And, when the Lombard tooth, with fangs impure, +Did gore the bosom of the holy church, +Under its wings victorious, Charlemagne +Sped to her rescue. Judge then for thyself +Of those, whom I erewhile accus'd to thee, +What they are, and how grievous their offending, +Who are the cause of all your ills. The one +Against the universal ensign rears +The yellow lilies, and with partial aim +That to himself the other arrogates: +So that 't is hard to see which more offends. +Be yours, ye Ghibellines, to veil your arts +Beneath another standard: ill is this +Follow'd of him, who severs it and justice: +And let not with his Guelphs the new-crown'd Charles +Assail it, but those talons hold in dread, +Which from a lion of more lofty port +Have rent the easing. Many a time ere now +The sons have for the sire's transgression wail'd; +Nor let him trust the fond belief, that heav'n +Will truck its armour for his lilied shield. + +"This little star is furnish'd with good spirits, +Whose mortal lives were busied to that end, +That honour and renown might wait on them: +And, when desires thus err in their intention, +True love must needs ascend with slacker beam. +But it is part of our delight, to measure +Our wages with the merit; and admire +The close proportion. Hence doth heav'nly justice +Temper so evenly affection in us, +It ne'er can warp to any wrongfulness. +Of diverse voices is sweet music made: +So in our life the different degrees +Render sweet harmony among these wheels. + +"Within the pearl, that now encloseth us, +Shines Romeo's light, whose goodly deed and fair +Met ill acceptance. But the Provencals, +That were his foes, have little cause for mirth. +Ill shapes that man his course, who makes his wrong +Of other's worth. Four daughters were there born +To Raymond Berenger, and every one +Became a queen; and this for him did Romeo, +Though of mean state and from a foreign land. +Yet envious tongues incited him to ask +A reckoning of that just one, who return'd +Twelve fold to him for ten. Aged and poor +He parted thence: and if the world did know +The heart he had, begging his life by morsels, +'T would deem the praise, it yields him, scantly dealt." + + + + +CANTO VII + +"Hosanna Sanctus Deus Sabaoth +Superillustrans claritate tua +Felices ignes horum malahoth!" +Thus chanting saw I turn that substance bright +With fourfold lustre to its orb again, +Revolving; and the rest unto their dance +With it mov'd also; and like swiftest sparks, +In sudden distance from my sight were veil'd. + +Me doubt possess'd, and "Speak," it whisper'd me, +"Speak, speak unto thy lady, that she quench +Thy thirst with drops of sweetness." Yet blank awe, +Which lords it o'er me, even at the sound +Of Beatrice's name, did bow me down +As one in slumber held. Not long that mood +Beatrice suffer'd: she, with such a smile, +As might have made one blest amid the flames, +Beaming upon me, thus her words began: +"Thou in thy thought art pond'ring (as I deem), +And what I deem is truth how just revenge +Could be with justice punish'd: from which doubt +I soon will free thee; so thou mark my words; +For they of weighty matter shall possess thee. + +"That man, who was unborn, himself condemn'd, +And, in himself, all, who since him have liv'd, +His offspring: whence, below, the human kind +Lay sick in grievous error many an age; +Until it pleas'd the Word of God to come +Amongst them down, to his own person joining +The nature, from its Maker far estrang'd, +By the mere act of his eternal love. +Contemplate here the wonder I unfold. +The nature with its Maker thus conjoin'd, +Created first was blameless, pure and good; +But through itself alone was driven forth +From Paradise, because it had eschew'd +The way of truth and life, to evil turn'd. +Ne'er then was penalty so just as that +Inflicted by the cross, if thou regard +The nature in assumption doom'd: ne'er wrong +So great, in reference to him, who took +Such nature on him, and endur'd the doom. +God therefore and the Jews one sentence pleased: +So different effects flow'd from one act, +And heav'n was open'd, though the earth did quake. +Count it not hard henceforth, when thou dost hear +That a just vengeance was by righteous court +Justly reveng'd. But yet I see thy mind +By thought on thought arising sore perplex'd, +And with how vehement desire it asks +Solution of the maze. What I have heard, +Is plain, thou sayst: but wherefore God this way +For our redemption chose, eludes my search. + +"Brother! no eye of man not perfected, +Nor fully ripen'd in the flame of love, +May fathom this decree. It is a mark, +In sooth, much aim'd at, and but little kenn'd: +And I will therefore show thee why such way +Was worthiest. The celestial love, that spume +All envying in its bounty, in itself +With such effulgence blazeth, as sends forth +All beauteous things eternal. What distils +Immediate thence, no end of being knows, +Bearing its seal immutably impress'd. +Whatever thence immediate falls, is free, +Free wholly, uncontrollable by power +Of each thing new: by such conformity +More grateful to its author, whose bright beams, +Though all partake their shining, yet in those +Are liveliest, which resemble him the most. +These tokens of pre-eminence on man +Largely bestow'd, if any of them fail, +He needs must forfeit his nobility, +No longer stainless. Sin alone is that, +Which doth disfranchise him, and make unlike +To the chief good; for that its light in him +Is darken'd. And to dignity thus lost +Is no return; unless, where guilt makes void, +He for ill pleasure pay with equal pain. +Your nature, which entirely in its seed +Trangress'd, from these distinctions fell, no less +Than from its state in Paradise; nor means +Found of recovery (search all methods out +As strickly as thou may) save one of these, +The only fords were left through which to wade, +Either that God had of his courtesy +Releas'd him merely, or else man himself +For his own folly by himself aton'd. + +"Fix now thine eye, intently as thou canst, +On th' everlasting counsel, and explore, +Instructed by my words, the dread abyss. + +"Man in himself had ever lack'd the means +Of satisfaction, for he could not stoop +Obeying, in humility so low, +As high he, disobeying, thought to soar: +And for this reason he had vainly tried +Out of his own sufficiency to pay +The rigid satisfaction. Then behooved +That God should by his own ways lead him back +Unto the life, from whence he fell, restor'd: +By both his ways, I mean, or one alone. +But since the deed is ever priz'd the more, +The more the doer's good intent appears, +Goodness celestial, whose broad signature +Is on the universe, of all its ways +To raise ye up, was fain to leave out none, +Nor aught so vast or so magnificent, +Either for him who gave or who receiv'd +Between the last night and the primal day, +Was or can be. For God more bounty show'd. +Giving himself to make man capable +Of his return to life, than had the terms +Been mere and unconditional release. +And for his justice, every method else +Were all too scant, had not the Son of God +Humbled himself to put on mortal flesh. + +"Now, to fulfil each wish of thine, remains +I somewhat further to thy view unfold. +That thou mayst see as clearly as myself. + +"I see, thou sayst, the air, the fire I see, +The earth and water, and all things of them +Compounded, to corruption turn, and soon +Dissolve. Yet these were also things create, +Because, if what were told me, had been true +They from corruption had been therefore free. + +"The angels, O my brother! and this clime +Wherein thou art, impassible and pure, +I call created, as indeed they are +In their whole being. But the elements, +Which thou hast nam'd, and what of them is made, +Are by created virtue' inform'd: create +Their substance, and create the' informing virtue +In these bright stars, that round them circling move +The soul of every brute and of each plant, +The ray and motion of the sacred lights, +With complex potency attract and turn. +But this our life the' eternal good inspires +Immediate, and enamours of itself; +So that our wishes rest for ever here. + +"And hence thou mayst by inference conclude +Our resurrection certain, if thy mind +Consider how the human flesh was fram'd, +When both our parents at the first were made." + + + + +CANTO VIII + +The world was in its day of peril dark +Wont to believe the dotage of fond love +From the fair Cyprian deity, who rolls +In her third epicycle, shed on men +By stream of potent radiance: therefore they +Of elder time, in their old error blind, +Not her alone with sacrifice ador'd +And invocation, but like honours paid +To Cupid and Dione, deem'd of them +Her mother, and her son, him whom they feign'd +To sit in Dido's bosom: and from her, +Whom I have sung preluding, borrow'd they +The appellation of that star, which views, +Now obvious and now averse, the sun. + +I was not ware that I was wafted up +Into its orb; but the new loveliness +That grac'd my lady, gave me ample proof +That we had entered there. And as in flame +A sparkle is distinct, or voice in voice +Discern'd, when one its even tenour keeps, +The other comes and goes; so in that light +I other luminaries saw, that cours'd +In circling motion, rapid more or less, +As their eternal phases each impels. + +Never was blast from vapour charged with cold, +Whether invisible to eye or no, +Descended with such speed, it had not seem'd +To linger in dull tardiness, compar'd +To those celestial lights, that tow'rds us came, +Leaving the circuit of their joyous ring, +Conducted by the lofty seraphim. +And after them, who in the van appear'd, +Such an hosanna sounded, as hath left +Desire, ne'er since extinct in me, to hear +Renew'd the strain. Then parting from the rest +One near us drew, and sole began: "We all +Are ready at thy pleasure, well dispos'd +To do thee gentle service. We are they, +To whom thou in the world erewhile didst Sing +'O ye! whose intellectual ministry +Moves the third heaven!' and in one orb we roll, +One motion, one impulse, with those who rule +Princedoms in heaven; yet are of love so full, +That to please thee 't will be as sweet to rest." + +After mine eyes had with meek reverence +Sought the celestial guide, and were by her +Assur'd, they turn'd again unto the light +Who had so largely promis'd, and with voice +That bare the lively pressure of my zeal, +"Tell who ye are," I cried. Forthwith it grew +In size and splendour, through augmented joy; +And thus it answer'd: "A short date below +The world possess'd me. Had the time been more, +Much evil, that will come, had never chanc'd. +My gladness hides thee from me, which doth shine +Around, and shroud me, as an animal +In its own silk unswath'd. Thou lov'dst me well, +And had'st good cause; for had my sojourning +Been longer on the earth, the love I bare thee +Had put forth more than blossoms. The left bank, +That Rhone, when he hath mix'd with Sorga, laves. + +"In me its lord expected, and that horn +Of fair Ausonia, with its boroughs old, +Bari, and Croton, and Gaeta pil'd, +From where the Trento disembogues his waves, +With Verde mingled, to the salt sea-flood. +Already on my temples beam'd the crown, +Which gave me sov'reignty over the land +By Danube wash'd, whenas he strays beyond +The limits of his German shores. The realm, +Where, on the gulf by stormy Eurus lash'd, +Betwixt Pelorus and Pachynian heights, +The beautiful Trinacria lies in gloom +(Not through Typhaeus, but the vap'ry cloud +Bituminous upsteam'd), THAT too did look +To have its scepter wielded by a race +Of monarchs, sprung through me from Charles and Rodolph; +had not ill lording which doth spirit up +The people ever, in Palermo rais'd +The shout of 'death,' re-echo'd loud and long. +Had but my brother's foresight kenn'd as much, +He had been warier that the greedy want +Of Catalonia might not work his bale. +And truly need there is, that he forecast, +Or other for him, lest more freight be laid +On his already over-laden bark. +Nature in him, from bounty fall'n to thrift, +Would ask the guard of braver arms, than such +As only care to have their coffers fill'd." + +"My liege, it doth enhance the joy thy words +Infuse into me, mighty as it is, +To think my gladness manifest to thee, +As to myself, who own it, when thou lookst +Into the source and limit of all good, +There, where thou markest that which thou dost speak, +Thence priz'd of me the more. Glad thou hast made me. +Now make intelligent, clearing the doubt +Thy speech hath raised in me; for much I muse, +How bitter can spring up, when sweet is sown." + +I thus inquiring; he forthwith replied: +"If I have power to show one truth, soon that +Shall face thee, which thy questioning declares +Behind thee now conceal'd. The Good, that guides +And blessed makes this realm, which thou dost mount, +Ordains its providence to be the virtue +In these great bodies: nor th' all perfect Mind +Upholds their nature merely, but in them +Their energy to save: for nought, that lies +Within the range of that unerring bow, +But is as level with the destin'd aim, +As ever mark to arrow's point oppos'd. +Were it not thus, these heavens, thou dost visit, +Would their effect so work, it would not be +Art, but destruction; and this may not chance, +If th' intellectual powers, that move these stars, +Fail not, or who, first faulty made them fail. +Wilt thou this truth more clearly evidenc'd?" + +To whom I thus: "It is enough: no fear, +I see, lest nature in her part should tire." + +He straight rejoin'd: "Say, were it worse for man, +If he liv'd not in fellowship on earth?" + +"Yea," answer'd I; "nor here a reason needs." + +"And may that be, if different estates +Grow not of different duties in your life? +Consult your teacher, and he tells you 'no."' + +Thus did he come, deducing to this point, +And then concluded: "For this cause behooves, +The roots, from whence your operations come, +Must differ. Therefore one is Solon born; +Another, Xerxes; and Melchisidec +A third; and he a fourth, whose airy voyage +Cost him his son. In her circuitous course, +Nature, that is the seal to mortal wax, +Doth well her art, but no distinctions owns +'Twixt one or other household. Hence befalls +That Esau is so wide of Jacob: hence +Quirinus of so base a father springs, +He dates from Mars his lineage. Were it not +That providence celestial overrul'd, +Nature, in generation, must the path +Trac'd by the generator, still pursue +Unswervingly. Thus place I in thy sight +That, which was late behind thee. But, in sign +Of more affection for thee, 't is my will +Thou wear this corollary. Nature ever +Finding discordant fortune, like all seed +Out of its proper climate, thrives but ill. +And were the world below content to mark +And work on the foundation nature lays, +It would not lack supply of excellence. +But ye perversely to religion strain +Him, who was born to gird on him the sword, +And of the fluent phrasemen make your king; +Therefore your steps have wander'd from the paths." + + + + +CANTO IX + +After solution of my doubt, thy Charles, +O fair Clemenza, of the treachery spake +That must befall his seed: but, "Tell it not," +Said he, "and let the destin'd years come round." +Nor may I tell thee more, save that the meed +Of sorrow well-deserv'd shall quit your wrongs. + +And now the visage of that saintly light +Was to the sun, that fills it, turn'd again, +As to the good, whose plenitude of bliss +Sufficeth all. O ye misguided souls! +Infatuate, who from such a good estrange +Your hearts, and bend your gaze on vanity, +Alas for you!--And lo! toward me, next, +Another of those splendent forms approach'd, +That, by its outward bright'ning, testified +The will it had to pleasure me. The eyes +Of Beatrice, resting, as before, +Firmly upon me, manifested forth +Approval of my wish. "And O," I cried, +"Blest spirit! quickly be my will perform'd; +And prove thou to me, that my inmost thoughts +I can reflect on thee." Thereat the light, +That yet was new to me, from the recess, +Where it before was singing, thus began, +As one who joys in kindness: "In that part +Of the deprav'd Italian land, which lies +Between Rialto, and the fountain-springs +Of Brenta and of Piava, there doth rise, +But to no lofty eminence, a hill, +From whence erewhile a firebrand did descend, +That sorely sheet the region. From one root +I and it sprang; my name on earth Cunizza: +And here I glitter, for that by its light +This star o'ercame me. Yet I naught repine, +Nor grudge myself the cause of this my lot, +Which haply vulgar hearts can scarce conceive. + +"This jewel, that is next me in our heaven, +Lustrous and costly, great renown hath left, +And not to perish, ere these hundred years +Five times absolve their round. Consider thou, +If to excel be worthy man's endeavour, +When such life may attend the first. Yet they +Care not for this, the crowd that now are girt +By Adice and Tagliamento, still +Impenitent, tho' scourg'd. The hour is near, +When for their stubbornness at Padua's marsh +The water shall be chang'd, that laves Vicena +And where Cagnano meets with Sile, one +Lords it, and bears his head aloft, for whom +The web is now a-warping. Feltro too +Shall sorrow for its godless shepherd's fault, +Of so deep stain, that never, for the like, +Was Malta's bar unclos'd. Too large should be +The skillet, that would hold Ferrara's blood, +And wearied he, who ounce by ounce would weight it, +The which this priest, in show of party-zeal, +Courteous will give; nor will the gift ill suit +The country's custom. We descry above, +Mirrors, ye call them thrones, from which to us +Reflected shine the judgments of our God: +Whence these our sayings we avouch for good." + +She ended, and appear'd on other thoughts +Intent, re-ent'ring on the wheel she late +Had left. That other joyance meanwhile wax'd +A thing to marvel at, in splendour glowing, +Like choicest ruby stricken by the sun, +For, in that upper clime, effulgence comes +Of gladness, as here laughter: and below, +As the mind saddens, murkier grows the shade. + +"God seeth all: and in him is thy sight," +Said I, "blest Spirit! Therefore will of his +Cannot to thee be dark. Why then delays +Thy voice to satisfy my wish untold, +That voice which joins the inexpressive song, +Pastime of heav'n, the which those ardours sing, +That cowl them with six shadowing wings outspread? +I would not wait thy asking, wert thou known +To me, as thoroughly I to thee am known." + +He forthwith answ'ring, thus his words began: +"The valley' of waters, widest next to that +Which doth the earth engarland, shapes its course, +Between discordant shores, against the sun +Inward so far, it makes meridian there, +Where was before th' horizon. Of that vale +Dwelt I upon the shore, 'twixt Ebro's stream +And Macra's, that divides with passage brief +Genoan bounds from Tuscan. East and west +Are nearly one to Begga and my land, +Whose haven erst was with its own blood warm. +Who knew my name were wont to call me Folco: +And I did bear impression of this heav'n, +That now bears mine: for not with fiercer flame +Glow'd Belus' daughter, injuring alike +Sichaeus and Creusa, than did I, +Long as it suited the unripen'd down +That fledg'd my cheek: nor she of Rhodope, +That was beguiled of Demophoon; +Nor Jove's son, when the charms of Iole +Were shrin'd within his heart. And yet there hides +No sorrowful repentance here, but mirth, +Not for the fault (that doth not come to mind), +But for the virtue, whose o'erruling sway +And providence have wrought thus quaintly. Here +The skill is look'd into, that fashioneth +With such effectual working, and the good +Discern'd, accruing to this upper world +From that below. But fully to content +Thy wishes, all that in this sphere have birth, +Demands my further parle. Inquire thou wouldst, +Who of this light is denizen, that here +Beside me sparkles, as the sun-beam doth +On the clear wave. Know then, the soul of Rahab +Is in that gladsome harbour, to our tribe +United, and the foremost rank assign'd. +He to that heav'n, at which the shadow ends +Of your sublunar world, was taken up, +First, in Christ's triumph, of all souls redeem'd: +For well behoov'd, that, in some part of heav'n, +She should remain a trophy, to declare +The mighty contest won with either palm; +For that she favour'd first the high exploit +Of Joshua on the holy land, whereof +The Pope recks little now. Thy city, plant +Of him, that on his Maker turn'd the back, +And of whose envying so much woe hath sprung, +Engenders and expands the cursed flower, +That hath made wander both the sheep and lambs, +Turning the shepherd to a wolf. For this, +The gospel and great teachers laid aside, +The decretals, as their stuft margins show, +Are the sole study. Pope and Cardinals, +Intent on these, ne'er journey but in thought +To Nazareth, where Gabriel op'd his wings. +Yet it may chance, erelong, the Vatican, +And other most selected parts of Rome, +That were the grave of Peter's soldiery, +Shall be deliver'd from the adult'rous bond." + + + + +CANTO X + +Looking into his first-born with the love, +Which breathes from both eternal, the first Might +Ineffable, whence eye or mind +Can roam, hath in such order all dispos'd, +As none may see and fail to enjoy. Raise, then, +O reader! to the lofty wheels, with me, +Thy ken directed to the point, whereat +One motion strikes on th' other. There begin +Thy wonder of the mighty Architect, +Who loves his work so inwardly, his eye +Doth ever watch it. See, how thence oblique +Brancheth the circle, where the planets roll +To pour their wished influence on the world; +Whose path not bending thus, in heav'n above +Much virtue would be lost, and here on earth, +All power well nigh extinct: or, from direct +Were its departure distant more or less, +I' th' universal order, great defect +Must, both in heav'n and here beneath, ensue. + +Now rest thee, reader! on thy bench, and muse +Anticipative of the feast to come; +So shall delight make thee not feel thy toil. +Lo! I have set before thee, for thyself +Feed now: the matter I indite, henceforth +Demands entire my thought. Join'd with the part, +Which late we told of, the great minister +Of nature, that upon the world imprints +The virtue of the heaven, and doles out +Time for us with his beam, went circling on +Along the spires, where each hour sooner comes; +And I was with him, weetless of ascent, +As one, who till arriv'd, weets not his coming. + +For Beatrice, she who passeth on +So suddenly from good to better, time +Counts not the act, oh then how great must needs +Have been her brightness! What she was i' th' sun +(Where I had enter'd), not through change of hue, +But light transparent--did I summon up +Genius, art, practice--I might not so speak, +It should be e'er imagin'd: yet believ'd +It may be, and the sight be justly crav'd. +And if our fantasy fail of such height, +What marvel, since no eye above the sun +Hath ever travel'd? Such are they dwell here, +Fourth family of the Omnipotent Sire, +Who of his spirit and of his offspring shows; +And holds them still enraptur'd with the view. +And thus to me Beatrice: "Thank, oh thank, +The Sun of angels, him, who by his grace +To this perceptible hath lifted thee." + +Never was heart in such devotion bound, +And with complacency so absolute +Dispos'd to render up itself to God, +As mine was at those words: and so entire +The love for Him, that held me, it eclips'd +Beatrice in oblivion. Naught displeas'd +Was she, but smil'd thereat so joyously, +That of her laughing eyes the radiance brake +And scatter'd my collected mind abroad. + +Then saw I a bright band, in liveliness +Surpassing, who themselves did make the crown, +And us their centre: yet more sweet in voice, +Than in their visage beaming. Cinctur'd thus, +Sometime Latona's daughter we behold, +When the impregnate air retains the thread, +That weaves her zone. In the celestial court, +Whence I return, are many jewels found, +So dear and beautiful, they cannot brook +Transporting from that realm: and of these lights +Such was the song. Who doth not prune his wing +To soar up thither, let him look from thence +For tidings from the dumb. When, singing thus, +Those burning suns that circled round us thrice, +As nearest stars around the fixed pole, +Then seem'd they like to ladies, from the dance +Not ceasing, but suspense, in silent pause, +List'ning, till they have caught the strain anew: +Suspended so they stood: and, from within, +Thus heard I one, who spake: "Since with its beam +The grace, whence true love lighteth first his flame, +That after doth increase by loving, shines +So multiplied in thee, it leads thee up +Along this ladder, down whose hallow'd steps +None e'er descend, and mount them not again, +Who from his phial should refuse thee wine +To slake thy thirst, no less constrained were, +Than water flowing not unto the sea. +Thou fain wouldst hear, what plants are these, that bloom +In the bright garland, which, admiring, girds +This fair dame round, who strengthens thee for heav'n. +I then was of the lambs, that Dominic +Leads, for his saintly flock, along the way, +Where well they thrive, not sworn with vanity. +He, nearest on my right hand, brother was, +And master to me: Albert of Cologne +Is this: and of Aquinum, Thomas I. +If thou of all the rest wouldst be assur'd, +Let thine eye, waiting on the words I speak, +In circuit journey round the blessed wreath. +That next resplendence issues from the smile +Of Gratian, who to either forum lent +Such help, as favour wins in Paradise. +The other, nearest, who adorns our quire, +Was Peter, he that with the widow gave +To holy church his treasure. The fifth light, +Goodliest of all, is by such love inspired, +That all your world craves tidings of its doom: +Within, there is the lofty light, endow'd +With sapience so profound, if truth be truth, +That with a ken of such wide amplitude +No second hath arisen. Next behold +That taper's radiance, to whose view was shown, +Clearliest, the nature and the ministry +Angelical, while yet in flesh it dwelt. +In the other little light serenely smiles +That pleader for the Christian temples, he +Who did provide Augustin of his lore. +Now, if thy mind's eye pass from light to light, +Upon my praises following, of the eighth +Thy thirst is next. The saintly soul, that shows +The world's deceitfulness, to all who hear him, +Is, with the sight of all the good, that is, +Blest there. The limbs, whence it was driven, lie +Down in Cieldauro, and from martyrdom +And exile came it here. Lo! further on, +Where flames the arduous Spirit of Isidore, +Of Bede, and Richard, more than man, erewhile, +In deep discernment. Lastly this, from whom +Thy look on me reverteth, was the beam +Of one, whose spirit, on high musings bent, +Rebuk'd the ling'ring tardiness of death. +It is the eternal light of Sigebert, +Who 'scap'd not envy, when of truth he argued, +Reading in the straw-litter'd street." Forthwith, +As clock, that calleth up the spouse of God +To win her bridegroom's love at matin's hour, +Each part of other fitly drawn and urg'd, +Sends out a tinkling sound, of note so sweet, +Affection springs in well-disposed breast; +Thus saw I move the glorious wheel, thus heard +Voice answ'ring voice, so musical and soft, +It can be known but where day endless shines. + + + + +CANTO XI + +O fond anxiety of mortal men! +How vain and inconclusive arguments +Are those, which make thee beat thy wings below +For statues one, and one for aphorisms +Was hunting; this the priesthood follow'd, that +By force or sophistry aspir'd to rule; +To rob another, and another sought +By civil business wealth; one moiling lay +Tangled in net of sensual delight, +And one to witless indolence resign'd; +What time from all these empty things escap'd, +With Beatrice, I thus gloriously +Was rais'd aloft, and made the guest of heav'n. + +They of the circle to that point, each one. +Where erst it was, had turn'd; and steady glow'd, +As candle in his socket. Then within +The lustre, that erewhile bespake me, smiling +With merer gladness, heard I thus begin: + +"E'en as his beam illumes me, so I look +Into the eternal light, and clearly mark +Thy thoughts, from whence they rise. Thou art in doubt, +And wouldst, that I should bolt my words afresh +In such plain open phrase, as may be smooth +To thy perception, where I told thee late +That 'well they thrive;' and that 'no second such +Hath risen,' which no small distinction needs. + +"The providence, that governeth the world, +In depth of counsel by created ken +Unfathomable, to the end that she, +Who with loud cries was 'spous'd in precious blood, +Might keep her footing towards her well-belov'd, +Safe in herself and constant unto him, +Hath two ordain'd, who should on either hand +In chief escort her: one seraphic all +In fervency; for wisdom upon earth, +The other splendour of cherubic light. +I but of one will tell: he tells of both, +Who one commendeth which of them so'er +Be taken: for their deeds were to one end. + +"Between Tupino, and the wave, that falls +From blest Ubaldo's chosen hill, there hangs +Rich slope of mountain high, whence heat and cold +Are wafted through Perugia's eastern gate: +And Norcera with Gualdo, in its rear +Mourn for their heavy yoke. Upon that side, +Where it doth break its steepness most, arose +A sun upon the world, as duly this +From Ganges doth: therefore let none, who speak +Of that place, say Ascesi; for its name +Were lamely so deliver'd; but the East, +To call things rightly, be it henceforth styl'd. +He was not yet much distant from his rising, +When his good influence 'gan to bless the earth. +A dame to whom none openeth pleasure's gate +More than to death, was, 'gainst his father's will, +His stripling choice: and he did make her his, +Before the Spiritual court, by nuptial bonds, +And in his father's sight: from day to day, +Then lov'd her more devoutly. She, bereav'd +Of her first husband, slighted and obscure, +Thousand and hundred years and more, remain'd +Without a single suitor, till he came. +Nor aught avail'd, that, with Amyclas, she +Was found unmov'd at rumour of his voice, +Who shook the world: nor aught her constant boldness +Whereby with Christ she mounted on the cross, +When Mary stay'd beneath. But not to deal +Thus closely with thee longer, take at large +The rovers' titles--Poverty and Francis. +Their concord and glad looks, wonder and love, +And sweet regard gave birth to holy thoughts, +So much, that venerable Bernard first +Did bare his feet, and, in pursuit of peace +So heavenly, ran, yet deem'd his footing slow. +O hidden riches! O prolific good! +Egidius bares him next, and next Sylvester, +And follow both the bridegroom; so the bride +Can please them. Thenceforth goes he on his way, +The father and the master, with his spouse, +And with that family, whom now the cord +Girt humbly: nor did abjectness of heart +Weigh down his eyelids, for that he was son +Of Pietro Bernardone, and by men +In wond'rous sort despis'd. But royally +His hard intention he to Innocent +Set forth, and from him first receiv'd the seal +On his religion. Then, when numerous flock'd +The tribe of lowly ones, that trac'd HIS steps, +Whose marvellous life deservedly were sung +In heights empyreal, through Honorius' hand +A second crown, to deck their Guardian's virtues, +Was by the eternal Spirit inwreath'd: and when +He had, through thirst of martyrdom, stood up +In the proud Soldan's presence, and there preach'd +Christ and his followers; but found the race +Unripen'd for conversion: back once more +He hasted (not to intermit his toil), +And reap'd Ausonian lands. On the hard rock, +'Twixt Arno and the Tyber, he from Christ +Took the last Signet, which his limbs two years +Did carry. Then the season come, that he, +Who to such good had destin'd him, was pleas'd +T' advance him to the meed, which he had earn'd +By his self-humbling, to his brotherhood, +As their just heritage, he gave in charge +His dearest lady, and enjoin'd their love +And faith to her: and, from her bosom, will'd +His goodly spirit should move forth, returning +To its appointed kingdom, nor would have +His body laid upon another bier. + +"Think now of one, who were a fit colleague, +To keep the bark of Peter in deep sea +Helm'd to right point; and such our Patriarch was. +Therefore who follow him, as he enjoins, +Thou mayst be certain, take good lading in. +But hunger of new viands tempts his flock, +So that they needs into strange pastures wide +Must spread them: and the more remote from him +The stragglers wander, so much mole they come +Home to the sheep-fold, destitute of milk. +There are of them, in truth, who fear their harm, +And to the shepherd cleave; but these so few, +A little stuff may furnish out their cloaks. + +"Now, if my words be clear, if thou have ta'en +Good heed, if that, which I have told, recall +To mind, thy wish may be in part fulfill'd: +For thou wilt see the point from whence they split, +Nor miss of the reproof, which that implies, +'That well they thrive not sworn with vanity."' + + + + +CANTO XII + +Soon as its final word the blessed flame +Had rais'd for utterance, straight the holy mill +Began to wheel, nor yet had once revolv'd, +Or ere another, circling, compass'd it, +Motion to motion, song to song, conjoining, +Song, that as much our muses doth excel, +Our Sirens with their tuneful pipes, as ray +Of primal splendour doth its faint reflex. + +As when, if Juno bid her handmaid forth, +Two arches parallel, and trick'd alike, +Span the thin cloud, the outer taking birth +From that within (in manner of that voice +Whom love did melt away, as sun the mist), +And they who gaze, presageful call to mind +The compact, made with Noah, of the world +No more to be o'erflow'd; about us thus +Of sempiternal roses, bending, wreath'd +Those garlands twain, and to the innermost +E'en thus th' external answered. When the footing, +And other great festivity, of song, +And radiance, light with light accordant, each +Jocund and blythe, had at their pleasure still'd +(E'en as the eyes by quick volition mov'd, +Are shut and rais'd together), from the heart +Of one amongst the new lights mov'd a voice, +That made me seem like needle to the star, +In turning to its whereabout, and thus +Began: "The love, that makes me beautiful, +Prompts me to tell of th' other guide, for whom +Such good of mine is spoken. Where one is, +The other worthily should also be; +That as their warfare was alike, alike +Should be their glory. Slow, and full of doubt, +And with thin ranks, after its banner mov'd +The army of Christ (which it so clearly cost +To reappoint), when its imperial Head, +Who reigneth ever, for the drooping host +Did make provision, thorough grace alone, +And not through its deserving. As thou heard'st, +Two champions to the succour of his spouse +He sent, who by their deeds and words might join +Again his scatter'd people. In that clime, +Where springs the pleasant west-wind to unfold +The fresh leaves, with which Europe sees herself +New-garmented; nor from those billows far, +Beyond whose chiding, after weary course, +The sun doth sometimes hide him, safe abides +The happy Callaroga, under guard +Of the great shield, wherein the lion lies +Subjected and supreme. And there was born +The loving million of the Christian faith, +The hollow'd wrestler, gentle to his own, +And to his enemies terrible. So replete +His soul with lively virtue, that when first +Created, even in the mother's womb, +It prophesied. When, at the sacred font, +The spousals were complete 'twixt faith and him, +Where pledge of mutual safety was exchang'd, +The dame, who was his surety, in her sleep +Beheld the wondrous fruit, that was from him +And from his heirs to issue. And that such +He might be construed, as indeed he was, +She was inspir'd to name him of his owner, +Whose he was wholly, and so call'd him Dominic. +And I speak of him, as the labourer, +Whom Christ in his own garden chose to be +His help-mate. Messenger he seem'd, and friend +Fast-knit to Christ; and the first love he show'd, +Was after the first counsel that Christ gave. +Many a time his nurse, at entering found +That he had ris'n in silence, and was prostrate, +As who should say, "My errand was for this." +O happy father! Felix rightly nam'd! +O favour'd mother! rightly nam'd Joanna! +If that do mean, as men interpret it. +Not for the world's sake, for which now they pore +Upon Ostiense and Taddeo's page, +But for the real manna, soon he grew +Mighty in learning, and did set himself +To go about the vineyard, that soon turns +To wan and wither'd, if not tended well: +And from the see (whose bounty to the just +And needy is gone by, not through its fault, +But his who fills it basely, he besought, +No dispensation for commuted wrong, +Nor the first vacant fortune, nor the tenth), +That to God's paupers rightly appertain, +But, 'gainst an erring and degenerate world, +Licence to fight, in favour of that seed, +From which the twice twelve cions gird thee round. +Then, with sage doctrine and good will to help, +Forth on his great apostleship he far'd, +Like torrent bursting from a lofty vein; +And, dashing 'gainst the stocks of heresy, +Smote fiercest, where resistance was most stout. +Thence many rivulets have since been turn'd, +Over the garden Catholic to lead +Their living waters, and have fed its plants. + +"If such one wheel of that two-yoked car, +Wherein the holy church defended her, +And rode triumphant through the civil broil. +Thou canst not doubt its fellow's excellence, +Which Thomas, ere my coming, hath declar'd +So courteously unto thee. But the track, +Which its smooth fellies made, is now deserted: +That mouldy mother is where late were lees. +His family, that wont to trace his path, +Turn backward, and invert their steps; erelong +To rue the gathering in of their ill crop, +When the rejected tares in vain shall ask +Admittance to the barn. I question not +But he, who search'd our volume, leaf by leaf, +Might still find page with this inscription on't, +'I am as I was wont.' Yet such were not +From Acquasparta nor Casale, whence +Of those, who come to meddle with the text, +One stretches and another cramps its rule. +Bonaventura's life in me behold, +From Bagnororegio, one, who in discharge +Of my great offices still laid aside +All sinister aim. Illuminato here, +And Agostino join me: two they were, +Among the first of those barefooted meek ones, +Who sought God's friendship in the cord: with them +Hugues of Saint Victor, Pietro Mangiadore, +And he of Spain in his twelve volumes shining, +Nathan the prophet, Metropolitan +Chrysostom, and Anselmo, and, who deign'd +To put his hand to the first art, Donatus. +Raban is here: and at my side there shines +Calabria's abbot, Joachim, endow'd +With soul prophetic. The bright courtesy +Of friar Thomas, and his goodly lore, +Have mov'd me to the blazon of a peer +So worthy, and with me have mov'd this throng." + + + + +CANTO XIII + +Let him, who would conceive what now I saw, +Imagine (and retain the image firm, +As mountain rock, the whilst he hears me speak), +Of stars fifteen, from midst the ethereal host +Selected, that, with lively ray serene, +O'ercome the massiest air: thereto imagine +The wain, that, in the bosom of our sky, +Spins ever on its axle night and day, +With the bright summit of that horn which swells +Due from the pole, round which the first wheel rolls, +T' have rang'd themselves in fashion of two signs +In heav'n, such as Ariadne made, +When death's chill seized her; and that one of them +Did compass in the other's beam; and both +In such sort whirl around, that each should tend +With opposite motion and, conceiving thus, +Of that true constellation, and the dance +Twofold, that circled me, he shall attain +As 't were the shadow; for things there as much +Surpass our usage, as the swiftest heav'n +Is swifter than the Chiana. There was sung +No Bacchus, and no Io Paean, but +Three Persons in the Godhead, and in one +Substance that nature and the human join'd. + +The song fulfill'd its measure; and to us +Those saintly lights attended, happier made +At each new minist'ring. Then silence brake, +Amid th' accordant sons of Deity, +That luminary, in which the wondrous life +Of the meek man of God was told to me; +And thus it spake: "One ear o' th' harvest thresh'd, +And its grain safely stor'd, sweet charity +Invites me with the other to like toil. + +"Thou know'st, that in the bosom, whence the rib +Was ta'en to fashion that fair cheek, whose taste +All the world pays for, and in that, which pierc'd +By the keen lance, both after and before +Such satisfaction offer'd, as outweighs +Each evil in the scale, whate'er of light +To human nature is allow'd, must all +Have by his virtue been infus'd, who form'd +Both one and other: and thou thence admir'st +In that I told thee, of beatitudes +A second, there is none, to his enclos'd +In the fifth radiance. Open now thine eyes +To what I answer thee; and thou shalt see +Thy deeming and my saying meet in truth, +As centre in the round. That which dies not, +And that which can die, are but each the beam +Of that idea, which our Soverign Sire +Engendereth loving; for that lively light, +Which passeth from his brightness; not disjoin'd +From him, nor from his love triune with them, +Doth, through his bounty, congregate itself, +Mirror'd, as 't were in new existences, +Itself unalterable and ever one. + +"Descending hence unto the lowest powers, +Its energy so sinks, at last it makes +But brief contingencies: for so I name +Things generated, which the heav'nly orbs +Moving, with seed or without seed, produce. +Their wax, and that which molds it, differ much: +And thence with lustre, more or less, it shows +Th' ideal stamp impress: so that one tree +According to his kind, hath better fruit, +And worse: and, at your birth, ye, mortal men, +Are in your talents various. Were the wax +Molded with nice exactness, and the heav'n +In its disposing influence supreme, +The lustre of the seal should be complete: +But nature renders it imperfect ever, +Resembling thus the artist in her work, +Whose faultering hand is faithless to his skill. +Howe'er, if love itself dispose, and mark +The primal virtue, kindling with bright view, +There all perfection is vouchsafed; and such +The clay was made, accomplish'd with each gift, +That life can teem with; such the burden fill'd +The virgin's bosom: so that I commend +Thy judgment, that the human nature ne'er +Was or can be, such as in them it was. + +"Did I advance no further than this point, +'How then had he no peer?' thou might'st reply. +But, that what now appears not, may appear +Right plainly, ponder, who he was, and what +(When he was bidden 'Ask' ), the motive sway'd +To his requesting. I have spoken thus, +That thou mayst see, he was a king, who ask'd +For wisdom, to the end he might be king +Sufficient: not the number to search out +Of the celestial movers; or to know, +If necessary with contingent e'er +Have made necessity; or whether that +Be granted, that first motion is; or if +Of the mid circle can, by art, be made +Triangle with each corner, blunt or sharp. + +"Whence, noting that, which I have said, and this, +Thou kingly prudence and that ken mayst learn, +At which the dart of my intention aims. +And, marking clearly, that I told thee, 'Risen,' +Thou shalt discern it only hath respect +To kings, of whom are many, and the good +Are rare. With this distinction take my words; +And they may well consist with that which thou +Of the first human father dost believe, +And of our well-beloved. And let this +Henceforth be led unto thy feet, to make +Thee slow in motion, as a weary man, +Both to the 'yea' and to the 'nay' thou seest not. +For he among the fools is down full low, +Whose affirmation, or denial, is +Without distinction, in each case alike +Since it befalls, that in most instances +Current opinion leads to false: and then +Affection bends the judgment to her ply. + +"Much more than vainly doth he loose from shore, +Since he returns not such as he set forth, +Who fishes for the truth and wanteth skill. +And open proofs of this unto the world +Have been afforded in Parmenides, +Melissus, Bryso, and the crowd beside, +Who journey'd on, and knew not whither: so did +Sabellius, Arius, and the other fools, +Who, like to scymitars, reflected back +The scripture-image, by distortion marr'd. + +"Let not the people be too swift to judge, +As one who reckons on the blades in field, +Or ere the crop be ripe. For I have seen +The thorn frown rudely all the winter long +And after bear the rose upon its top; +And bark, that all the way across the sea +Ran straight and speedy, perish at the last, +E'en in the haven's mouth seeing one steal, +Another brine, his offering to the priest, +Let not Dame Birtha and Sir Martin thence +Into heav'n's counsels deem that they can pry: +For one of these may rise, the other fall." + + + + +CANTO XIV + +From centre to the circle, and so back +From circle to the centre, water moves +In the round chalice, even as the blow +Impels it, inwardly, or from without. +Such was the image glanc'd into my mind, +As the great spirit of Aquinum ceas'd; +And Beatrice after him her words +Resum'd alternate: "Need there is (tho' yet +He tells it to you not in words, nor e'en +In thought) that he should fathom to its depth +Another mystery. Tell him, if the light, +Wherewith your substance blooms, shall stay with you +Eternally, as now: and, if it doth, +How, when ye shall regain your visible forms, +The sight may without harm endure the change, +That also tell." As those, who in a ring +Tread the light measure, in their fitful mirth +Raise loud the voice, and spring with gladder bound; +Thus, at the hearing of that pious suit, +The saintly circles in their tourneying +And wond'rous note attested new delight. + +Whoso laments, that we must doff this garb +Of frail mortality, thenceforth to live +Immortally above, he hath not seen +The sweet refreshing, of that heav'nly shower. + +Him, who lives ever, and for ever reigns +In mystic union of the Three in One, +Unbounded, bounding all, each spirit thrice +Sang, with such melody, as but to hear +For highest merit were an ample meed. +And from the lesser orb the goodliest light, +With gentle voice and mild, such as perhaps +The angel's once to Mary, thus replied: +"Long as the joy of Paradise shall last, +Our love shall shine around that raiment, bright, +As fervent; fervent, as in vision blest; +And that as far in blessedness exceeding, +As it hath grave beyond its virtue great. +Our shape, regarmented with glorious weeds +Of saintly flesh, must, being thus entire, +Show yet more gracious. Therefore shall increase, +Whate'er of light, gratuitous, imparts +The Supreme Good; light, ministering aid, +The better disclose his glory: whence +The vision needs increasing, much increase +The fervour, which it kindles; and that too +The ray, that comes from it. But as the greed +Which gives out flame, yet it its whiteness shines +More lively than that, and so preserves +Its proper semblance; thus this circling sphere +Of splendour, shall to view less radiant seem, +Than shall our fleshly robe, which yonder earth +Now covers. Nor will such excess of light +O'erpower us, in corporeal organs made +Firm, and susceptible of all delight." + +So ready and so cordial an "Amen," +Followed from either choir, as plainly spoke +Desire of their dead bodies; yet perchance +Not for themselves, but for their kindred dear, +Mothers and sires, and those whom best they lov'd, +Ere they were made imperishable flame. + +And lo! forthwith there rose up round about +A lustre over that already there, +Of equal clearness, like the brightening up +Of the horizon. As at an evening hour +Of twilight, new appearances through heav'n +Peer with faint glimmer, doubtfully descried; +So there new substances, methought began +To rise in view; and round the other twain +Enwheeling, sweep their ampler circuit wide. + +O gentle glitter of eternal beam! +With what a such whiteness did it flow, +O'erpowering vision in me! But so fair, +So passing lovely, Beatrice show'd, +Mind cannot follow it, nor words express +Her infinite sweetness. Thence mine eyes regain'd +Power to look up, and I beheld myself, +Sole with my lady, to more lofty bliss +Translated: for the star, with warmer smile +Impurpled, well denoted our ascent. + +With all the heart, and with that tongue which speaks +The same in all, an holocaust I made +To God, befitting the new grace vouchsaf'd. +And from my bosom had not yet upsteam'd +The fuming of that incense, when I knew +The rite accepted. With such mighty sheen +And mantling crimson, in two listed rays +The splendours shot before me, that I cried, +"God of Sabaoth! that does prank them thus!" + +As leads the galaxy from pole to pole, +Distinguish'd into greater lights and less, +Its pathway, which the wisest fail to spell; +So thickly studded, in the depth of Mars, +Those rays describ'd the venerable sign, +That quadrants in the round conjoining frame. +Here memory mocks the toil of genius. Christ +Beam'd on that cross; and pattern fails me now. +But whoso takes his cross, and follows Christ +Will pardon me for that I leave untold, +When in the flecker'd dawning he shall spy +The glitterance of Christ. From horn to horn, +And 'tween the summit and the base did move +Lights, scintillating, as they met and pass'd. +Thus oft are seen, with ever-changeful glance, +Straight or athwart, now rapid and now slow, +The atomies of bodies, long or short, +To move along the sunbeam, whose slant line +Checkers the shadow, interpos'd by art +Against the noontide heat. And as the chime +Of minstrel music, dulcimer, and help +With many strings, a pleasant dining makes +To him, who heareth not distinct the note; +So from the lights, which there appear'd to me, +Gather'd along the cross a melody, +That, indistinctly heard, with ravishment +Possess'd me. Yet I mark'd it was a hymn +Of lofty praises; for there came to me +"Arise and conquer," as to one who hears +And comprehends not. Me such ecstasy +O'ercame, that never till that hour was thing +That held me in so sweet imprisonment. + +Perhaps my saying over bold appears, +Accounting less the pleasure of those eyes, +Whereon to look fulfilleth all desire. +But he, who is aware those living seals +Of every beauty work with quicker force, +The higher they are ris'n; and that there +I had not turn'd me to them; he may well +Excuse me that, whereof in my excuse +I do accuse me, and may own my truth; +That holy pleasure here not yet reveal'd, +Which grows in transport as we mount aloof. + + + + +CANTO XV + +True love, that ever shows itself as clear +In kindness, as loose appetite in wrong, +Silenced that lyre harmonious, and still'd +The sacred chords, that are by heav'n's right hand +Unwound and tighten'd, flow to righteous prayers +Should they not hearken, who, to give me will +For praying, in accordance thus were mute? +He hath in sooth good cause for endless grief, +Who, for the love of thing that lasteth not, +Despoils himself forever of that love. + +As oft along the still and pure serene, +At nightfall, glides a sudden trail of fire, +Attracting with involuntary heed +The eye to follow it, erewhile at rest, +And seems some star that shifted place in heav'n, +Only that, whence it kindles, none is lost, +And it is soon extinct; thus from the horn, +That on the dexter of the cross extends, +Down to its foot, one luminary ran +From mid the cluster shone there; yet no gem +Dropp'd from its foil; and through the beamy list +Like flame in alabaster, glow'd its course. + +So forward stretch'd him (if of credence aught +Our greater muse may claim) the pious ghost +Of old Anchises, in the' Elysian bower, +When he perceiv'd his son. "O thou, my blood! +O most exceeding grace divine! to whom, +As now to thee, hath twice the heav'nly gate +Been e'er unclos'd?" so spake the light; whence I +Turn'd me toward him; then unto my dame +My sight directed, and on either side +Amazement waited me; for in her eyes +Was lighted such a smile, I thought that mine +Had div'd unto the bottom of my grace +And of my bliss in Paradise. Forthwith +To hearing and to sight grateful alike, +The spirit to his proem added things +I understood not, so profound he spake; +Yet not of choice but through necessity +Mysterious; for his high conception scar'd +Beyond the mark of mortals. When the flight +Of holy transport had so spent its rage, +That nearer to the level of our thought +The speech descended, the first sounds I heard +Were, "Best he thou, Triunal Deity! +That hast such favour in my seed vouchsaf'd!" +Then follow'd: "No unpleasant thirst, tho' long, +Which took me reading in the sacred book, +Whose leaves or white or dusky never change, +Thou hast allay'd, my son, within this light, +From whence my voice thou hear'st; more thanks to her. +Who for such lofty mounting has with plumes +Begirt thee. Thou dost deem thy thoughts to me +From him transmitted, who is first of all, +E'en as all numbers ray from unity; +And therefore dost not ask me who I am, +Or why to thee more joyous I appear, +Than any other in this gladsome throng. +The truth is as thou deem'st; for in this hue +Both less and greater in that mirror look, +In which thy thoughts, or ere thou think'st, are shown. +But, that the love, which keeps me wakeful ever, +Urging with sacred thirst of sweet desire, +May be contended fully, let thy voice, +Fearless, and frank and jocund, utter forth +Thy will distinctly, utter forth the wish, +Whereto my ready answer stands decreed." + +I turn'd me to Beatrice; and she heard +Ere I had spoken, smiling, an assent, +That to my will gave wings; and I began +"To each among your tribe, what time ye kenn'd +The nature, in whom naught unequal dwells, +Wisdom and love were in one measure dealt; +For that they are so equal in the sun, +From whence ye drew your radiance and your heat, +As makes all likeness scant. But will and means, +In mortals, for the cause ye well discern, +With unlike wings are fledge. A mortal I +Experience inequality like this, +And therefore give no thanks, but in the heart, +For thy paternal greeting. This howe'er +I pray thee, living topaz! that ingemm'st +This precious jewel, let me hear thy name." + +"I am thy root, O leaf! whom to expect +Even, hath pleas'd me:" thus the prompt reply +Prefacing, next it added; "he, of whom +Thy kindred appellation comes, and who, +These hundred years and more, on its first ledge +Hath circuited the mountain, was my son +And thy great grandsire. Well befits, his long +Endurance should be shorten'd by thy deeds. + +"Florence, within her ancient limit-mark, +Which calls her still to matin prayers and noon, +Was chaste and sober, and abode in peace. +She had no armlets and no head-tires then, +No purfled dames, no zone, that caught the eye +More than the person did. Time was not yet, +When at his daughter's birth the sire grew pale. +For fear the age and dowry should exceed +On each side just proportion. House was none +Void of its family; nor yet had come +Hardanapalus, to exhibit feats +Of chamber prowess. Montemalo yet +O'er our suburban turret rose; as much +To be surpass in fall, as in its rising. +I saw Bellincione Berti walk abroad +In leathern girdle and a clasp of bone; +And, with no artful colouring on her cheeks, +His lady leave the glass. The sons I saw +Of Nerli and of Vecchio well content +With unrob'd jerkin; and their good dames handling +The spindle and the flax; O happy they! +Each sure of burial in her native land, +And none left desolate a-bed for France! +One wak'd to tend the cradle, hushing it +With sounds that lull'd the parent's infancy: +Another, with her maidens, drawing off +The tresses from the distaff, lectur'd them +Old tales of Troy and Fesole and Rome. +A Salterello and Cianghella we +Had held as strange a marvel, as ye would +A Cincinnatus or Cornelia now. + +"In such compos'd and seemly fellowship, +Such faithful and such fair equality, +In so sweet household, Mary at my birth +Bestow'd me, call'd on with loud cries; and there +In your old baptistery, I was made +Christian at once and Cacciaguida; as were +My brethren, Eliseo and Moronto. + +"From Valdipado came to me my spouse, +And hence thy surname grew. I follow'd then +The Emperor Conrad; and his knighthood he +Did gird on me; in such good part he took +My valiant service. After him I went +To testify against that evil law, +Whose people, by the shepherd's fault, possess +Your right, usurping. There, by that foul crew +Was I releas'd from the deceitful world, +Whose base affection many a spirit soils, +And from the martyrdom came to this peace." + + + + +CANTO XVI + +O slight respect of man's nobility! +I never shall account it marvelous, +That our infirm affection here below +Thou mov'st to boasting, when I could not choose, +E'en in that region of unwarp'd desire, +In heav'n itself, but make my vaunt in thee! +Yet cloak thou art soon shorten'd, for that time, +Unless thou be eked out from day to day, +Goes round thee with his shears. Resuming then +With greeting such, as Rome, was first to bear, +But since hath disaccustom'd I began; +And Beatrice, that a little space +Was sever'd, smil'd reminding me of her, +Whose cough embolden'd (as the story holds) +To first offence the doubting Guenever. + +"You are my sire," said I, "you give me heart +Freely to speak my thought: above myself +You raise me. Through so many streams with joy +My soul is fill'd, that gladness wells from it; +So that it bears the mighty tide, and bursts not +Say then, my honour'd stem! what ancestors +Where those you sprang from, and what years were mark'd +In your first childhood? Tell me of the fold, +That hath Saint John for guardian, what was then +Its state, and who in it were highest seated?" + +As embers, at the breathing of the wind, +Their flame enliven, so that light I saw +Shine at my blandishments; and, as it grew +More fair to look on, so with voice more sweet, +Yet not in this our modern phrase, forthwith +It answer'd: "From the day, when it was said +'Hail Virgin!' to the throes, by which my mother, +Who now is sainted, lighten'd her of me +Whom she was heavy with, this fire had come, +Five hundred fifty times and thrice, its beams +To reilumine underneath the foot +Of its own lion. They, of whom I sprang, +And I, had there our birth-place, where the last +Partition of our city first is reach'd +By him, that runs her annual game. Thus much +Suffice of my forefathers: who they were, +And whence they hither came, more honourable +It is to pass in silence than to tell. +All those, who in that time were there from Mars +Until the Baptist, fit to carry arms, +Were but the fifth of them this day alive. +But then the citizen's blood, that now is mix'd +From Campi and Certaldo and Fighine, +Ran purely through the last mechanic's veins. +O how much better were it, that these people +Were neighbours to you, and that at Galluzzo +And at Trespiano, ye should have your bound'ry, +Than to have them within, and bear the stench +Of Aguglione's hind, and Signa's, him, +That hath his eye already keen for bart'ring! +Had not the people, which of all the world +Degenerates most, been stepdame unto Caesar, +But, as a mother, gracious to her son; +Such one, as hath become a Florentine, +And trades and traffics, had been turn'd adrift +To Simifonte, where his grandsire ply'd +The beggar's craft. The Conti were possess'd +Of Montemurlo still: the Cerchi still +Were in Acone's parish; nor had haply +From Valdigrieve past the Buondelmonte. +The city's malady hath ever source +In the confusion of its persons, as +The body's, in variety of food: +And the blind bull falls with a steeper plunge, +Than the blind lamb; and oftentimes one sword +Doth more and better execution, +Than five. Mark Luni, Urbisaglia mark, +How they are gone, and after them how go +Chiusi and Sinigaglia; and 't will seem +No longer new or strange to thee to hear, +That families fail, when cities have their end. +All things, that appertain t' ye, like yourselves, +Are mortal: but mortality in some +Ye mark not, they endure so long, and you +Pass by so suddenly. And as the moon +Doth, by the rolling of her heav'nly sphere, +Hide and reveal the strand unceasingly; +So fortune deals with Florence. Hence admire not +At what of them I tell thee, whose renown +Time covers, the first Florentines. I saw +The Ughi, Catilini and Filippi, +The Alberichi, Greci and Ormanni, +Now in their wane, illustrious citizens: +And great as ancient, of Sannella him, +With him of Arca saw, and Soldanieri +And Ardinghi, and Bostichi. At the poop, +That now is laden with new felony, +So cumb'rous it may speedily sink the bark, +The Ravignani sat, of whom is sprung +The County Guido, and whoso hath since +His title from the fam'd Bellincione ta'en. +Fair governance was yet an art well priz'd +By him of Pressa: Galigaio show'd +The gilded hilt and pommel, in his house. +The column, cloth'd with verrey, still was seen +Unshaken: the Sacchetti still were great, +Giouchi, Sifanti, Galli and Barucci, +With them who blush to hear the bushel nam'd. +Of the Calfucci still the branchy trunk +Was in its strength: and to the curule chairs +Sizii and Arigucci yet were drawn. +How mighty them I saw, whom since their pride +Hath undone! and in all her goodly deeds +Florence was by the bullets of bright gold +O'erflourish'd. Such the sires of those, who now, +As surely as your church is vacant, flock +Into her consistory, and at leisure +There stall them and grow fat. The o'erweening brood, +That plays the dragon after him that flees, +But unto such, as turn and show the tooth, +Ay or the purse, is gentle as a lamb, +Was on its rise, but yet so slight esteem'd, +That Ubertino of Donati grudg'd +His father-in-law should yoke him to its tribe. +Already Caponsacco had descended +Into the mart from Fesole: and Giuda +And Infangato were good citizens. +A thing incredible I tell, tho' true: +The gateway, named from those of Pera, led +Into the narrow circuit of your walls. +Each one, who bears the sightly quarterings +Of the great Baron (he whose name and worth +The festival of Thomas still revives) +His knighthood and his privilege retain'd; +Albeit one, who borders them With gold, +This day is mingled with the common herd. +In Borgo yet the Gualterotti dwelt, +And Importuni: well for its repose +Had it still lack'd of newer neighbourhood. +The house, from whence your tears have had their spring, +Through the just anger that hath murder'd ye +And put a period to your gladsome days, +Was honour'd, it, and those consorted with it. +O Buondelmonte! what ill counseling +Prevail'd on thee to break the plighted bond +Many, who now are weeping, would rejoice, +Had God to Ema giv'n thee, the first time +Thou near our city cam'st. But so was doom'd: +On that maim'd stone set up to guard the bridge, +At thy last peace, the victim, Florence! fell. +With these and others like to them, I saw +Florence in such assur'd tranquility, +She had no cause at which to grieve: with these +Saw her so glorious and so just, that ne'er +The lily from the lance had hung reverse, +Or through division been with vermeil dyed." + + + + +CANTO XVII + +Such as the youth, who came to Clymene +To certify himself of that reproach, +Which had been fasten'd on him, (he whose end +Still makes the fathers chary to their sons), +E'en such was I; nor unobserv'd was such +Of Beatrice, and that saintly lamp, +Who had erewhile for me his station mov'd; +When thus by lady: "Give thy wish free vent, +That it may issue, bearing true report +Of the mind's impress; not that aught thy words +May to our knowledge add, but to the end, +That thou mayst use thyself to own thy thirst +And men may mingle for thee when they hear." + +"O plant! from whence I spring! rever'd and lov'd! +Who soar'st so high a pitch, thou seest as clear, +As earthly thought determines two obtuse +In one triangle not contain'd, so clear +Dost see contingencies, ere in themselves +Existent, looking at the point whereto +All times are present, I, the whilst I scal'd +With Virgil the soul purifying mount, +And visited the nether world of woe, +Touching my future destiny have heard +Words grievous, though I feel me on all sides +Well squar'd to fortune's blows. Therefore my will +Were satisfied to know the lot awaits me, +The arrow, seen beforehand, slacks its flight." + +So said I to the brightness, which erewhile +To me had spoken, and my will declar'd, +As Beatrice will'd, explicitly. +Nor with oracular response obscure, +Such, as or ere the Lamb of God was slain, +Beguil'd the credulous nations; but, in terms +Precise and unambiguous lore, replied +The spirit of paternal love, enshrin'd, +Yet in his smile apparent; and thus spake: +"Contingency, unfolded not to view +Upon the tablet of your mortal mold, +Is all depictur'd in the' eternal sight; +But hence deriveth not necessity, +More then the tall ship, hurried down the flood, +Doth from the vision, that reflects the scene. +From thence, as to the ear sweet harmony +From organ comes, so comes before mine eye +The time prepar'd for thee. Such as driv'n out +From Athens, by his cruel stepdame's wiles, +Hippolytus departed, such must thou +Depart from Florence. This they wish, and this +Contrive, and will ere long effectuate, there, +Where gainful merchandize is made of Christ, +Throughout the livelong day. The common cry, +Will, as 't is ever wont, affix the blame +Unto the party injur'd: but the truth +Shall, in the vengeance it dispenseth, find +A faithful witness. Thou shall leave each thing +Belov'd most dearly: this is the first shaft +Shot from the bow of exile. Thou shalt prove +How salt the savour is of other's bread, +How hard the passage to descend and climb +By other's stairs, But that shall gall thee most +Will be the worthless and vile company, +With whom thou must be thrown into these straits. +For all ungrateful, impious all and mad, +Shall turn 'gainst thee: but in a little while +Theirs and not thine shall be the crimson'd brow +Their course shall so evince their brutishness +T' have ta'en thy stand apart shall well become thee. + +"First refuge thou must find, first place of rest, +In the great Lombard's courtesy, who bears +Upon the ladder perch'd the sacred bird. +He shall behold thee with such kind regard, +That 'twixt ye two, the contrary to that +Which falls 'twixt other men, the granting shall +Forerun the asking. With him shalt thou see +That mortal, who was at his birth impress +So strongly from this star, that of his deeds +The nations shall take note. His unripe age +Yet holds him from observance; for these wheels +Only nine years have compass him about. +But, ere the Gascon practice on great Harry, +Sparkles of virtue shall shoot forth in him, +In equal scorn of labours and of gold. +His bounty shall be spread abroad so widely, +As not to let the tongues e'en of his foes +Be idle in its praise. Look thou to him +And his beneficence: for he shall cause +Reversal of their lot to many people, +Rich men and beggars interchanging fortunes. +And thou shalt bear this written in thy soul +Of him, but tell it not;" and things he told +Incredible to those who witness them; +Then added: "So interpret thou, my son, +What hath been told thee.--Lo! the ambushment +That a few circling seasons hide for thee! +Yet envy not thy neighbours: time extends +Thy span beyond their treason's chastisement." + +Soon, as the saintly spirit, by his silence, +Had shown the web, which I had streteh'd for him +Upon the warp, was woven, I began, +As one, who in perplexity desires +Counsel of other, wise, benign and friendly: +"My father! well I mark how time spurs on +Toward me, ready to inflict the blow, +Which falls most heavily on him, who most +Abandoned himself. Therefore 't is good +I should forecast, that driven from the place +Most dear to me, I may not lose myself +All others by my song. Down through the world +Of infinite mourning, and along the mount +From whose fair height my lady's eyes did lift me, +And after through this heav'n from light to light, +Have I learnt that, which if I tell again, +It may with many woefully disrelish; +And, if I am a timid friend to truth, +I fear my life may perish among those, +To whom these days shall be of ancient date." + +The brightness, where enclos'd the treasure smil'd, +Which I had found there, first shone glisteningly, +Like to a golden mirror in the sun; +Next answer'd: "Conscience, dimm'd or by its own +Or other's shame, will feel thy saying sharp. +Thou, notwithstanding, all deceit remov'd, +See the whole vision be made manifest. +And let them wince who have their withers wrung. +What though, when tasted first, thy voice shall prove +Unwelcome, on digestion it will turn +To vital nourishment. The cry thou raisest, +Shall, as the wind doth, smite the proudest summits; +Which is of honour no light argument, +For this there only have been shown to thee, +Throughout these orbs, the mountain, and the deep, +Spirits, whom fame hath note of. For the mind +Of him, who hears, is loth to acquiesce +And fix its faith, unless the instance brought +Be palpable, and proof apparent urge." + + + + +CANTO XVIII + +CANTO XVIII + +Now in his word, sole, ruminating, joy'd +That blessed spirit; and I fed on mine, +Tempting the sweet with bitter: she meanwhile, +Who led me unto God, admonish'd: "Muse +On other thoughts: bethink thee, that near Him +I dwell, who recompenseth every wrong." + +At the sweet sounds of comfort straight I turn'd; +And, in the saintly eyes what love was seen, +I leave in silence here: nor through distrust +Of my words only, but that to such bliss +The mind remounts not without aid. Thus much +Yet may I speak; that, as I gaz'd on her, +Affection found no room for other wish. +While the everlasting pleasure, that did full +On Beatrice shine, with second view +From her fair countenance my gladden'd soul +Contented; vanquishing me with a beam +Of her soft smile, she spake: "Turn thee, and list. +These eyes are not thy only Paradise." + +As here we sometimes in the looks may see +Th' affection mark'd, when that its sway hath ta'en +The spirit wholly; thus the hallow'd light, +To whom I turn'd, flashing, bewray'd its will +To talk yet further with me, and began: +"On this fifth lodgment of the tree, whose life +Is from its top, whose fruit is ever fair +And leaf unwith'ring, blessed spirits abide, +That were below, ere they arriv'd in heav'n, +So mighty in renown, as every muse +Might grace her triumph with them. On the horns +Look therefore of the cross: he, whom I name, +Shall there enact, as doth in summer cloud +Its nimble fire." Along the cross I saw, +At the repeated name of Joshua, +A splendour gliding; nor, the word was said, +Ere it was done: then, at the naming saw +Of the great Maccabee, another move +With whirling speed; and gladness was the scourge +Unto that top. The next for Charlemagne +And for the peer Orlando, two my gaze +Pursued, intently, as the eye pursues +A falcon flying. Last, along the cross, +William, and Renard, and Duke Godfrey drew +My ken, and Robert Guiscard. And the soul, +Who spake with me among the other lights +Did move away, and mix; and with the choir +Of heav'nly songsters prov'd his tuneful skill. + +To Beatrice on my right l bent, +Looking for intimation or by word +Or act, what next behoov'd; and did descry +Such mere effulgence in her eyes, such joy, +It past all former wont. And, as by sense +Of new delight, the man, who perseveres +In good deeds doth perceive from day to day +His virtue growing; I e'en thus perceiv'd +Of my ascent, together with the heav'n +The circuit widen'd, noting the increase +Of beauty in that wonder. Like the change +In a brief moment on some maiden's cheek, +Which from its fairness doth discharge the weight +Of pudency, that stain'd it; such in her, +And to mine eyes so sudden was the change, +Through silvery whiteness of that temperate star, +Whose sixth orb now enfolded us. I saw, +Within that Jovial cresset, the clear sparks +Of love, that reign'd there, fashion to my view +Our language. And as birds, from river banks +Arisen, now in round, now lengthen'd troop, +Array them in their flight, greeting, as seems, +Their new-found pastures; so, within the lights, +The saintly creatures flying, sang, and made +Now D. now I. now L. figur'd I' th' air. + +First, singing, to their notes they mov'd, then one +Becoming of these signs, a little while +Did rest them, and were mute. O nymph divine +Of Pegasean race! whose souls, which thou +Inspir'st, mak'st glorious and long-liv'd, as they +Cities and realms by thee! thou with thyself +Inform me; that I may set forth the shapes, +As fancy doth present them. Be thy power +Display'd in this brief song. The characters, +Vocal and consonant, were five-fold seven. +In order each, as they appear'd, I mark'd. +Diligite Justitiam, the first, +Both verb and noun all blazon'd; and the extreme +Qui judicatis terram. In the M. +Of the fifth word they held their station, +Making the star seem silver streak'd with gold. +And on the summit of the M. I saw +Descending other lights, that rested there, +Singing, methinks, their bliss and primal good. +Then, as at shaking of a lighted brand, +Sparkles innumerable on all sides +Rise scatter'd, source of augury to th' unwise; +Thus more than thousand twinkling lustres hence +Seem'd reascending, and a higher pitch +Some mounting, and some less; e'en as the sun, +Which kindleth them, decreed. And when each one +Had settled in his place, the head and neck +Then saw I of an eagle, lively +Grav'd in that streaky fire. Who painteth there, +Hath none to guide him; of himself he guides; +And every line and texture of the nest +Doth own from him the virtue, fashions it. +The other bright beatitude, that seem'd +Erewhile, with lilied crowning, well content +To over-canopy the M. mov'd forth, +Following gently the impress of the bird. + + Sweet star! what glorious and thick-studded gems +Declar'd to me our justice on the earth +To be the effluence of that heav'n, which thou, +Thyself a costly jewel, dost inlay! +Therefore I pray the Sovran Mind, from whom +Thy motion and thy virtue are begun, +That he would look from whence the fog doth rise, +To vitiate thy beam: so that once more +He may put forth his hand 'gainst such, as drive +Their traffic in that sanctuary, whose walls +With miracles and martyrdoms were built. + +Ye host of heaven! whose glory I survey! +O beg ye grace for those, that are on earth +All after ill example gone astray. +War once had for its instrument the sword: +But now 't is made, taking the bread away +Which the good Father locks from none. --And thou, +That writes but to cancel, think, that they, +Who for the vineyard, which thou wastest, died, +Peter and Paul live yet, and mark thy doings. +Thou hast good cause to cry, "My heart so cleaves +To him, that liv'd in solitude remote, +And from the wilds was dragg'd to martyrdom, +I wist not of the fisherman nor Paul." + + + + +CANTO XIX + +Before my sight appear'd, with open wings, +The beauteous image, in fruition sweet +Gladdening the thronged spirits. Each did seem +A little ruby, whereon so intense +The sun-beam glow'd that to mine eyes it came +In clear refraction. And that, which next +Befalls me to portray, voice hath not utter'd, +Nor hath ink written, nor in fantasy +Was e'er conceiv'd. For I beheld and heard +The beak discourse; and, what intention form'd +Of many, singly as of one express, +Beginning: "For that I was just and piteous, +l am exalted to this height of glory, +The which no wish exceeds: and there on earth +Have I my memory left, e'en by the bad +Commended, while they leave its course untrod." + +Thus is one heat from many embers felt, +As in that image many were the loves, +And one the voice, that issued from them all. +Whence I address them: "O perennial flowers +Of gladness everlasting! that exhale +In single breath your odours manifold! +Breathe now; and let the hunger be appeas'd, +That with great craving long hath held my soul, +Finding no food on earth. This well I know, +That if there be in heav'n a realm, that shows +In faithful mirror the celestial Justice, +Yours without veil reflects it. Ye discern +The heed, wherewith I do prepare myself +To hearken; ye the doubt that urges me +With such inveterate craving." Straight I saw, +Like to a falcon issuing from the hood, +That rears his head, and claps him with his wings, +His beauty and his eagerness bewraying. +So saw I move that stately sign, with praise +Of grace divine inwoven and high song +Of inexpressive joy. "He," it began, +"Who turn'd his compass on the world's extreme, +And in that space so variously hath wrought, +Both openly, and in secret, in such wise +Could not through all the universe display +Impression of his glory, that the Word +Of his omniscience should not still remain +In infinite excess. In proof whereof, +He first through pride supplanted, who was sum +Of each created being, waited not +For light celestial, and abortive fell. +Whence needs each lesser nature is but scant +Receptacle unto that Good, which knows +No limit, measur'd by itself alone. +Therefore your sight, of th' omnipresent Mind +A single beam, its origin must own +Surpassing far its utmost potency. +The ken, your world is gifted with, descends +In th' everlasting Justice as low down, +As eye doth in the sea; which though it mark +The bottom from the shore, in the wide main +Discerns it not; and ne'ertheless it is, +But hidden through its deepness. Light is none, +Save that which cometh from the pure serene +Of ne'er disturbed ether: for the rest, +'Tis darkness all, or shadow of the flesh, +Or else its poison. Here confess reveal'd +That covert, which hath hidden from thy search +The living justice, of the which thou mad'st +Such frequent question; for thou saidst--'A man +Is born on Indus' banks, and none is there +Who speaks of Christ, nor who doth read nor write, +And all his inclinations and his acts, +As far as human reason sees, are good, +And he offendeth not in word or deed. +But unbaptiz'd he dies, and void of faith. +Where is the justice that condemns him? where +His blame, if he believeth not?'--What then, +And who art thou, that on the stool wouldst sit +To judge at distance of a thousand miles +With the short-sighted vision of a span? +To him, who subtilizes thus with me, +There would assuredly be room for doubt +Even to wonder, did not the safe word +Of scripture hold supreme authority. + +"O animals of clay! O spirits gross I +The primal will, that in itself is good, +Hath from itself, the chief Good, ne'er been mov'd. +Justice consists in consonance with it, +Derivable by no created good, +Whose very cause depends upon its beam." + +As on her nest the stork, that turns about +Unto her young, whom lately she hath fed, +While they with upward eyes do look on her; +So lifted I my gaze; and bending so +The ever-blessed image wav'd its wings, +Lab'ring with such deep counsel. Wheeling round +It warbled, and did say: "As are my notes +To thee, who understand'st them not, such is +Th' eternal judgment unto mortal ken." + +Then still abiding in that ensign rang'd, +Wherewith the Romans over-awed the world, +Those burning splendours of the Holy Spirit +Took up the strain; and thus it spake again: +"None ever hath ascended to this realm, +Who hath not a believer been in Christ, +Either before or after the blest limbs +Were nail'd upon the wood. But lo! of those +Who call 'Christ, Christ,' there shall be many found, + In judgment, further off from him by far, +Than such, to whom his name was never known. +Christians like these the Ethiop shall condemn: +When that the two assemblages shall part; +One rich eternally, the other poor. + +"What may the Persians say unto your kings, +When they shall see that volume, in the which +All their dispraise is written, spread to view? +There amidst Albert's works shall that be read, +Which will give speedy motion to the pen, +When Prague shall mourn her desolated realm. +There shall be read the woe, that he doth work +With his adulterate money on the Seine, +Who by the tusk will perish: there be read +The thirsting pride, that maketh fool alike +The English and Scot, impatient of their bound. +There shall be seen the Spaniard's luxury, +The delicate living there of the Bohemian, +Who still to worth has been a willing stranger. +The halter of Jerusalem shall see +A unit for his virtue, for his vices +No less a mark than million. He, who guards +The isle of fire by old Anchises honour'd +Shall find his avarice there and cowardice; +And better to denote his littleness, +The writing must be letters maim'd, that speak +Much in a narrow space. All there shall know +His uncle and his brother's filthy doings, +Who so renown'd a nation and two crowns +Have bastardized. And they, of Portugal +And Norway, there shall be expos'd with him +Of Ratza, who hath counterfeited ill +The coin of Venice. O blest Hungary! +If thou no longer patiently abid'st +Thy ill-entreating! and, O blest Navarre! +If with thy mountainous girdle thou wouldst arm thee +In earnest of that day, e'en now are heard +Wailings and groans in Famagosta's streets +And Nicosia's, grudging at their beast, +Who keepeth even footing with the rest." + + + + +CANTO XX + +When, disappearing, from our hemisphere, +The world's enlightener vanishes, and day +On all sides wasteth, suddenly the sky, +Erewhile irradiate only with his beam, +Is yet again unfolded, putting forth +Innumerable lights wherein one shines. +Of such vicissitude in heaven I thought, +As the great sign, that marshaleth the world +And the world's leaders, in the blessed beak +Was silent; for that all those living lights, +Waxing in splendour, burst forth into songs, +Such as from memory glide and fall away. + +Sweet love! that dost apparel thee in smiles, +How lustrous was thy semblance in those sparkles, +Which merely are from holy thoughts inspir'd! + +After the precious and bright beaming stones, +That did ingem the sixth light, ceas'd the chiming +Of their angelic bells; methought I heard +The murmuring of a river, that doth fall +From rock to rock transpicuous, making known +The richness of his spring-head: and as sound +Of cistern, at the fret-board, or of pipe, +Is, at the wind-hole, modulate and tun'd; +Thus up the neck, as it were hollow, rose +That murmuring of the eagle, and forthwith +Voice there assum'd, and thence along the beak +Issued in form of words, such as my heart +Did look for, on whose tables I inscrib'd them. + +"The part in me, that sees, and bears the sun,, +In mortal eagles," it began, "must now +Be noted steadfastly: for of the fires, +That figure me, those, glittering in mine eye, +Are chief of all the greatest. This, that shines +Midmost for pupil, was the same, who sang +The Holy Spirit's song, and bare about +The ark from town to town; now doth he know +The merit of his soul-impassion'd strains +By their well-fitted guerdon. Of the five, +That make the circle of the vision, he +Who to the beak is nearest, comforted +The widow for her son: now doth he know +How dear he costeth not to follow Christ, +Both from experience of this pleasant life, +And of its opposite. He next, who follows +In the circumference, for the over arch, +By true repenting slack'd the pace of death: +Now knoweth he, that the degrees of heav'n +Alter not, when through pious prayer below +Today's is made tomorrow's destiny. +The other following, with the laws and me, +To yield the shepherd room, pass'd o'er to Greece, +From good intent producing evil fruit: +Now knoweth he, how all the ill, deriv'd +From his well doing, doth not helm him aught, +Though it have brought destruction on the world. +That, which thou seest in the under bow, +Was William, whom that land bewails, which weeps +For Charles and Frederick living: now he knows +How well is lov'd in heav'n the righteous king, +Which he betokens by his radiant seeming. +Who in the erring world beneath would deem, +That Trojan Ripheus in this round was set +Fifth of the saintly splendours? now he knows +Enough of that, which the world cannot see, +The grace divine, albeit e'en his sight +Reach not its utmost depth." Like to the lark, +That warbling in the air expatiates long, +Then, trilling out his last sweet melody, +Drops satiate with the sweetness; such appear'd +That image stampt by the' everlasting pleasure, +Which fashions like itself all lovely things. + +I, though my doubting were as manifest, +As is through glass the hue that mantles it, +In silence waited not: for to my lips +"What things are these?" involuntary rush'd, +And forc'd a passage out: whereat I mark'd +A sudden lightening and new revelry. +The eye was kindled: and the blessed sign +No more to keep me wond'ring and suspense, +Replied: "I see that thou believ'st these things, +Because I tell them, but discern'st not how; +So that thy knowledge waits not on thy faith: +As one who knows the name of thing by rote, +But is a stranger to its properties, +Till other's tongue reveal them. Fervent love +And lively hope with violence assail +The kingdom of the heavens, and overcome +The will of the Most high; not in such sort +As man prevails o'er man; but conquers it, +Because 't is willing to be conquer'd, still, +Though conquer'd, by its mercy conquering. + +"Those, in the eye who live the first and fifth, +Cause thee to marvel, in that thou behold'st +The region of the angels deck'd with them. +They quitted not their bodies, as thou deem'st, +Gentiles but Christians, in firm rooted faith, +This of the feet in future to be pierc'd, +That of feet nail'd already to the cross. +One from the barrier of the dark abyss, +Where never any with good will returns, +Came back unto his bones. Of lively hope +Such was the meed; of lively hope, that wing'd +The prayers sent up to God for his release, +And put power into them to bend his will. +The glorious Spirit, of whom I speak to thee, +A little while returning to the flesh, +Believ'd in him, who had the means to help, +And, in believing, nourish'd such a flame +Of holy love, that at the second death +He was made sharer in our gamesome mirth. +The other, through the riches of that grace, +Which from so deep a fountain doth distil, +As never eye created saw its rising, +Plac'd all his love below on just and right: +Wherefore of grace God op'd in him the eye +To the redemption of mankind to come; +Wherein believing, he endur'd no more +The filth of paganism, and for their ways +Rebuk'd the stubborn nations. The three nymphs, +Whom at the right wheel thou beheldst advancing, +Were sponsors for him more than thousand years +Before baptizing. O how far remov'd, +Predestination! is thy root from such +As see not the First cause entire: and ye, +O mortal men! be wary how ye judge: +For we, who see our Maker, know not yet +The number of the chosen: and esteem +Such scantiness of knowledge our delight: +For all our good is in that primal good +Concentrate, and God's will and ours are one." + +So, by that form divine, was giv'n to me +Sweet medicine to clear and strengthen sight, +And, as one handling skillfully the harp, +Attendant on some skilful songster's voice +Bids the chords vibrate, and therein the song +Acquires more pleasure; so, the whilst it spake, +It doth remember me, that I beheld +The pair of blessed luminaries move. +Like the accordant twinkling of two eyes, +Their beamy circlets, dancing to the sounds. + + + + +CANTO XXI + +Again mine eyes were fix'd on Beatrice, +And with mine eyes my soul, that in her looks +Found all contentment. Yet no smile she wore +And, "Did I smile," quoth she, "thou wouldst be straight +Like Semele when into ashes turn'd: +For, mounting these eternal palace-stairs, +My beauty, which the loftier it climbs, +As thou hast noted, still doth kindle more, +So shines, that, were no temp'ring interpos'd, +Thy mortal puissance would from its rays +Shrink, as the leaf doth from the thunderbolt. +Into the seventh splendour are we wafted, +That underneath the burning lion's breast +Beams, in this hour, commingled with his might, +Thy mind be with thine eyes: and in them mirror'd +The shape, which in this mirror shall be shown." +Whoso can deem, how fondly I had fed +My sight upon her blissful countenance, +May know, when to new thoughts I chang'd, what joy +To do the bidding of my heav'nly guide: +In equal balance poising either weight. + +Within the crystal, which records the name, +(As its remoter circle girds the world) +Of that lov'd monarch, in whose happy reign +No ill had power to harm, I saw rear'd up, +In colour like to sun-illumin'd gold. + +A ladder, which my ken pursued in vain, +So lofty was the summit; down whose steps +I saw the splendours in such multitude +Descending, ev'ry light in heav'n, methought, +Was shed thence. As the rooks, at dawn of day +Bestirring them to dry their feathers chill, +Some speed their way a-field, and homeward some, +Returning, cross their flight, while some abide +And wheel around their airy lodge; so seem'd +That glitterance, wafted on alternate wing, +As upon certain stair it met, and clash'd +Its shining. And one ling'ring near us, wax'd +So bright, that in my thought: said: "The love, +Which this betokens me, admits no doubt." + +Unwillingly from question I refrain, +To her, by whom my silence and my speech +Are order'd, looking for a sign: whence she, +Who in the sight of Him, that seeth all, +Saw wherefore I was silent, prompted me +T' indulge the fervent wish; and I began: +"I am not worthy, of my own desert, +That thou shouldst answer me; but for her sake, +Who hath vouchsaf'd my asking, spirit blest! +That in thy joy art shrouded! say the cause, +Which bringeth thee so near: and wherefore, say, +Doth the sweet symphony of Paradise +Keep silence here, pervading with such sounds +Of rapt devotion ev'ry lower sphere?" +"Mortal art thou in hearing as in sight;" +Was the reply: "and what forbade the smile +Of Beatrice interrupts our song. +Only to yield thee gladness of my voice, +And of the light that vests me, I thus far +Descend these hallow'd steps: not that more love +Invites me; for lo! there aloft, as much +Or more of love is witness'd in those flames: +But such my lot by charity assign'd, +That makes us ready servants, as thou seest, +To execute the counsel of the Highest." +"That in this court," said I, "O sacred lamp! +Love no compulsion needs, but follows free +Th' eternal Providence, I well discern: +This harder find to deem, why of thy peers +Thou only to this office wert foredoom'd." +I had not ended, when, like rapid mill, +Upon its centre whirl'd the light; and then +The love, that did inhabit there, replied: +"Splendour eternal, piercing through these folds, +Its virtue to my vision knits, and thus +Supported, lifts me so above myself, +That on the sov'ran essence, which it wells from, +I have the power to gaze: and hence the joy, +Wherewith I sparkle, equaling with my blaze +The keenness of my sight. But not the soul, +That is in heav'n most lustrous, nor the seraph +That hath his eyes most fix'd on God, shall solve +What thou hast ask'd: for in th' abyss it lies +Of th' everlasting statute sunk so low, +That no created ken may fathom it. +And, to the mortal world when thou return'st, +Be this reported; that none henceforth dare +Direct his footsteps to so dread a bourn. +The mind, that here is radiant, on the earth +Is wrapt in mist. Look then if she may do, +Below, what passeth her ability, +When she is ta'en to heav'n." By words like these +Admonish'd, I the question urg'd no more; +And of the spirit humbly sued alone +T' instruct me of its state. "'Twixt either shore +Of Italy, nor distant from thy land, +A stony ridge ariseth, in such sort, +The thunder doth not lift his voice so high, +They call it Catria: at whose foot a cell +Is sacred to the lonely Eremite, +For worship set apart and holy rites." +A third time thus it spake; then added: "There +So firmly to God's service I adher'd, +That with no costlier viands than the juice +Of olives, easily I pass'd the heats +Of summer and the winter frosts, content +In heav'n-ward musings. Rich were the returns +And fertile, which that cloister once was us'd +To render to these heavens: now 't is fall'n +Into a waste so empty, that ere long +Detection must lay bare its vanity +Pietro Damiano there was I yclept: +Pietro the sinner, when before I dwelt +Beside the Adriatic, in the house +Of our blest Lady. Near upon my close +Of mortal life, through much importuning +I was constrain'd to wear the hat that still +From bad to worse it shifted.--Cephas came; +He came, who was the Holy Spirit's vessel, +Barefoot and lean, eating their bread, as chanc'd, +At the first table. Modern Shepherd's need +Those who on either hand may prop and lead them, +So burly are they grown: and from behind +Others to hoist them. Down the palfrey's sides +Spread their broad mantles, so as both the beasts +Are cover'd with one skin. O patience! thou +That lookst on this and doth endure so long." +I at those accents saw the splendours down +From step to step alight, and wheel, and wax, +Each circuiting, more beautiful. Round this +They came, and stay'd them; uttered them a shout +So loud, it hath no likeness here: nor I +Wist what it spake, so deaf'ning was the thunder. + + + + +CANTO XXII + +Astounded, to the guardian of my steps +I turn'd me, like the chill, who always runs +Thither for succour, where he trusteth most, +And she was like the mother, who her son +Beholding pale and breathless, with her voice +Soothes him, and he is cheer'd; for thus she spake, +Soothing me: "Know'st not thou, thou art in heav'n? +And know'st not thou, whatever is in heav'n, +Is holy, and that nothing there is done +But is done zealously and well? Deem now, +What change in thee the song, and what my smile +had wrought, since thus the shout had pow'r to move thee. +In which couldst thou have understood their prayers, +The vengeance were already known to thee, +Which thou must witness ere thy mortal hour, +The sword of heav'n is not in haste to smite, +Nor yet doth linger, save unto his seeming, +Who in desire or fear doth look for it. +But elsewhere now l bid thee turn thy view; +So shalt thou many a famous spirit behold." +Mine eyes directing, as she will'd, I saw +A hundred little spheres, that fairer grew +By interchange of splendour. I remain'd, +As one, who fearful of o'er-much presuming, +Abates in him the keenness of desire, +Nor dares to question, when amid those pearls, +One largest and most lustrous onward drew, +That it might yield contentment to my wish; +And from within it these the sounds I heard. + +"If thou, like me, beheldst the charity +That burns amongst us, what thy mind conceives, +Were utter'd. But that, ere the lofty bound +Thou reach, expectance may not weary thee, +I will make answer even to the thought, +Which thou hast such respect of. In old days, +That mountain, at whose side Cassino rests, +Was on its height frequented by a race +Deceived and ill dispos'd: and I it was, +Who thither carried first the name of Him, +Who brought the soul-subliming truth to man. +And such a speeding grace shone over me, +That from their impious worship I reclaim'd +The dwellers round about, who with the world +Were in delusion lost. These other flames, +The spirits of men contemplative, were all +Enliven'd by that warmth, whose kindly force +Gives birth to flowers and fruits of holiness. +Here is Macarius; Romoaldo here: +And here my brethren, who their steps refrain'd +Within the cloisters, and held firm their heart." + +I answ'ring, thus; "Thy gentle words and kind, +And this the cheerful semblance, I behold +Not unobservant, beaming in ye all, +Have rais'd assurance in me, wakening it +Full-blossom'd in my bosom, as a rose +Before the sun, when the consummate flower +Has spread to utmost amplitude. Of thee +Therefore entreat I, father! to declare +If I may gain such favour, as to gaze +Upon thine image, by no covering veil'd." + +"Brother!" he thus rejoin'd, "in the last sphere +Expect completion of thy lofty aim, +For there on each desire completion waits, +And there on mine: where every aim is found +Perfect, entire, and for fulfillment ripe. +There all things are as they have ever been: +For space is none to bound, nor pole divides, +Our ladder reaches even to that clime, +And so at giddy distance mocks thy view. +Thither the Patriarch Jacob saw it stretch +Its topmost round, when it appear'd to him +With angels laden. But to mount it now +None lifts his foot from earth: and hence my rule +Is left a profitless stain upon the leaves; +The walls, for abbey rear'd, turned into dens, +The cowls to sacks choak'd up with musty meal. +Foul usury doth not more lift itself +Against God's pleasure, than that fruit which makes +The hearts of monks so wanton: for whate'er +Is in the church's keeping, all pertains. +To such, as sue for heav'n's sweet sake, and not +To those who in respect of kindred claim, +Or on more vile allowance. Mortal flesh +Is grown so dainty, good beginnings last not +From the oak's birth, unto the acorn's setting. +His convent Peter founded without gold +Or silver; I with pray'rs and fasting mine; +And Francis his in meek humility. +And if thou note the point, whence each proceeds, +Then look what it hath err'd to, thou shalt find +The white grown murky. Jordan was turn'd back; +And a less wonder, then the refluent sea, +May at God's pleasure work amendment here." + +So saying, to his assembly back he drew: +And they together cluster'd into one, +Then all roll'd upward like an eddying wind. + +The sweet dame beckon'd me to follow them: +And, by that influence only, so prevail'd +Over my nature, that no natural motion, +Ascending or descending here below, +Had, as I mounted, with my pennon vied. + +So, reader, as my hope is to return +Unto the holy triumph, for the which +I ofttimes wail my sins, and smite my breast, +Thou hadst been longer drawing out and thrusting +Thy finger in the fire, than I was, ere +The sign, that followeth Taurus, I beheld, +And enter'd its precinct. O glorious stars! +O light impregnate with exceeding virtue! +To whom whate'er of genius lifteth me +Above the vulgar, grateful I refer; +With ye the parent of all mortal life +Arose and set, when I did first inhale +The Tuscan air; and afterward, when grace +Vouchsaf'd me entrance to the lofty wheel +That in its orb impels ye, fate decreed +My passage at your clime. To you my soul +Devoutly sighs, for virtue even now +To meet the hard emprize that draws me on. + +"Thou art so near the sum of blessedness," +Said Beatrice, "that behooves thy ken +Be vigilant and clear. And, to this end, +Or even thou advance thee further, hence +Look downward, and contemplate, what a world +Already stretched under our feet there lies: +So as thy heart may, in its blithest mood, +Present itself to the triumphal throng, +Which through the' etherial concave comes rejoicing." + +I straight obey'd; and with mine eye return'd +Through all the seven spheres, and saw this globe +So pitiful of semblance, that perforce +It moved my smiles: and him in truth I hold +For wisest, who esteems it least: whose thoughts +Elsewhere are fix'd, him worthiest call and best. +I saw the daughter of Latona shine +Without the shadow, whereof late I deem'd +That dense and rare were cause. Here I sustain'd +The visage, Hyperion! of thy sun; +And mark'd, how near him with their circle, round +Move Maia and Dione; here discern'd +Jove's tempering 'twixt his sire and son; and hence +Their changes and their various aspects +Distinctly scann'd. Nor might I not descry +Of all the seven, how bulky each, how swift; +Nor of their several distances not learn. +This petty area (o'er the which we stride +So fiercely), as along the eternal twins +I wound my way, appear'd before me all, +Forth from the havens stretch'd unto the hills. +Then to the beauteous eyes mine eyes return'd. + + + + +CANTO XXIII + +E'en as the bird, who midst the leafy bower +Has, in her nest, sat darkling through the night, +With her sweet brood, impatient to descry +Their wished looks, and to bring home their food, +In the fond quest unconscious of her toil: +She, of the time prevenient, on the spray, +That overhangs their couch, with wakeful gaze +Expects the sun; nor ever, till the dawn, +Removeth from the east her eager ken; +So stood the dame erect, and bent her glance +Wistfully on that region, where the sun +Abateth most his speed; that, seeing her +Suspense and wand'ring, I became as one, +In whom desire is waken'd, and the hope +Of somewhat new to come fills with delight. + +Short space ensued; I was not held, I say, +Long in expectance, when I saw the heav'n +Wax more and more resplendent; and, "Behold," +Cried Beatrice, "the triumphal hosts +Of Christ, and all the harvest reap'd at length +Of thy ascending up these spheres." Meseem'd, +That, while she spake her image all did burn, +And in her eyes such fullness was of joy, +And I am fain to pass unconstrued by. + +As in the calm full moon, when Trivia smiles, +In peerless beauty, 'mid th' eternal nympus, +That paint through all its gulfs the blue profound +In bright pre-eminence so saw I there, +O'er million lamps a sun, from whom all drew +Their radiance as from ours the starry train: +And through the living light so lustrous glow'd +The substance, that my ken endur'd it not. + +O Beatrice! sweet and precious guide! +Who cheer'd me with her comfortable words! +"Against the virtue, that o'erpow'reth thee, +Avails not to resist. Here is the might, +And here the wisdom, which did open lay +The path, that had been yearned for so long, +Betwixt the heav'n and earth." Like to the fire, +That, in a cloud imprison'd doth break out +Expansive, so that from its womb enlarg'd, +It falleth against nature to the ground; +Thus in that heav'nly banqueting my soul +Outgrew herself; and, in the transport lost. +Holds now remembrance none of what she was. + +"Ope thou thine eyes, and mark me: thou hast seen +Things, that empower thee to sustain my smile." + +I was as one, when a forgotten dream +Doth come across him, and he strives in vain +To shape it in his fantasy again, +Whenas that gracious boon was proffer'd me, +Which never may be cancel'd from the book, +Wherein the past is written. Now were all +Those tongues to sound, that have on sweetest milk +Of Polyhymnia and her sisters fed +And fatten'd, not with all their help to boot, +Unto the thousandth parcel of the truth, +My song might shadow forth that saintly smile, +flow merely in her saintly looks it wrought. +And with such figuring of Paradise +The sacred strain must leap, like one, that meets +A sudden interruption to his road. +But he, who thinks how ponderous the theme, +And that 't is lain upon a mortal shoulder, +May pardon, if it tremble with the burden. +The track, our ventrous keel must furrow, brooks +No unribb'd pinnace, no self-sparing pilot. + +"Why doth my face," said Beatrice, "thus +Enamour thee, as that thou dost not turn +Unto the beautiful garden, blossoming +Beneath the rays of Christ? Here is the rose, +Wherein the word divine was made incarnate; +And here the lilies, by whose odour known +The way of life was follow'd." Prompt I heard +Her bidding, and encounter once again +The strife of aching vision. As erewhile, +Through glance of sunlight, stream'd through broken cloud, +Mine eyes a flower-besprinkled mead have seen, +Though veil'd themselves in shade; so saw I there +Legions of splendours, on whom burning rays +Shed lightnings from above, yet saw I not +The fountain whence they flow'd. O gracious virtue! +Thou, whose broad stamp is on them, higher up +Thou didst exalt thy glory to give room +To my o'erlabour'd sight: when at the name +Of that fair flower, whom duly I invoke +Both morn and eve, my soul, with all her might +Collected, on the goodliest ardour fix'd. +And, as the bright dimensions of the star +In heav'n excelling, as once here on earth +Were, in my eyeballs lively portray'd, +Lo! from within the sky a cresset fell, +Circling in fashion of a diadem, +And girt the star, and hov'ring round it wheel'd. + +Whatever melody sounds sweetest here, +And draws the spirit most unto itself, +Might seem a rent cloud when it grates the thunder, +Compar'd unto the sounding of that lyre, +Wherewith the goodliest sapphire, that inlays +The floor of heav'n, was crown'd. "Angelic Love +I am, who thus with hov'ring flight enwheel +The lofty rapture from that womb inspir'd, +Where our desire did dwell: and round thee so, +Lady of Heav'n! will hover; long as thou +Thy Son shalt follow, and diviner joy +Shall from thy presence gild the highest sphere." + +Such close was to the circling melody: +And, as it ended, all the other lights +Took up the strain, and echoed Mary's name. + +The robe, that with its regal folds enwraps +The world, and with the nearer breath of God +Doth burn and quiver, held so far retir'd +Its inner hem and skirting over us, +That yet no glimmer of its majesty +Had stream'd unto me: therefore were mine eyes +Unequal to pursue the crowned flame, +That rose and sought its natal seed of fire; +And like to babe, that stretches forth its arms +For very eagerness towards the breast, +After the milk is taken; so outstretch'd +Their wavy summits all the fervent band, +Through zealous love to Mary: then in view +There halted, and "Regina Coeli" sang +So sweetly, the delight hath left me never. + +O what o'erflowing plenty is up-pil'd +In those rich-laden coffers, which below +Sow'd the good seed, whose harvest now they keep. + +Here are the treasures tasted, that with tears +Were in the Babylonian exile won, +When gold had fail'd them. Here in synod high +Of ancient council with the new conven'd, +Under the Son of Mary and of God, +Victorious he his mighty triumph holds, +To whom the keys of glory were assign'd. + + + + +CANTO XXIV + +"O ye! in chosen fellowship advanc'd +To the great supper of the blessed Lamb, +Whereon who feeds hath every wish fulfill'd! +If to this man through God's grace be vouchsaf'd +Foretaste of that, which from your table falls, +Or ever death his fated term prescribe; +Be ye not heedless of his urgent will; +But may some influence of your sacred dews +Sprinkle him. Of the fount ye alway drink, +Whence flows what most he craves." Beatrice spake, +And the rejoicing spirits, like to spheres +On firm-set poles revolving, trail'd a blaze +Of comet splendour; and as wheels, that wind +Their circles in the horologe, so work +The stated rounds, that to th' observant eye +The first seems still, and, as it flew, the last; +E'en thus their carols weaving variously, +They by the measure pac'd, or swift, or slow, +Made me to rate the riches of their joy. + +From that, which I did note in beauty most +Excelling, saw I issue forth a flame +So bright, as none was left more goodly there. +Round Beatrice thrice it wheel'd about, +With so divine a song, that fancy's ear +Records it not; and the pen passeth on +And leaves a blank: for that our mortal speech, +Nor e'en the inward shaping of the brain, +Hath colours fine enough to trace such folds. + +"O saintly sister mine! thy prayer devout +Is with so vehement affection urg'd, +Thou dost unbind me from that beauteous sphere." + +Such were the accents towards my lady breath'd +From that blest ardour, soon as it was stay'd: +To whom she thus: "O everlasting light +Of him, within whose mighty grasp our Lord +Did leave the keys, which of this wondrous bliss +He bare below! tent this man, as thou wilt, +With lighter probe or deep, touching the faith, +By the which thou didst on the billows walk. +If he in love, in hope, and in belief, +Be steadfast, is not hid from thee: for thou +Hast there thy ken, where all things are beheld +In liveliest portraiture. But since true faith +Has peopled this fair realm with citizens, +Meet is, that to exalt its glory more, +Thou in his audience shouldst thereof discourse." + +Like to the bachelor, who arms himself, +And speaks not, till the master have propos'd +The question, to approve, and not to end it; +So I, in silence, arm'd me, while she spake, +Summoning up each argument to aid; +As was behooveful for such questioner, +And such profession: "As good Christian ought, +Declare thee, What is faith?" Whereat I rais'd +My forehead to the light, whence this had breath'd, +Then turn'd to Beatrice, and in her looks +Approval met, that from their inmost fount +I should unlock the waters. "May the grace, +That giveth me the captain of the church +For confessor," said I, "vouchsafe to me +Apt utterance for my thoughts!" then added: "Sire! +E'en as set down by the unerring style +Of thy dear brother, who with thee conspir'd +To bring Rome in unto the way of life, +Faith of things hop'd is substance, and the proof +Of things not seen; and herein doth consist +Methinks its essence,"--"Rightly hast thou deem'd," +Was answer'd: "if thou well discern, why first +He hath defin'd it, substance, and then proof." + +"The deep things," I replied, "which here I scan +Distinctly, are below from mortal eye +So hidden, they have in belief alone +Their being, on which credence hope sublime +Is built; and therefore substance it intends. +And inasmuch as we must needs infer +From such belief our reasoning, all respect +To other view excluded, hence of proof +Th' intention is deriv'd." Forthwith I heard: +"If thus, whate'er by learning men attain, +Were understood, the sophist would want room +To exercise his wit." So breath'd the flame +Of love: then added: "Current is the coin +Thou utter'st, both in weight and in alloy. +But tell me, if thou hast it in thy purse." + +"Even so glittering and so round," said I, +"I not a whit misdoubt of its assay." + +Next issued from the deep imbosom'd splendour: +"Say, whence the costly jewel, on the which +Is founded every virtue, came to thee." +"The flood," I answer'd, "from the Spirit of God +Rain'd down upon the ancient bond and new,-- +Here is the reas'ning, that convinceth me +So feelingly, each argument beside +Seems blunt and forceless in comparison." +Then heard I: "Wherefore holdest thou that each, +The elder proposition and the new, +Which so persuade thee, are the voice of heav'n?" + +"The works, that follow'd, evidence their truth;" +I answer'd: "Nature did not make for these +The iron hot, or on her anvil mould them." +"Who voucheth to thee of the works themselves," +Was the reply, "that they in very deed +Are that they purport? None hath sworn so to thee." + +"That all the world," said I, "should have been turn'd +To Christian, and no miracle been wrought, +Would in itself be such a miracle, +The rest were not an hundredth part so great. +E'en thou wentst forth in poverty and hunger +To set the goodly plant, that from the vine, +It once was, now is grown unsightly bramble." +That ended, through the high celestial court +Resounded all the spheres. "Praise we one God!" +In song of most unearthly melody. +And when that Worthy thus, from branch to branch, +Examining, had led me, that we now +Approach'd the topmost bough, he straight resum'd; +"The grace, that holds sweet dalliance with thy soul, +So far discreetly hath thy lips unclos'd +That, whatsoe'er has past them, I commend. +Behooves thee to express, what thou believ'st, +The next, and whereon thy belief hath grown." + +"O saintly sire and spirit!" I began, +"Who seest that, which thou didst so believe, +As to outstrip feet younger than thine own, +Toward the sepulchre? thy will is here, +That I the tenour of my creed unfold; +And thou the cause of it hast likewise ask'd. +And I reply: I in one God believe, +One sole eternal Godhead, of whose love +All heav'n is mov'd, himself unmov'd the while. +Nor demonstration physical alone, +Or more intelligential and abstruse, +Persuades me to this faith; but from that truth +It cometh to me rather, which is shed +Through Moses, the rapt Prophets, and the Psalms. +The Gospel, and that ye yourselves did write, +When ye were gifted of the Holy Ghost. +In three eternal Persons I believe, +Essence threefold and one, mysterious league +Of union absolute, which, many a time, +The word of gospel lore upon my mind +Imprints: and from this germ, this firstling spark, +The lively flame dilates, and like heav'n's star +Doth glitter in me." As the master hears, +Well pleas'd, and then enfoldeth in his arms +The servant, who hath joyful tidings brought, +And having told the errand keeps his peace; +Thus benediction uttering with song +Soon as my peace I held, compass'd me thrice +The apostolic radiance, whose behest +Had op'd lips; so well their answer pleas'd. + + + + +CANTO XXV + +If e'er the sacred poem that hath made +Both heav'n and earth copartners in its toil, +And with lean abstinence, through many a year, +Faded my brow, be destin'd to prevail +Over the cruelty, which bars me forth +Of the fair sheep-fold, where a sleeping lamb +The wolves set on and fain had worried me, +With other voice and fleece of other grain +I shall forthwith return, and, standing up +At my baptismal font, shall claim the wreath +Due to the poet's temples: for I there +First enter'd on the faith which maketh souls +Acceptable to God: and, for its sake, +Peter had then circled my forehead thus. + +Next from the squadron, whence had issued forth +The first fruit of Christ's vicars on the earth, +Toward us mov'd a light, at view whereof +My Lady, full of gladness, spake to me: +"Lo! lo! behold the peer of mickle might, +That makes Falicia throng'd with visitants!" + +As when the ring-dove by his mate alights, +In circles each about the other wheels, +And murmuring cooes his fondness; thus saw I +One, of the other great and glorious prince, +With kindly greeting hail'd, extolling both +Their heavenly banqueting; but when an end +Was to their gratulation, silent, each, +Before me sat they down, so burning bright, +I could not look upon them. Smiling then, +Beatrice spake: "O life in glory shrin'd!" +Who didst the largess of our kingly court +Set down with faithful pen! let now thy voice +Of hope the praises in this height resound. +For thou, who figur'st them in shapes, as clear, +As Jesus stood before thee, well can'st speak them." + +"Lift up thy head, and be thou strong in trust: +For that, which hither from the mortal world +Arriveth, must be ripen'd in our beam." + +Such cheering accents from the second flame +Assur'd me; and mine eyes I lifted up +Unto the mountains that had bow'd them late +With over-heavy burden. "Sith our Liege +Wills of his grace that thou, or ere thy death, +In the most secret council, with his lords +Shouldst be confronted, so that having view'd +The glories of our court, thou mayst therewith +Thyself, and all who hear, invigorate +With hope, that leads to blissful end; declare, +What is that hope, how it doth flourish in thee, +And whence thou hadst it?" Thus proceeding still, +The second light: and she, whose gentle love +My soaring pennons in that lofty flight +Escorted, thus preventing me, rejoin'd: +Among her sons, not one more full of hope, +Hath the church militant: so 't is of him +Recorded in the sun, whose liberal orb +Enlighteneth all our tribe: and ere his term +Of warfare, hence permitted he is come, +From Egypt to Jerusalem, to see. +The other points, both which thou hast inquir'd, +Not for more knowledge, but that he may tell +How dear thou holdst the virtue, these to him +Leave I; for he may answer thee with ease, +And without boasting, so God give him grace." +Like to the scholar, practis'd in his task, +Who, willing to give proof of diligence, +Seconds his teacher gladly, "Hope," said I, +"Is of the joy to come a sure expectance, +Th' effect of grace divine and merit preceding. +This light from many a star visits my heart, +But flow'd to me the first from him, who sang +The songs of the Supreme, himself supreme +Among his tuneful brethren. 'Let all hope +In thee,' so speak his anthem, 'who have known +Thy name;' and with my faith who know not that? +From thee, the next, distilling from his spring, +In thine epistle, fell on me the drops +So plenteously, that I on others shower +The influence of their dew." Whileas I spake, +A lamping, as of quick and vollied lightning, +Within the bosom of that mighty sheen, +Play'd tremulous; then forth these accents breath'd: +"Love for the virtue which attended me +E'en to the palm, and issuing from the field, +Glows vigorous yet within me, and inspires +To ask of thee, whom also it delights; +What promise thou from hope in chief dost win." + +"Both scriptures, new and ancient," I reply'd; +"Propose the mark (which even now I view) +For souls belov'd of God. Isaias saith, +That, in their own land, each one must be clad +In twofold vesture; and their proper lands this delicious life. +In terms more full, +And clearer far, thy brother hath set forth +This revelation to us, where he tells +Of the white raiment destin'd to the saints." +And, as the words were ending, from above, +"They hope in thee," first heard we cried: whereto +Answer'd the carols all. Amidst them next, +A light of so clear amplitude emerg'd, +That winter's month were but a single day, +Were such a crystal in the Cancer's sign. + +Like as a virgin riseth up, and goes, +And enters on the mazes of the dance, +Though gay, yet innocent of worse intent, +Than to do fitting honour to the bride; +So I beheld the new effulgence come +Unto the other two, who in a ring +Wheel'd, as became their rapture. In the dance +And in the song it mingled. And the dame +Held on them fix'd her looks: e'en as the spouse +Silent and moveless. "This is he, who lay +Upon the bosom of our pelican: +This he, into whose keeping from the cross +The mighty charge was given." Thus she spake, +Yet therefore naught the more remov'd her Sight +From marking them, or ere her words began, +Or when they clos'd. As he, who looks intent, +And strives with searching ken, how he may see +The sun in his eclipse, and, through desire +Of seeing, loseth power of sight: so I +Peer'd on that last resplendence, while I heard: +"Why dazzlest thou thine eyes in seeking that, +Which here abides not? Earth my body is, +In earth: and shall be, with the rest, so long, +As till our number equal the decree +Of the Most High. The two that have ascended, +In this our blessed cloister, shine alone +With the two garments. So report below." + +As when, for ease of labour, or to shun +Suspected peril at a whistle's breath, +The oars, erewhile dash'd frequent in the wave, +All rest; the flamy circle at that voice +So rested, and the mingling sound was still, +Which from the trinal band soft-breathing rose. +I turn'd, but ah! how trembled in my thought, +When, looking at my side again to see +Beatrice, I descried her not, although +Not distant, on the happy coast she stood. + + + + +CANTO XXVI + +With dazzled eyes, whilst wond'ring I remain'd, +Forth of the beamy flame which dazzled me, +Issued a breath, that in attention mute +Detain'd me; and these words it spake: "'T were well, +That, long as till thy vision, on my form +O'erspent, regain its virtue, with discourse +Thou compensate the brief delay. Say then, +Beginning, to what point thy soul aspires: + +"And meanwhile rest assur'd, that sight in thee +Is but o'erpowered a space, not wholly quench'd: +Since thy fair guide and lovely, in her look +Hath potency, the like to that which dwelt +In Ananias' hand." I answering thus: +"Be to mine eyes the remedy or late +Or early, at her pleasure; for they were +The gates, at which she enter'd, and did light +Her never dying fire. My wishes here +Are centered; in this palace is the weal, +That Alpha and Omega, is to all +The lessons love can read me." Yet again +The voice which had dispers'd my fear, when daz'd +With that excess, to converse urg'd, and spake: +"Behooves thee sift more narrowly thy terms, +And say, who level'd at this scope thy bow." + +"Philosophy," said I, ''hath arguments, +And this place hath authority enough +'T' imprint in me such love: for, of constraint, +Good, inasmuch as we perceive the good, +Kindles our love, and in degree the more, +As it comprises more of goodness in 't. +The essence then, where such advantage is, +That each good, found without it, is naught else +But of his light the beam, must needs attract +The soul of each one, loving, who the truth +Discerns, on which this proof is built. Such truth +Learn I from him, who shows me the first love +Of all intelligential substances +Eternal: from his voice I learn, whose word +Is truth, that of himself to Moses saith, +'I will make all my good before thee pass.' +Lastly from thee I learn, who chief proclaim'st, +E'en at the outset of thy heralding, +In mortal ears the mystery of heav'n." + +"Through human wisdom, and th' authority +Therewith agreeing," heard I answer'd, "keep +The choicest of thy love for God. But say, +If thou yet other cords within thee feel'st +That draw thee towards him; so that thou report +How many are the fangs, with which this love +Is grappled to thy soul." I did not miss, +To what intent the eagle of our Lord +Had pointed his demand; yea noted well +Th' avowal, which he led to; and resum'd: +"All grappling bonds, that knit the heart to God, +Confederate to make fast our clarity. +The being of the world, and mine own being, +The death which he endur'd that I should live, +And that, which all the faithful hope, as I do, +To the foremention'd lively knowledge join'd, +Have from the sea of ill love sav'd my bark, +And on the coast secur'd it of the right. +As for the leaves, that in the garden bloom, +My love for them is great, as is the good +Dealt by th' eternal hand, that tends them all." + +I ended, and therewith a song most sweet +Rang through the spheres; and "Holy, holy, holy," +Accordant with the rest my lady sang. +And as a sleep is broken and dispers'd +Through sharp encounter of the nimble light, +With the eye's spirit running forth to meet +The ray, from membrane on to the membrane urg'd; +And the upstartled wight loathes that he sees; +So, at his sudden waking, he misdeems +Of all around him, till assurance waits +On better judgment: thus the saintly came +Drove from before mine eyes the motes away, +With the resplendence of her own, that cast +Their brightness downward, thousand miles below. +Whence I my vision, clearer shall before, +Recover'd; and, well nigh astounded, ask'd +Of a fourth light, that now with us I saw. + +And Beatrice: "The first diving soul, +That ever the first virtue fram'd, admires +Within these rays his Maker." Like the leaf, +That bows its lithe top till the blast is blown; +By its own virtue rear'd then stands aloof; +So I, the whilst she said, awe-stricken bow'd. +Then eagerness to speak embolden'd me; +And I began: "O fruit! that wast alone +Mature, when first engender'd! Ancient father! +That doubly seest in every wedded bride +Thy daughter by affinity and blood! +Devoutly as I may, I pray thee hold +Converse with me: my will thou seest; and I, +More speedily to hear thee, tell it not." + +It chanceth oft some animal bewrays, +Through the sleek cov'ring of his furry coat. +The fondness, that stirs in him and conforms +His outside seeming to the cheer within: +And in like guise was Adam's spirit mov'd +To joyous mood, that through the covering shone, +Transparent, when to pleasure me it spake: +"No need thy will be told, which I untold +Better discern, than thou whatever thing +Thou holdst most certain: for that will I see +In Him, who is truth's mirror, and Himself +Parhelion unto all things, and naught else +To him. This wouldst thou hear; how long since God +Plac'd me high garden, from whose hounds +She led me up in this ladder, steep and long; +What space endur'd my season of delight; +Whence truly sprang the wrath that banish'd me; +And what the language, which I spake and fram'd +Not that I tasted of the tree, my son, +Was in itself the cause of that exile, +But only my transgressing of the mark +Assign'd me. There, whence at thy lady's hest +The Mantuan mov'd him, still was I debarr'd +This council, till the sun had made complete, +Four thousand and three hundred rounds and twice, +His annual journey; and, through every light +In his broad pathway, saw I him return, +Thousand save sev'nty times, the whilst I dwelt +Upon the earth. The language I did use +Was worn away, or ever Nimrod's race +Their unaccomplishable work began. +For naught, that man inclines to, ere was lasting, +Left by his reason free, and variable, +As is the sky that sways him. That he speaks, +Is nature's prompting: whether thus or thus, +She leaves to you, as ye do most affect it. +Ere I descended into hell's abyss, +El was the name on earth of the Chief Good, +Whose joy enfolds me: Eli then 't was call'd +And so beseemeth: for, in mortals, use +Is as the leaf upon the bough; that goes, +And other comes instead. Upon the mount +Most high above the waters, all my life, +Both innocent and guilty, did but reach +From the first hour, to that which cometh next +(As the sun changes quarter), to the sixth." + + + + +CANTO XXVII + +Then "Glory to the Father, to the Son, +And to the Holy Spirit," rang aloud +Throughout all Paradise, that with the song +My spirit reel'd, so passing sweet the strain: +And what I saw was equal ecstasy; +One universal smile it seem'd of all things, +Joy past compare, gladness unutterable, +Imperishable life of peace and love, +Exhaustless riches and unmeasur'd bliss. + +Before mine eyes stood the four torches lit; +And that, which first had come, began to wax +In brightness, and in semblance such became, +As Jove might be, if he and Mars were birds, +And interchang'd their plumes. Silence ensued, +Through the blest quire, by Him, who here appoints +Vicissitude of ministry, enjoin'd; +When thus I heard: "Wonder not, if my hue +Be chang'd; for, while I speak, these shalt thou see +All in like manner change with me. My place +He who usurps on earth (my place, ay, mine, +Which in the presence of the Son of God +Is void), the same hath made my cemetery +A common sewer of puddle and of blood: +The more below his triumph, who from hence +Malignant fell." Such colour, as the sun, +At eve or morning, paints an adverse cloud, +Then saw I sprinkled over all the sky. +And as th' unblemish'd dame, who in herself +Secure of censure, yet at bare report +Of other's failing, shrinks with maiden fear; +So Beatrice in her semblance chang'd: +And such eclipse in heav'n methinks was seen, +When the Most Holy suffer'd. Then the words +Proceeded, with voice, alter'd from itself +So clean, the semblance did not alter more. +"Not to this end was Christ's spouse with my blood, +With that of Linus, and of Cletus fed: +That she might serve for purchase of base gold: +But for the purchase of this happy life +Did Sextus, Pius, and Callixtus bleed, +And Urban, they, whose doom was not without +Much weeping seal'd. No purpose was of our +That on the right hand of our successors +Part of the Christian people should be set, +And part upon their left; nor that the keys, +Which were vouchsaf'd me, should for ensign serve +Unto the banners, that do levy war +On the baptiz'd: nor I, for sigil-mark +Set upon sold and lying privileges; +Which makes me oft to bicker and turn red. +In shepherd's clothing greedy wolves below +Range wide o'er all the pastures. Arm of God! +Why longer sleepst thou? Caorsines and Gascona +Prepare to quaff our blood. O good beginning +To what a vile conclusion must thou stoop! +But the high providence, which did defend +Through Scipio the world's glory unto Rome, +Will not delay its succour: and thou, son, +Who through thy mortal weight shall yet again +Return below, open thy lips, nor hide +What is by me not hidden." As a Hood +Of frozen vapours streams adown the air, +What time the she-goat with her skiey horn +Touches the sun; so saw I there stream wide +The vapours, who with us had linger'd late +And with glad triumph deck th' ethereal cope. +Onward my sight their semblances pursued; +So far pursued, as till the space between +From its reach sever'd them: whereat the guide +Celestial, marking me no more intent +On upward gazing, said, "Look down and see +What circuit thou hast compass'd." From the hour +When I before had cast my view beneath, +All the first region overpast I saw, +Which from the midmost to the bound'ry winds; +That onward thence from Gades I beheld +The unwise passage of Laertes' son, +And hitherward the shore, where thou, Europa! +Mad'st thee a joyful burden: and yet more +Of this dim spot had seen, but that the sun, +A constellation off and more, had ta'en +His progress in the zodiac underneath. + +Then by the spirit, that doth never leave +Its amorous dalliance with my lady's looks, +Back with redoubled ardour were mine eyes +Led unto her: and from her radiant smiles, +Whenas I turn'd me, pleasure so divine +Did lighten on me, that whatever bait +Or art or nature in the human flesh, +Or in its limn'd resemblance, can combine +Through greedy eyes to take the soul withal, +Were to her beauty nothing. Its boon influence +From the fair nest of Leda rapt me forth, +And wafted on into the swiftest heav'n. + +What place for entrance Beatrice chose, +I may not say, so uniform was all, +Liveliest and loftiest. She my secret wish +Divin'd; and with such gladness, that God's love +Seem'd from her visage shining, thus began: +"Here is the goal, whence motion on his race +Starts; motionless the centre, and the rest +All mov'd around. Except the soul divine, +Place in this heav'n is none, the soul divine, +Wherein the love, which ruleth o'er its orb, +Is kindled, and the virtue that it sheds; +One circle, light and love, enclasping it, +As this doth clasp the others; and to Him, +Who draws the bound, its limit only known. +Measur'd itself by none, it doth divide +Motion to all, counted unto them forth, +As by the fifth or half ye count forth ten. +The vase, wherein time's roots are plung'd, thou seest, +Look elsewhere for the leaves. O mortal lust! +That canst not lift thy head above the waves +Which whelm and sink thee down! The will in man +Bears goodly blossoms; but its ruddy promise +Is, by the dripping of perpetual rain, +Made mere abortion: faith and innocence +Are met with but in babes, each taking leave +Ere cheeks with down are sprinkled; he, that fasts, +While yet a stammerer, with his tongue let loose +Gluts every food alike in every moon. +One yet a babbler, loves and listens to +His mother; but no sooner hath free use +Of speech, than he doth wish her in her grave. +So suddenly doth the fair child of him, +Whose welcome is the morn and eve his parting, +To negro blackness change her virgin white. + +"Thou, to abate thy wonder, note that none +Bears rule in earth, and its frail family +Are therefore wand'rers. Yet before the date, +When through the hundredth in his reck'ning drops +Pale January must be shor'd aside +From winter's calendar, these heav'nly spheres +Shall roar so loud, that fortune shall be fain +To turn the poop, where she hath now the prow; +So that the fleet run onward; and true fruit, +Expected long, shall crown at last the bloom!" + + + + +CANTO XXVII + +So she who doth imparadise my soul, +Had drawn the veil from off our pleasant life, +And bar'd the truth of poor mortality; +When lo! as one who, in a mirror, spies +The shining of a flambeau at his back, +Lit sudden ore he deem of its approach, +And turneth to resolve him, if the glass +Have told him true, and sees the record faithful +As note is to its metre; even thus, +I well remember, did befall to me, +Looking upon the beauteous eyes, whence love +Had made the leash to take me. As I turn'd; +And that, which, in their circles, none who spies, +Can miss of, in itself apparent, struck +On mine; a point I saw, that darted light +So sharp, no lid, unclosing, may bear up +Against its keenness. The least star we view +From hence, had seem'd a moon, set by its side, +As star by side of star. And so far off, +Perchance, as is the halo from the light +Which paints it, when most dense the vapour spreads, +There wheel'd about the point a circle of fire, +More rapid than the motion, which first girds +The world. Then, circle after circle, round +Enring'd each other; till the seventh reach'd +Circumference so ample, that its bow, +Within the span of Juno's messenger, +lied scarce been held entire. Beyond the sev'nth, +Follow'd yet other two. And every one, +As more in number distant from the first, +Was tardier in motion; and that glow'd +With flame most pure, that to the sparkle' of truth +Was nearest, as partaking most, methinks, +Of its reality. The guide belov'd +Saw me in anxious thought suspense, and spake: +"Heav'n, and all nature, hangs upon that point. +The circle thereto most conjoin'd observe; +And know, that by intenser love its course +Is to this swiftness wing'd." To whom I thus: +"It were enough; nor should I further seek, +Had I but witness'd order, in the world +Appointed, such as in these wheels is seen. +But in the sensible world such diff'rence is, +That is each round shows more divinity, +As each is wider from the centre. Hence, +If in this wondrous and angelic temple, +That hath for confine only light and love, +My wish may have completion I must know, +Wherefore such disagreement is between +Th' exemplar and its copy: for myself, +Contemplating, I fail to pierce the cause." + +"It is no marvel, if thy fingers foil'd +Do leave the knot untied: so hard 't is grown +For want of tenting." Thus she said: "But take," +She added, "if thou wish thy cure, my words, +And entertain them subtly. Every orb +Corporeal, doth proportion its extent +Unto the virtue through its parts diffus'd. +The greater blessedness preserves the more. +The greater is the body (if all parts +Share equally) the more is to preserve. +Therefore the circle, whose swift course enwheels +The universal frame answers to that, +Which is supreme in knowledge and in love +Thus by the virtue, not the seeming, breadth +Of substance, measure, thou shalt see the heav'ns, +Each to the' intelligence that ruleth it, +Greater to more, and smaller unto less, +Suited in strict and wondrous harmony." + +As when the sturdy north blows from his cheek +A blast, that scours the sky, forthwith our air, +Clear'd of the rack, that hung on it before, +Glitters; and, With his beauties all unveil'd, +The firmament looks forth serene, and smiles; +Such was my cheer, when Beatrice drove +With clear reply the shadows back, and truth +Was manifested, as a star in heaven. +And when the words were ended, not unlike +To iron in the furnace, every cirque +Ebullient shot forth scintillating fires: +And every sparkle shivering to new blaze, +In number did outmillion the account +Reduplicate upon the chequer'd board. +Then heard I echoing on from choir to choir, +"Hosanna," to the fixed point, that holds, +And shall for ever hold them to their place, +From everlasting, irremovable. + +Musing awhile I stood: and she, who saw +by inward meditations, thus began: +"In the first circles, they, whom thou beheldst, +Are seraphim and cherubim. Thus swift +Follow their hoops, in likeness to the point, +Near as they can, approaching; and they can +The more, the loftier their vision. Those, +That round them fleet, gazing the Godhead next, +Are thrones; in whom the first trine ends. And all +Are blessed, even as their sight descends +Deeper into the truth, wherein rest is +For every mind. Thus happiness hath root +In seeing, not in loving, which of sight +Is aftergrowth. And of the seeing such +The meed, as unto each in due degree +Grace and good-will their measure have assign'd. +The other trine, that with still opening buds +In this eternal springtide blossom fair, +Fearless of bruising from the nightly ram, +Breathe up in warbled melodies threefold +Hosannas blending ever, from the three +Transmitted. hierarchy of gods, for aye +Rejoicing, dominations first, next then +Virtues, and powers the third. The next to whom +Are princedoms and archangels, with glad round +To tread their festal ring; and last the band +Angelical, disporting in their sphere. +All, as they circle in their orders, look +Aloft, and downward with such sway prevail, +That all with mutual impulse tend to God. +These once a mortal view beheld. Desire +In Dionysius so intently wrought, +That he, as I have done rang'd them; and nam'd +Their orders, marshal'd in his thought. From him +Dissentient, one refus'd his sacred read. +But soon as in this heav'n his doubting eyes +Were open'd, Gregory at his error smil'd +Nor marvel, that a denizen of earth +Should scan such secret truth; for he had learnt +Both this and much beside of these our orbs, +From an eye-witness to heav'n's mysteries." + + + + +CANTO XXIX + +No longer than what time Latona's twins +Cover'd of Libra and the fleecy star, +Together both, girding the' horizon hang, +In even balance from the zenith pois'd, +Till from that verge, each, changing hemisphere, +Part the nice level; e'en so brief a space +Did Beatrice's silence hold. A smile +Bat painted on her cheek; and her fix'd gaze +Bent on the point, at which my vision fail'd: +When thus her words resuming she began: +"I speak, nor what thou wouldst inquire demand; +For I have mark'd it, where all time and place +Are present. Not for increase to himself +Of good, which may not be increas'd, but forth +To manifest his glory by its beams, +Inhabiting his own eternity, +Beyond time's limit or what bound soe'er +To circumscribe his being, as he will'd, +Into new natures, like unto himself, +Eternal Love unfolded. Nor before, +As if in dull inaction torpid lay. +For not in process of before or aft +Upon these waters mov'd the Spirit of God. +Simple and mix'd, both form and substance, forth +To perfect being started, like three darts +Shot from a bow three-corded. And as ray +In crystal, glass, and amber, shines entire, +E'en at the moment of its issuing; thus +Did, from th' eternal Sovran, beam entire +His threefold operation, at one act +Produc'd coeval. Yet in order each +Created his due station knew: those highest, +Who pure intelligence were made: mere power +The lowest: in the midst, bound with strict league, +Intelligence and power, unsever'd bond. +Long tract of ages by the angels past, +Ere the creating of another world, +Describ'd on Jerome's pages thou hast seen. +But that what I disclose to thee is true, +Those penmen, whom the Holy Spirit mov'd +In many a passage of their sacred book +Attest; as thou by diligent search shalt find +And reason in some sort discerns the same, +Who scarce would grant the heav'nly ministers +Of their perfection void, so long a space. +Thus when and where these spirits of love were made, +Thou know'st, and how: and knowing hast allay'd +Thy thirst, which from the triple question rose. +Ere one had reckon'd twenty, e'en so soon +Part of the angels fell: and in their fall +Confusion to your elements ensued. +The others kept their station: and this task, +Whereon thou lookst, began with such delight, +That they surcease not ever, day nor night, +Their circling. Of that fatal lapse the cause +Was the curst pride of him, whom thou hast seen +Pent with the world's incumbrance. Those, whom here +Thou seest, were lowly to confess themselves +Of his free bounty, who had made them apt +For ministries so high: therefore their views +Were by enlight'ning grace and their own merit +Exalted; so that in their will confirm'd +They stand, nor feel to fall. For do not doubt, +But to receive the grace, which heav'n vouchsafes, +Is meritorious, even as the soul +With prompt affection welcometh the guest. +Now, without further help, if with good heed +My words thy mind have treasur'd, thou henceforth +This consistory round about mayst scan, +And gaze thy fill. But since thou hast on earth +Heard vain disputers, reasoners in the schools, +Canvas the' angelic nature, and dispute +Its powers of apprehension, memory, choice; +Therefore, 't is well thou take from me the truth, +Pure and without disguise, which they below, +Equivocating, darken and perplex. + +"Know thou, that, from the first, these substances, +Rejoicing in the countenance of God, +Have held unceasingly their view, intent +Upon the glorious vision, from the which +Naught absent is nor hid: where then no change +Of newness with succession interrupts, +Remembrance there needs none to gather up +Divided thought and images remote + +"So that men, thus at variance with the truth +Dream, though their eyes be open; reckless some +Of error; others well aware they err, +To whom more guilt and shame are justly due. +Each the known track of sage philosophy +Deserts, and has a byway of his own: +So much the restless eagerness to shine +And love of singularity prevail. +Yet this, offensive as it is, provokes +Heav'n's anger less, than when the book of God +Is forc'd to yield to man's authority, +Or from its straightness warp'd: no reck'ning made +What blood the sowing of it in the world +Has cost; what favour for himself he wins, +Who meekly clings to it. The aim of all +Is how to shine: e'en they, whose office is +To preach the Gospel, let the gospel sleep, +And pass their own inventions off instead. +One tells, how at Christ's suffering the wan moon +Bent back her steps, and shadow'd o'er the sun +With intervenient disk, as she withdrew: +Another, how the light shrouded itself +Within its tabernacle, and left dark +The Spaniard and the Indian, with the Jew. +Such fables Florence in her pulpit hears, +Bandied about more frequent, than the names +Of Bindi and of Lapi in her streets. +The sheep, meanwhile, poor witless ones, return +From pasture, fed with wind: and what avails +For their excuse, they do not see their harm? +Christ said not to his first conventicle, +'Go forth and preach impostures to the world,' +But gave them truth to build on; and the sound +Was mighty on their lips; nor needed they, +Beside the gospel, other spear or shield, +To aid them in their warfare for the faith. +The preacher now provides himself with store +Of jests and gibes; and, so there be no lack +Of laughter, while he vents them, his big cowl +Distends, and he has won the meed he sought: +Could but the vulgar catch a glimpse the while +Of that dark bird which nestles in his hood, +They scarce would wait to hear the blessing said. +Which now the dotards hold in such esteem, +That every counterfeit, who spreads abroad +The hands of holy promise, finds a throng +Of credulous fools beneath. Saint Anthony +Fattens with this his swine, and others worse +Than swine, who diet at his lazy board, +Paying with unstamp'd metal for their fare. + +"But (for we far have wander'd) let us seek +The forward path again; so as the way +Be shorten'd with the time. No mortal tongue +Nor thought of man hath ever reach'd so far, +That of these natures he might count the tribes. +What Daniel of their thousands hath reveal'd +With finite number infinite conceals. +The fountain at whose source these drink their beams, +With light supplies them in as many modes, +As there are splendours, that it shines on: each +According to the virtue it conceives, +Differing in love and sweet affection. +Look then how lofty and how huge in breadth +The' eternal might, which, broken and dispers'd +Over such countless mirrors, yet remains +Whole in itself and one, as at the first." + + + + +CANTO XXX + +Noon's fervid hour perchance six thousand miles +From hence is distant; and the shadowy cone +Almost to level on our earth declines; +When from the midmost of this blue abyss +By turns some star is to our vision lost. +And straightway as the handmaid of the sun +Puts forth her radiant brow, all, light by light, +Fade, and the spangled firmament shuts in, +E'en to the loveliest of the glittering throng. +Thus vanish'd gradually from my sight +The triumph, which plays ever round the point, +That overcame me, seeming (for it did) +Engirt by that it girdeth. Wherefore love, +With loss of other object, forc'd me bend +Mine eyes on Beatrice once again. + +If all, that hitherto is told of her, +Were in one praise concluded, 't were too weak +To furnish out this turn. Mine eyes did look +On beauty, such, as I believe in sooth, +Not merely to exceed our human, but, +That save its Maker, none can to the full +Enjoy it. At this point o'erpower'd I fail, +Unequal to my theme, as never bard +Of buskin or of sock hath fail'd before. +For, as the sun doth to the feeblest sight, +E'en so remembrance of that witching smile +Hath dispossess my spirit of itself. +Not from that day, when on this earth I first +Beheld her charms, up to that view of them, +Have I with song applausive ever ceas'd +To follow, but not follow them no more; +My course here bounded, as each artist's is, +When it doth touch the limit of his skill. + +She (such as I bequeath her to the bruit +Of louder trump than mine, which hasteneth on, +Urging its arduous matter to the close), +Her words resum'd, in gesture and in voice +Resembling one accustom'd to command: +"Forth from the last corporeal are we come +Into the heav'n, that is unbodied light, +Light intellectual replete with love, +Love of true happiness replete with joy, +Joy, that transcends all sweetness of delight. +Here shalt thou look on either mighty host +Of Paradise; and one in that array, +Which in the final judgment thou shalt see." + +As when the lightning, in a sudden spleen +Unfolded, dashes from the blinding eyes +The visive spirits dazzled and bedimm'd; +So, round about me, fulminating streams +Of living radiance play'd, and left me swath'd +And veil'd in dense impenetrable blaze. +Such weal is in the love, that stills this heav'n; +For its own flame the torch this fitting ever! + +No sooner to my list'ning ear had come +The brief assurance, than I understood +New virtue into me infus'd, and sight +Kindled afresh, with vigour to sustain +Excess of light, however pure. I look'd; +And in the likeness of a river saw +Light flowing, from whose amber-seeming waves +Flash'd up effulgence, as they glided on +'Twixt banks, on either side, painted with spring, +Incredible how fair; and, from the tide, +There ever and anon, outstarting, flew +Sparkles instinct with life; and in the flow'rs +Did set them, like to rubies chas'd in gold; +Then, as if drunk with odors, plung'd again +Into the wondrous flood; from which, as one +Re'enter'd, still another rose. "The thirst +Of knowledge high, whereby thou art inflam'd, +To search the meaning of what here thou seest, +The more it warms thee, pleases me the more. +But first behooves thee of this water drink, +Or ere that longing be allay'd." So spake +The day-star of mine eyes; then thus subjoin'd: +"This stream, and these, forth issuing from its gulf, +And diving back, a living topaz each, +With all this laughter on its bloomy shores, +Are but a preface, shadowy of the truth +They emblem: not that, in themselves, the things +Are crude; but on thy part is the defect, +For that thy views not yet aspire so high." +Never did babe, that had outslept his wont, +Rush, with such eager straining, to the milk, +As I toward the water, bending me, +To make the better mirrors of mine eyes +In the refining wave; and, as the eaves +Of mine eyelids did drink of it, forthwith +Seem'd it unto me turn'd from length to round, +Then as a troop of maskers, when they put +Their vizors off, look other than before, +The counterfeited semblance thrown aside; +So into greater jubilee were chang'd +Those flowers and sparkles, and distinct I saw +Before me either court of heav'n displac'd. + +O prime enlightener! thou who crav'st me strength +On the high triumph of thy realm to gaze! +Grant virtue now to utter what I kenn'd, + There is in heav'n a light, whose goodly shine +Makes the Creator visible to all +Created, that in seeing him alone +Have peace; and in a circle spreads so far, +That the circumference were too loose a zone +To girdle in the sun. All is one beam, +Reflected from the summit of the first, +That moves, which being hence and vigour takes, +And as some cliff, that from the bottom eyes +Its image mirror'd in the crystal flood, +As if 't admire its brave appareling +Of verdure and of flowers: so, round about, +Eyeing the light, on more than million thrones, +Stood, eminent, whatever from our earth +Has to the skies return'd. How wide the leaves +Extended to their utmost of this rose, +Whose lowest step embosoms such a space +Of ample radiance! Yet, nor amplitude +Nor height impeded, but my view with ease +Took in the full dimensions of that joy. +Near or remote, what there avails, where God +Immediate rules, and Nature, awed, suspends +Her sway? Into the yellow of the rose +Perennial, which in bright expansiveness, +Lays forth its gradual blooming, redolent +Of praises to the never-wint'ring sun, +As one, who fain would speak yet holds his peace, +Beatrice led me; and, "Behold," she said, +"This fair assemblage! stoles of snowy white +How numberless! The city, where we dwell, +Behold how vast! and these our seats so throng'd +Few now are wanting here! In that proud stall, +On which, the crown, already o'er its state +Suspended, holds thine eyes--or ere thyself +Mayst at the wedding sup,--shall rest the soul +Of the great Harry, he who, by the world +Augustas hail'd, to Italy must come, +Before her day be ripe. But ye are sick, +And in your tetchy wantonness as blind, +As is the bantling, that of hunger dies, +And drives away the nurse. Nor may it be, +That he, who in the sacred forum sways, +Openly or in secret, shall with him +Accordant walk: Whom God will not endure +I' th' holy office long; but thrust him down +To Simon Magus, where Magna's priest +Will sink beneath him: such will be his meed." + + + + +CANTO XXXI + +In fashion, as a snow-white rose, lay then +Before my view the saintly multitude, +Which in his own blood Christ espous'd. Meanwhile +That other host, that soar aloft to gaze +And celebrate his glory, whom they love, +Hover'd around; and, like a troop of bees, +Amid the vernal sweets alighting now, +Now, clustering, where their fragrant labour glows, +Flew downward to the mighty flow'r, or rose +From the redundant petals, streaming back +Unto the steadfast dwelling of their joy. +Faces had they of flame, and wings of gold; +The rest was whiter than the driven snow. +And as they flitted down into the flower, +From range to range, fanning their plumy loins, +Whisper'd the peace and ardour, which they won +From that soft winnowing. Shadow none, the vast +Interposition of such numerous flight +Cast, from above, upon the flower, or view +Obstructed aught. For, through the universe, +Wherever merited, celestial light +Glides freely, and no obstacle prevents. + +All there, who reign in safety and in bliss, +Ages long past or new, on one sole mark +Their love and vision fix'd. O trinal beam +Of individual star, that charmst them thus, +Vouchsafe one glance to gild our storm below! + +If the grim brood, from Arctic shores that roam'd, +(Where helice, forever, as she wheels, +Sparkles a mother's fondness on her son) +Stood in mute wonder 'mid the works of Rome, +When to their view the Lateran arose +In greatness more than earthly; I, who then +From human to divine had past, from time +Unto eternity, and out of Florence +To justice and to truth, how might I choose +But marvel too? 'Twixt gladness and amaze, +In sooth no will had I to utter aught, +Or hear. And, as a pilgrim, when he rests +Within the temple of his vow, looks round +In breathless awe, and hopes some time to tell +Of all its goodly state: e'en so mine eyes +Cours'd up and down along the living light, +Now low, and now aloft, and now around, +Visiting every step. Looks I beheld, +Where charity in soft persuasion sat, +Smiles from within and radiance from above, +And in each gesture grace and honour high. + +So rov'd my ken, and its general form +All Paradise survey'd: when round I turn'd +With purpose of my lady to inquire +Once more of things, that held my thought suspense, +But answer found from other than I ween'd; +For, Beatrice, when I thought to see, +I saw instead a senior, at my side, + Rob'd, as the rest, in glory. Joy benign +Glow'd in his eye, and o'er his cheek diffus'd, +With gestures such as spake a father's love. +And, "Whither is she vanish'd?" straight I ask'd. + +"By Beatrice summon'd," he replied, +"I come to aid thy wish. Looking aloft +To the third circle from the highest, there +Behold her on the throne, wherein her merit +Hath plac'd her." Answering not, mine eyes I rais'd, +And saw her, where aloof she sat, her brow +A wreath reflecting of eternal beams. +Not from the centre of the sea so far +Unto the region of the highest thunder, +As was my ken from hers; and yet the form +Came through that medium down, unmix'd and pure, + +"O Lady! thou in whom my hopes have rest! +Who, for my safety, hast not scorn'd, in hell +To leave the traces of thy footsteps mark'd! +For all mine eyes have seen, I, to thy power +And goodness, virtue owe and grace. Of slave, +Thou hast to freedom brought me; and no means, +For my deliverance apt, hast left untried. +Thy liberal bounty still toward me keep. +That, when my spirit, which thou madest whole, +Is loosen'd from this body, it may find +Favour with thee." So I my suit preferr'd: +And she, so distant, as appear'd, look'd down, +And smil'd; then tow'rds th' eternal fountain turn'd. + +And thus the senior, holy and rever'd: +"That thou at length mayst happily conclude +Thy voyage (to which end I was dispatch'd, +By supplication mov'd and holy love) +Let thy upsoaring vision range, at large, +This garden through: for so, by ray divine +Kindled, thy ken a higher flight shall mount; +And from heav'n's queen, whom fervent I adore, +All gracious aid befriend us; for that I +Am her own faithful Bernard." Like a wight, +Who haply from Croatia wends to see +Our Veronica, and the while 't is shown, +Hangs over it with never-sated gaze, +And, all that he hath heard revolving, saith +Unto himself in thought: "And didst thou look +E'en thus, O Jesus, my true Lord and God? +And was this semblance thine?" So gaz'd I then +Adoring; for the charity of him, +Who musing, in the world that peace enjoy'd, +Stood lively before me. "Child of grace!" +Thus he began: "thou shalt not knowledge gain +Of this glad being, if thine eyes are held +Still in this depth below. But search around +The circles, to the furthest, till thou spy +Seated in state, the queen, that of this realm +Is sovran." Straight mine eyes I rais'd; and bright, +As, at the birth of morn, the eastern clime +Above th' horizon, where the sun declines; +To mine eyes, that upward, as from vale +To mountain sped, at th' extreme bound, a part +Excell'd in lustre all the front oppos'd. +And as the glow burns ruddiest o'er the wave, +That waits the sloping beam, which Phaeton +Ill knew to guide, and on each part the light +Diminish'd fades, intensest in the midst; +So burn'd the peaceful oriflame, and slack'd +On every side the living flame decay'd. +And in that midst their sportive pennons wav'd +Thousands of angels; in resplendence each +Distinct, and quaint adornment. At their glee +And carol, smil'd the Lovely One of heav'n, +That joy was in the eyes of all the blest. + +Had I a tongue in eloquence as rich, +As is the colouring in fancy's loom, +'T were all too poor to utter the least part +Of that enchantment. When he saw mine eyes +Intent on her, that charm'd him, Bernard gaz'd +With so exceeding fondness, as infus'd +Ardour into my breast, unfelt before. + + + + +CANTO XXXII + +Freely the sage, though wrapt in musings high, +Assum'd the teacher's part, and mild began: +"The wound, that Mary clos'd, she open'd first, +Who sits so beautiful at Mary's feet. +The third in order, underneath her, lo! +Rachel with Beatrice. Sarah next, +Judith, Rebecca, and the gleaner maid, +Meek ancestress of him, who sang the songs +Of sore repentance in his sorrowful mood. +All, as I name them, down from deaf to leaf, +Are in gradation throned on the rose. +And from the seventh step, successively, +Adown the breathing tresses of the flow'r +Still doth the file of Hebrew dames proceed. +For these are a partition wall, whereby +The sacred stairs are sever'd, as the faith +In Christ divides them. On this part, where blooms +Each leaf in full maturity, are set +Such as in Christ, or ere he came, believ'd. +On th' other, where an intersected space +Yet shows the semicircle void, abide +All they, who look'd to Christ already come. +And as our Lady on her glorious stool, +And they who on their stools beneath her sit, +This way distinction make: e'en so on his, +The mighty Baptist that way marks the line +(He who endur'd the desert and the pains +Of martyrdom, and for two years of hell, +Yet still continued holy), and beneath, +Augustin, Francis, Benedict, and the rest, +Thus far from round to round. So heav'n's decree +Forecasts, this garden equally to fill. +With faith in either view, past or to come, +Learn too, that downward from the step, which cleaves +Midway the twain compartments, none there are +Who place obtain for merit of their own, +But have through others' merit been advanc'd, +On set conditions: spirits all releas'd, +Ere for themselves they had the power to choose. +And, if thou mark and listen to them well, +Their childish looks and voice declare as much. + +"Here, silent as thou art, I know thy doubt; +And gladly will I loose the knot, wherein +Thy subtle thoughts have bound thee. From this realm +Excluded, chalice no entrance here may find, +No more shall hunger, thirst, or sorrow can. +A law immutable hath establish'd all; +Nor is there aught thou seest, that doth not fit, +Exactly, as the finger to the ring. +It is not therefore without cause, that these, +O'erspeedy comers to immortal life, +Are different in their shares of excellence. +Our Sovran Lord--that settleth this estate +In love and in delight so absolute, +That wish can dare no further--every soul, +Created in his joyous sight to dwell, +With grace at pleasure variously endows. +And for a proof th' effect may well suffice. +And 't is moreover most expressly mark'd +In holy scripture, where the twins are said +To, have struggled in the womb. Therefore, as grace +Inweaves the coronet, so every brow +Weareth its proper hue of orient light. +And merely in respect to his prime gift, +Not in reward of meritorious deed, +Hath each his several degree assign'd. +In early times with their own innocence +More was not wanting, than the parents' faith, +To save them: those first ages past, behoov'd +That circumcision in the males should imp +The flight of innocent wings: but since the day +Of grace hath come, without baptismal rites +In Christ accomplish'd, innocence herself +Must linger yet below. Now raise thy view +Unto the visage most resembling Christ: +For, in her splendour only, shalt thou win +The pow'r to look on him." Forthwith I saw +Such floods of gladness on her visage shower'd, +From holy spirits, winging that profound; +That, whatsoever I had yet beheld, +Had not so much suspended me with wonder, +Or shown me such similitude of God. +And he, who had to her descended, once, +On earth, now hail'd in heav'n; and on pois'd wing. +"Ave, Maria, Gratia Plena," sang: +To whose sweet anthem all the blissful court, +From all parts answ'ring, rang: that holier joy +Brooded the deep serene. "Father rever'd: +Who deign'st, for me, to quit the pleasant place, +Wherein thou sittest, by eternal lot! +Say, who that angel is, that with such glee +Beholds our queen, and so enamour'd glows +Of her high beauty, that all fire he seems." +So I again resorted to the lore +Of my wise teacher, he, whom Mary's charms +Embellish'd, as the sun the morning star; +Who thus in answer spake: "In him are summ'd, +Whatever of buxomness and free delight +May be in Spirit, or in angel, met: +And so beseems: for that he bare the palm +Down unto Mary, when the Son of God +Vouchsaf'd to clothe him in terrestrial weeds. +Now let thine eyes wait heedful on my words, +And note thou of this just and pious realm +The chiefest nobles. Those, highest in bliss, +The twain, on each hand next our empress thron'd, +Are as it were two roots unto this rose. +He to the left, the parent, whose rash taste +Proves bitter to his seed; and, on the right, +That ancient father of the holy church, +Into whose keeping Christ did give the keys +Of this sweet flow'r: near whom behold the seer, +That, ere he died, saw all the grievous times +Of the fair bride, who with the lance and nails +Was won. And, near unto the other, rests +The leader, under whom on manna fed +Th' ungrateful nation, fickle and perverse. +On th' other part, facing to Peter, lo! +Where Anna sits, so well content to look +On her lov'd daughter, that with moveless eye +She chants the loud hosanna: while, oppos'd +To the first father of your mortal kind, +Is Lucia, at whose hest thy lady sped, +When on the edge of ruin clos'd thine eye. + +"But (for the vision hasteneth so an end) +Here break we off, as the good workman doth, +That shapes the cloak according to the cloth: +And to the primal love our ken shall rise; +That thou mayst penetrate the brightness, far +As sight can bear thee. Yet, alas! in sooth +Beating thy pennons, thinking to advance, +Thou backward fall'st. Grace then must first be gain'd; +Her grace, whose might can help thee. Thou in prayer +Seek her: and, with affection, whilst I sue, +Attend, and yield me all thy heart." He said, +And thus the saintly orison began. + + + + +CANTO XXXIII + +"O virgin mother, daughter of thy Son, +Created beings all in lowliness +Surpassing, as in height, above them all, +Term by th' eternal counsel pre-ordain'd, +Ennobler of thy nature, so advanc'd +In thee, that its great Maker did not scorn, +Himself, in his own work enclos'd to dwell! +For in thy womb rekindling shone the love +Reveal'd, whose genial influence makes now +This flower to germin in eternal peace! +Here thou to us, of charity and love, +Art, as the noon-day torch: and art, beneath, +To mortal men, of hope a living spring. +So mighty art thou, lady! and so great, +That he who grace desireth, and comes not +To thee for aidance, fain would have desire +Fly without wings. Nor only him who asks, +Thy bounty succours, but doth freely oft +Forerun the asking. Whatsoe'er may be +Of excellence in creature, pity mild, +Relenting mercy, large munificence, +Are all combin'd in thee. Here kneeleth one, +Who of all spirits hath review'd the state, +From the world's lowest gap unto this height. +Suppliant to thee he kneels, imploring grace +For virtue, yet more high to lift his ken +Toward the bliss supreme. And I, who ne'er +Coveted sight, more fondly, for myself, +Than now for him, my prayers to thee prefer, +(And pray they be not scant) that thou wouldst drive +Each cloud of his mortality away; +That on the sovran pleasure he may gaze. +This also I entreat of thee, O queen! +Who canst do what thou wilt! that in him thou +Wouldst after all he hath beheld, preserve +Affection sound, and human passions quell. +Lo! Where, with Beatrice, many a saint +Stretch their clasp'd hands, in furtherance of my suit!" + +The eyes, that heav'n with love and awe regards, +Fix'd on the suitor, witness'd, how benign +She looks on pious pray'rs: then fasten'd they +On th' everlasting light, wherein no eye +Of creature, as may well be thought, so far +Can travel inward. I, meanwhile, who drew +Near to the limit, where all wishes end, +The ardour of my wish (for so behooved), +Ended within me. Beck'ning smil'd the sage, +That I should look aloft: but, ere he bade, +Already of myself aloft I look'd; +For visual strength, refining more and more, +Bare me into the ray authentical +Of sovran light. Thenceforward, what I saw, +Was not for words to speak, nor memory's self +To stand against such outrage on her skill. +As one, who from a dream awaken'd, straight, +All he hath seen forgets; yet still retains +Impression of the feeling in his dream; +E'en such am I: for all the vision dies, +As 't were, away; and yet the sense of sweet, +That sprang from it, still trickles in my heart. +Thus in the sun-thaw is the snow unseal'd; +Thus in the winds on flitting leaves was lost +The Sybil's sentence. O eternal beam! +(Whose height what reach of mortal thought may soar?) +Yield me again some little particle +Of what thou then appearedst, give my tongue +Power, but to leave one sparkle of thy glory, +Unto the race to come, that shall not lose +Thy triumph wholly, if thou waken aught +Of memory in me, and endure to hear +The record sound in this unequal strain. + +Such keenness from the living ray I met, +That, if mine eyes had turn'd away, methinks, +I had been lost; but, so embolden'd, on +I pass'd, as I remember, till my view +Hover'd the brink of dread infinitude. + +O grace! unenvying of thy boon! that gav'st +Boldness to fix so earnestly my ken +On th' everlasting splendour, that I look'd, +While sight was unconsum'd, and, in that depth, +Saw in one volume clasp'd of love, whatever +The universe unfolds; all properties +Of substance and of accident, beheld, +Compounded, yet one individual light +The whole. And of such bond methinks I saw +The universal form: for that whenever +I do but speak of it, my soul dilates +Beyond her proper self; and, till I speak, +One moment seems a longer lethargy, +Than five-and-twenty ages had appear'd +To that emprize, that first made Neptune wonder +At Argo's shadow darkening on his flood. + +With fixed heed, suspense and motionless, +Wond'ring I gaz'd; and admiration still +Was kindled, as I gaz'd. It may not be, +That one, who looks upon that light, can turn +To other object, willingly, his view. +For all the good, that will may covet, there +Is summ'd; and all, elsewhere defective found, +Complete. My tongue shall utter now, no more +E'en what remembrance keeps, than could the babe's +That yet is moisten'd at his mother's breast. +Not that the semblance of the living light +Was chang'd (that ever as at first remain'd) +But that my vision quickening, in that sole +Appearance, still new miracles descry'd, +And toil'd me with the change. In that abyss +Of radiance, clear and lofty, seem'd methought, +Three orbs of triple hue clipt in one bound: +And, from another, one reflected seem'd, +As rainbow is from rainbow: and the third +Seem'd fire, breath'd equally from both. Oh speech +How feeble and how faint art thou, to give +Conception birth! Yet this to what I saw +Is less than little. Oh eternal light! +Sole in thyself that dwellst; and of thyself +Sole understood, past, present, or to come! +Thou smiledst; on that circling, which in thee +Seem'd as reflected splendour, while I mus'd; +For I therein, methought, in its own hue +Beheld our image painted: steadfastly +I therefore por'd upon the view. As one +Who vers'd in geometric lore, would fain +Measure the circle; and, though pondering long +And deeply, that beginning, which he needs, +Finds not; e'en such was I, intent to scan +The novel wonder, and trace out the form, +How to the circle fitted, and therein +How plac'd: but the flight was not for my wing; +Had not a flash darted athwart my mind, +And in the spleen unfolded what it sought. + +Here vigour fail'd the tow'ring fantasy: +But yet the will roll'd onward, like a wheel +In even motion, by the Love impell'd, +That moves the sun in heav'n and all the stars. + + + + + +THE VISION + +OF + +PURGATORY + +BY DANTE ALIGHIERI + + +Complete + + + +TRANSLATED BY + +THE REV. H. F. CARY + + + +PURGATORY + +Cantos 1 - 33 + + + +CANTO I + +O'er better waves to speed her rapid course +The light bark of my genius lifts the sail, +Well pleas'd to leave so cruel sea behind; +And of that second region will I sing, +In which the human spirit from sinful blot +Is purg'd, and for ascent to Heaven prepares. + +Here, O ye hallow'd Nine! for in your train +I follow, here the deadened strain revive; +Nor let Calliope refuse to sound +A somewhat higher song, of that loud tone, +Which when the wretched birds of chattering note +Had heard, they of forgiveness lost all hope. + +Sweet hue of eastern sapphire, that was spread +O'er the serene aspect of the pure air, +High up as the first circle, to mine eyes +Unwonted joy renew'd, soon as I 'scap'd +Forth from the atmosphere of deadly gloom, +That had mine eyes and bosom fill'd with grief. +The radiant planet, that to love invites, +Made all the orient laugh, and veil'd beneath +The Pisces' light, that in his escort came. + +To the right hand I turn'd, and fix'd my mind +On the' other pole attentive, where I saw +Four stars ne'er seen before save by the ken +Of our first parents. Heaven of their rays +Seem'd joyous. O thou northern site, bereft +Indeed, and widow'd, since of these depriv'd! + +As from this view I had desisted, straight +Turning a little tow'rds the other pole, +There from whence now the wain had disappear'd, +I saw an old man standing by my side +Alone, so worthy of rev'rence in his look, +That ne'er from son to father more was ow'd. +Low down his beard and mix'd with hoary white +Descended, like his locks, which parting fell +Upon his breast in double fold. The beams +Of those four luminaries on his face +So brightly shone, and with such radiance clear +Deck'd it, that I beheld him as the sun. + +"Say who are ye, that stemming the blind stream, +Forth from th' eternal prison-house have fled?" +He spoke and moved those venerable plumes. +"Who hath conducted, or with lantern sure +Lights you emerging from the depth of night, +That makes the infernal valley ever black? +Are the firm statutes of the dread abyss +Broken, or in high heaven new laws ordain'd, +That thus, condemn'd, ye to my caves approach?" + +My guide, then laying hold on me, by words +And intimations given with hand and head, +Made my bent knees and eye submissive pay +Due reverence; then thus to him replied. + +"Not of myself I come; a Dame from heaven +Descending, had besought me in my charge +To bring. But since thy will implies, that more +Our true condition I unfold at large, +Mine is not to deny thee thy request. +This mortal ne'er hath seen the farthest gloom. +But erring by his folly had approach'd +So near, that little space was left to turn. +Then, as before I told, I was dispatch'd +To work his rescue, and no way remain'd +Save this which I have ta'en. I have display'd +Before him all the regions of the bad; +And purpose now those spirits to display, +That under thy command are purg'd from sin. +How I have brought him would be long to say. +From high descends the virtue, by whose aid +I to thy sight and hearing him have led. +Now may our coming please thee. In the search +Of liberty he journeys: that how dear +They know, who for her sake have life refus'd. +Thou knowest, to whom death for her was sweet +In Utica, where thou didst leave those weeds, +That in the last great day will shine so bright. +For us the' eternal edicts are unmov'd: +He breathes, and I am free of Minos' power, +Abiding in that circle where the eyes +Of thy chaste Marcia beam, who still in look +Prays thee, O hallow'd spirit! to own her shine. +Then by her love we' implore thee, let us pass +Through thy sev'n regions; for which best thanks +I for thy favour will to her return, +If mention there below thou not disdain." + +"Marcia so pleasing in my sight was found," +He then to him rejoin'd, "while I was there, +That all she ask'd me I was fain to grant. +Now that beyond the' accursed stream she dwells, +She may no longer move me, by that law, +Which was ordain'd me, when I issued thence. +Not so, if Dame from heaven, as thou sayst, +Moves and directs thee; then no flattery needs. +Enough for me that in her name thou ask. +Go therefore now: and with a slender reed +See that thou duly gird him, and his face +Lave, till all sordid stain thou wipe from thence. +For not with eye, by any cloud obscur'd, +Would it be seemly before him to come, +Who stands the foremost minister in heaven. +This islet all around, there far beneath, +Where the wave beats it, on the oozy bed +Produces store of reeds. No other plant, +Cover'd with leaves, or harden'd in its stalk, +There lives, not bending to the water's sway. +After, this way return not; but the sun +Will show you, that now rises, where to take +The mountain in its easiest ascent." + +He disappear'd; and I myself uprais'd +Speechless, and to my guide retiring close, +Toward him turn'd mine eyes. He thus began; +"My son! observant thou my steps pursue. +We must retreat to rearward, for that way +The champain to its low extreme declines." + +The dawn had chas'd the matin hour of prime, +Which deaf before it, so that from afar +I spy'd the trembling of the ocean stream. + +We travers'd the deserted plain, as one +Who, wander'd from his track, thinks every step +Trodden in vain till he regain the path. + +When we had come, where yet the tender dew +Strove with the sun, and in a place, where fresh +The wind breath'd o'er it, while it slowly dried; +Both hands extended on the watery grass +My master plac'd, in graceful act and kind. +Whence I of his intent before appriz'd, +Stretch'd out to him my cheeks suffus'd with tears. +There to my visage he anew restor'd +That hue, which the dun shades of hell conceal'd. + +Then on the solitary shore arriv'd, +That never sailing on its waters saw +Man, that could after measure back his course, +He girt me in such manner as had pleas'd +Him who instructed, and O, strange to tell! +As he selected every humble plant, +Wherever one was pluck'd, another there +Resembling, straightway in its place arose. + + + + +CANTO II + +Now had the sun to that horizon reach'd, +That covers, with the most exalted point +Of its meridian circle, Salem's walls, +And night, that opposite to him her orb +Sounds, from the stream of Ganges issued forth, +Holding the scales, that from her hands are dropp'd +When she reigns highest: so that where I was, +Aurora's white and vermeil-tinctur'd cheek +To orange turn'd as she in age increas'd. + +Meanwhile we linger'd by the water's brink, +Like men, who, musing on their road, in thought +Journey, while motionless the body rests. +When lo! as near upon the hour of dawn, +Through the thick vapours Mars with fiery beam +Glares down in west, over the ocean floor; +So seem'd, what once again I hope to view, +A light so swiftly coming through the sea, +No winged course might equal its career. +From which when for a space I had withdrawn +Thine eyes, to make inquiry of my guide, +Again I look'd and saw it grown in size +And brightness: thou on either side appear'd +Something, but what I knew not of bright hue, +And by degrees from underneath it came +Another. My preceptor silent yet +Stood, while the brightness, that we first discern'd, +Open'd the form of wings: then when he knew +The pilot, cried aloud, "Down, down; bend low +Thy knees; behold God's angel: fold thy hands: +Now shalt thou see true Ministers indeed. + +"Lo how all human means he sets at naught! +So that nor oar he needs, nor other sail +Except his wings, between such distant shores. +Lo how straight up to heaven he holds them rear'd, +Winnowing the air with those eternal plumes, +That not like mortal hairs fall off or change!" + +As more and more toward us came, more bright +Appear'd the bird of God, nor could the eye +Endure his splendor near: I mine bent down. +He drove ashore in a small bark so swift +And light, that in its course no wave it drank. +The heav'nly steersman at the prow was seen, +Visibly written blessed in his looks. + +Within a hundred spirits and more there sat. +"In Exitu Israel de Aegypto;" +All with one voice together sang, with what +In the remainder of that hymn is writ. +Then soon as with the sign of holy cross +He bless'd them, they at once leap'd out on land, +The swiftly as he came return'd. The crew, +There left, appear'd astounded with the place, +Gazing around as one who sees new sights. + +From every side the sun darted his beams, +And with his arrowy radiance from mid heav'n +Had chas'd the Capricorn, when that strange tribe +Lifting their eyes towards us: "If ye know, +Declare what path will Lead us to the mount." + +Them Virgil answer'd. "Ye suppose perchance +Us well acquainted with this place: but here, +We, as yourselves, are strangers. Not long erst +We came, before you but a little space, +By other road so rough and hard, that now +The' ascent will seem to us as play." The spirits, +Who from my breathing had perceiv'd I liv'd, +Grew pale with wonder. As the multitude +Flock round a herald, sent with olive branch, +To hear what news he brings, and in their haste +Tread one another down, e'en so at sight +Of me those happy spirits were fix'd, each one +Forgetful of its errand, to depart, +Where cleans'd from sin, it might be made all fair. + +Then one I saw darting before the rest +With such fond ardour to embrace me, I +To do the like was mov'd. O shadows vain +Except in outward semblance! thrice my hands +I clasp'd behind it, they as oft return'd +Empty into my breast again. Surprise +I needs must think was painted in my looks, +For that the shadow smil'd and backward drew. +To follow it I hasten'd, but with voice +Of sweetness it enjoin'd me to desist. +Then who it was I knew, and pray'd of it, +To talk with me, it would a little pause. +It answered: "Thee as in my mortal frame +I lov'd, so loos'd forth it I love thee still, +And therefore pause; but why walkest thou here?" + +"Not without purpose once more to return, +Thou find'st me, my Casella, where I am +Journeying this way;" I said, "but how of thee +Hath so much time been lost?" He answer'd straight: +"No outrage hath been done to me, if he +Who when and whom he chooses takes, me oft +This passage hath denied, since of just will +His will he makes. These three months past indeed, +He, whose chose to enter, with free leave +Hath taken; whence I wand'ring by the shore +Where Tyber's wave grows salt, of him gain'd kind +Admittance, at that river's mouth, tow'rd which +His wings are pointed, for there always throng +All such as not to Archeron descend." + +Then I: "If new laws have not quite destroy'd +Memory and use of that sweet song of love, +That while all my cares had power to 'swage; +Please thee with it a little to console +My spirit, that incumber'd with its frame, +Travelling so far, of pain is overcome." + +"Love that discourses in my thoughts." He then +Began in such soft accents, that within +The sweetness thrills me yet. My gentle guide +And all who came with him, so well were pleas'd, +That seem'd naught else might in their thoughts have room. + +Fast fix'd in mute attention to his notes +We stood, when lo! that old man venerable +Exclaiming, "How is this, ye tardy spirits? +What negligence detains you loit'ring here? +Run to the mountain to cast off those scales, +That from your eyes the sight of God conceal." + +As a wild flock of pigeons, to their food +Collected, blade or tares, without their pride +Accustom'd, and in still and quiet sort, +If aught alarm them, suddenly desert +Their meal, assail'd by more important care; +So I that new-come troop beheld, the song +Deserting, hasten to the mountain's side, +As one who goes yet where he tends knows not. + +Nor with less hurried step did we depart. + + + + +CANTO III + +Them sudden flight had scatter'd over the plain, +Turn'd tow'rds the mountain, whither reason's voice +Drives us; I to my faithful company +Adhering, left it not. For how of him +Depriv'd, might I have sped, or who beside +Would o'er the mountainous tract have led my steps +He with the bitter pang of self-remorse +Seem'd smitten. O clear conscience and upright +How doth a little fling wound thee sore! + +Soon as his feet desisted (slack'ning pace), +From haste, that mars all decency of act, +My mind, that in itself before was wrapt, +Its thoughts expanded, as with joy restor'd: +And full against the steep ascent I set +My face, where highest to heav'n its top o'erflows. + +The sun, that flar'd behind, with ruddy beam +Before my form was broken; for in me +His rays resistance met. I turn'd aside +With fear of being left, when I beheld +Only before myself the ground obscur'd. +When thus my solace, turning him around, +Bespake me kindly: "Why distrustest thou? +Believ'st not I am with thee, thy sure guide? +It now is evening there, where buried lies +The body, in which I cast a shade, remov'd +To Naples from Brundusium's wall. Nor thou +Marvel, if before me no shadow fall, +More than that in the sky element +One ray obstructs not other. To endure +Torments of heat and cold extreme, like frames +That virtue hath dispos'd, which how it works +Wills not to us should be reveal'd. Insane +Who hopes, our reason may that space explore, +Which holds three persons in one substance knit. +Seek not the wherefore, race of human kind; +Could ye have seen the whole, no need had been +For Mary to bring forth. Moreover ye +Have seen such men desiring fruitlessly; +To whose desires repose would have been giv'n, +That now but serve them for eternal grief. +I speak of Plato, and the Stagyrite, +And others many more." And then he bent +Downwards his forehead, and in troubled mood +Broke off his speech. Meanwhile we had arriv'd +Far as the mountain's foot, and there the rock +Found of so steep ascent, that nimblest steps +To climb it had been vain. The most remote +Most wild untrodden path, in all the tract +'Twixt Lerice and Turbia were to this +A ladder easy' and open of access. + +"Who knows on which hand now the steep declines?" +My master said and paus'd, "so that he may +Ascend, who journeys without aid of wine?" +And while with looks directed to the ground +The meaning of the pathway he explor'd, +And I gaz'd upward round the stony height, +Of spirits, that toward us mov'd their steps, +Yet moving seem'd not, they so slow approach'd. + +I thus my guide address'd: "Upraise thine eyes, +Lo that way some, of whom thou may'st obtain +Counsel, if of thyself thou find'st it not!" + +Straightway he look'd, and with free speech replied: +"Let us tend thither: they but softly come. +And thou be firm in hope, my son belov'd." + +Now was that people distant far in space +A thousand paces behind ours, as much +As at a throw the nervous arm could fling, +When all drew backward on the messy crags +Of the steep bank, and firmly stood unmov'd +As one who walks in doubt might stand to look. + +"O spirits perfect! O already chosen!" +Virgil to them began, "by that blest peace, +Which, as I deem, is for you all prepar'd, +Instruct us where the mountain low declines, +So that attempt to mount it be not vain. +For who knows most, him loss of time most grieves." + +As sheep, that step from forth their fold, by one, +Or pairs, or three at once; meanwhile the rest +Stand fearfully, bending the eye and nose +To ground, and what the foremost does, that do +The others, gath'ring round her, if she stops, +Simple and quiet, nor the cause discern; +So saw I moving to advance the first, +Who of that fortunate crew were at the head, +Of modest mien and graceful in their gait. +When they before me had beheld the light +From my right side fall broken on the ground, +So that the shadow reach'd the cave, they stopp'd +And somewhat back retir'd: the same did all, +Who follow'd, though unweeting of the cause. + +"Unask'd of you, yet freely I confess, +This is a human body which ye see. +That the sun's light is broken on the ground, +Marvel not: but believe, that not without +Virtue deriv'd from Heaven, we to climb +Over this wall aspire." So them bespake +My master; and that virtuous tribe rejoin'd; +"Turn, and before you there the entrance lies," +Making a signal to us with bent hands. + +Then of them one began. "Whoe'er thou art, +Who journey'st thus this way, thy visage turn, +Think if me elsewhere thou hast ever seen." + +I tow'rds him turn'd, and with fix'd eye beheld. +Comely, and fair, and gentle of aspect, +He seem'd, but on one brow a gash was mark'd. + +When humbly I disclaim'd to have beheld +Him ever: "Now behold!" he said, and show'd +High on his breast a wound: then smiling spake. + +"I am Manfredi, grandson to the Queen +Costanza: whence I pray thee, when return'd, +To my fair daughter go, the parent glad +Of Aragonia and Sicilia's pride; +And of the truth inform her, if of me +Aught else be told. When by two mortal blows +My frame was shatter'd, I betook myself +Weeping to him, who of free will forgives. +My sins were horrible; but so wide arms +Hath goodness infinite, that it receives +All who turn to it. Had this text divine +Been of Cosenza's shepherd better scann'd, +Who then by Clement on my hunt was set, +Yet at the bridge's head my bones had lain, +Near Benevento, by the heavy mole +Protected; but the rain now drenches them, +And the wind drives, out of the kingdom's bounds, +Far as the stream of Verde, where, with lights +Extinguish'd, he remov'd them from their bed. +Yet by their curse we are not so destroy'd, +But that the eternal love may turn, while hope +Retains her verdant blossoms. True it is, +That such one as in contumacy dies +Against the holy church, though he repent, +Must wander thirty-fold for all the time +In his presumption past; if such decree +Be not by prayers of good men shorter made +Look therefore if thou canst advance my bliss; +Revealing to my good Costanza, how +Thou hast beheld me, and beside the terms +Laid on me of that interdict; for here +By means of those below much profit comes." + + + + +CANTO IV + +When by sensations of delight or pain, +That any of our faculties hath seiz'd, +Entire the soul collects herself, it seems +She is intent upon that power alone, +And thus the error is disprov'd which holds +The soul not singly lighted in the breast. +And therefore when as aught is heard or seen, +That firmly keeps the soul toward it turn'd, +Time passes, and a man perceives it not. +For that, whereby he hearken, is one power, +Another that, which the whole spirit hash; +This is as it were bound, while that is free. + +This found I true by proof, hearing that spirit +And wond'ring; for full fifty steps aloft +The sun had measur'd unobserv'd of me, +When we arriv'd where all with one accord +The spirits shouted, "Here is what ye ask." + +A larger aperture ofttimes is stopp'd +With forked stake of thorn by villager, +When the ripe grape imbrowns, than was the path, +By which my guide, and I behind him close, +Ascended solitary, when that troop +Departing left us. On Sanleo's road +Who journeys, or to Noli low descends, +Or mounts Bismantua's height, must use his feet; +But here a man had need to fly, I mean +With the swift wing and plumes of high desire, +Conducted by his aid, who gave me hope, +And with light furnish'd to direct my way. + +We through the broken rock ascended, close +Pent on each side, while underneath the ground +Ask'd help of hands and feet. When we arriv'd +Near on the highest ridge of the steep bank, +Where the plain level open'd I exclaim'd, +"O master! say which way can we proceed?" + +He answer'd, "Let no step of thine recede. +Behind me gain the mountain, till to us +Some practis'd guide appear." That eminence +Was lofty that no eye might reach its point, +And the side proudly rising, more than line +From the mid quadrant to the centre drawn. +I wearied thus began: "Parent belov'd! +Turn, and behold how I remain alone, +If thou stay not."--" My son!" He straight reply'd, +"Thus far put forth thy strength;" and to a track +Pointed, that, on this side projecting, round +Circles the hill. His words so spurr'd me on, +That I behind him clamb'ring, forc'd myself, +Till my feet press'd the circuit plain beneath. +There both together seated, turn'd we round +To eastward, whence was our ascent: and oft +Many beside have with delight look'd back. + +First on the nether shores I turn'd my eyes, +Then rais'd them to the sun, and wond'ring mark'd +That from the left it smote us. Soon perceiv'd +That Poet sage now at the car of light +Amaz'd I stood, where 'twixt us and the north +Its course it enter'd. Whence he thus to me: +"Were Leda's offspring now in company +Of that broad mirror, that high up and low +Imparts his light beneath, thou might'st behold +The ruddy zodiac nearer to the bears +Wheel, if its ancient course it not forsook. +How that may be if thou would'st think; within +Pond'ring, imagine Sion with this mount +Plac'd on the earth, so that to both be one +Horizon, and two hemispheres apart, +Where lies the path that Phaeton ill knew +To guide his erring chariot: thou wilt see +How of necessity by this on one +He passes, while by that on the' other side, +If with clear view shine intellect attend." + +"Of truth, kind teacher!" I exclaim'd, "so clear +Aught saw I never, as I now discern +Where seem'd my ken to fail, that the mid orb +Of the supernal motion (which in terms +Of art is called the Equator, and remains +Ever between the sun and winter) for the cause +Thou hast assign'd, from hence toward the north +Departs, when those who in the Hebrew land +Inhabit, see it tow'rds the warmer part. +But if it please thee, I would gladly know, +How far we have to journey: for the hill +Mounts higher, than this sight of mine can mount." + +He thus to me: "Such is this steep ascent, +That it is ever difficult at first, +But, more a man proceeds, less evil grows. +When pleasant it shall seem to thee, so much +That upward going shall be easy to thee. +As in a vessel to go down the tide, +Then of this path thou wilt have reach'd the end. +There hope to rest thee from thy toil. No more +I answer, and thus far for certain know." +As he his words had spoken, near to us +A voice there sounded: "Yet ye first perchance +May to repose you by constraint be led." +At sound thereof each turn'd, and on the left +A huge stone we beheld, of which nor I +Nor he before was ware. Thither we drew, +find there were some, who in the shady place +Behind the rock were standing, as a man +Thru' idleness might stand. Among them one, +Who seem'd to me much wearied, sat him down, +And with his arms did fold his knees about, +Holding his face between them downward bent. + +"Sweet Sir!" I cry'd, "behold that man, who shows +Himself more idle, than if laziness +Were sister to him." Straight he turn'd to us, +And, o'er the thigh lifting his face, observ'd, +Then in these accents spake: "Up then, proceed +Thou valiant one." Straight who it was I knew; +Nor could the pain I felt (for want of breath +Still somewhat urg'd me) hinder my approach. +And when I came to him, he scarce his head +Uplifted, saying "Well hast thou discern'd, +How from the left the sun his chariot leads." + +His lazy acts and broken words my lips +To laughter somewhat mov'd; when I began: +"Belacqua, now for thee I grieve no more. +But tell, why thou art seated upright there? +Waitest thou escort to conduct thee hence? +Or blame I only shine accustom'd ways?" +Then he: "My brother, of what use to mount, +When to my suffering would not let me pass +The bird of God, who at the portal sits? +Behooves so long that heav'n first bear me round +Without its limits, as in life it bore, +Because I to the end repentant Sighs +Delay'd, if prayer do not aid me first, +That riseth up from heart which lives in grace. +What other kind avails, not heard in heaven?"' + +Before me now the Poet up the mount +Ascending, cried: "Haste thee, for see the sun +Has touch'd the point meridian, and the night +Now covers with her foot Marocco's shore." + + + + +CANTO V + +Now had I left those spirits, and pursued +The steps of my Conductor, when beheld +Pointing the finger at me one exclaim'd: +"See how it seems as if the light not shone +From the left hand of him beneath, and he, +As living, seems to be led on." Mine eyes +I at that sound reverting, saw them gaze +Through wonder first at me, and then at me +And the light broken underneath, by turns. +"Why are thy thoughts thus riveted?" my guide +Exclaim'd, "that thou hast slack'd thy pace? or how +Imports it thee, what thing is whisper'd here? +Come after me, and to their babblings leave +The crowd. Be as a tower, that, firmly set, +Shakes not its top for any blast that blows! +He, in whose bosom thought on thought shoots out, +Still of his aim is wide, in that the one +Sicklies and wastes to nought the other's strength." + +What other could I answer save "I come?" +I said it, somewhat with that colour ting'd +Which ofttimes pardon meriteth for man. + +Meanwhile traverse along the hill there came, +A little way before us, some who sang +The "Miserere" in responsive Strains. +When they perceiv'd that through my body I +Gave way not for the rays to pass, their song +Straight to a long and hoarse exclaim they chang'd; +And two of them, in guise of messengers, +Ran on to meet us, and inquiring ask'd: +"Of your condition we would gladly learn." + +To them my guide. "Ye may return, and bear +Tidings to them who sent you, that his frame +Is real flesh. If, as I deem, to view +His shade they paus'd, enough is answer'd them. +Him let them honour, they may prize him well." + +Ne'er saw I fiery vapours with such speed +Cut through the serene air at fall of night, +Nor August's clouds athwart the setting sun, +That upward these did not in shorter space +Return; and, there arriving, with the rest +Wheel back on us, as with loose rein a troop. + +"Many," exclaim'd the bard, "are these, who throng +Around us: to petition thee they come. +Go therefore on, and listen as thou go'st." + +"O spirit! who go'st on to blessedness +With the same limbs, that clad thee at thy birth." +Shouting they came, "a little rest thy step. +Look if thou any one amongst our tribe +Hast e'er beheld, that tidings of him there +Thou mayst report. Ah, wherefore go'st thou on? +Ah wherefore tarriest thou not? We all +By violence died, and to our latest hour +Were sinners, but then warn'd by light from heav'n, +So that, repenting and forgiving, we +Did issue out of life at peace with God, +Who with desire to see him fills our heart." + +Then I: "The visages of all I scan +Yet none of ye remember. But if aught, +That I can do, may please you, gentle spirits! +Speak; and I will perform it, by that peace, +Which on the steps of guide so excellent +Following from world to world intent I seek." + +In answer he began: "None here distrusts +Thy kindness, though not promis'd with an oath; +So as the will fail not for want of power. +Whence I, who sole before the others speak, +Entreat thee, if thou ever see that land, +Which lies between Romagna and the realm +Of Charles, that of thy courtesy thou pray +Those who inhabit Fano, that for me +Their adorations duly be put up, +By which I may purge off my grievous sins. +From thence I came. But the deep passages, +Whence issued out the blood wherein I dwelt, +Upon my bosom in Antenor's land +Were made, where to be more secure I thought. +The author of the deed was Este's prince, +Who, more than right could warrant, with his wrath +Pursued me. Had I towards Mira fled, +When overta'en at Oriaco, still +Might I have breath'd. But to the marsh I sped, +And in the mire and rushes tangled there +Fell, and beheld my life-blood float the plain." + +Then said another: "Ah! so may the wish, +That takes thee o'er the mountain, be fulfill'd, +As thou shalt graciously give aid to mine. +Of Montefeltro I; Buonconte I: +Giovanna nor none else have care for me, +Sorrowing with these I therefore go." I thus: +"From Campaldino's field what force or chance +Drew thee, that ne'er thy sepulture was known?" + +"Oh!" answer'd he, "at Casentino's foot +A stream there courseth, nam'd Archiano, sprung +In Apennine above the Hermit's seat. +E'en where its name is cancel'd, there came I, +Pierc'd in the heart, fleeing away on foot, +And bloodying the plain. Here sight and speech +Fail'd me, and finishing with Mary's name +I fell, and tenantless my flesh remain'd. +I will report the truth; which thou again +Tell to the living. Me God's angel took, +Whilst he of hell exclaim'd: "O thou from heav'n! +Say wherefore hast thou robb'd me? Thou of him +Th' eternal portion bear'st with thee away +For one poor tear that he deprives me of. +But of the other, other rule I make." + +"Thou knowest how in the atmosphere collects +That vapour dank, returning into water, +Soon as it mounts where cold condenses it. +That evil will, which in his intellect +Still follows evil, came, and rais'd the wind +And smoky mist, by virtue of the power +Given by his nature. Thence the valley, soon +As day was spent, he cover'd o'er with cloud +From Pratomagno to the mountain range, +And stretch'd the sky above, so that the air +Impregnate chang'd to water. Fell the rain, +And to the fosses came all that the land +Contain'd not; and, as mightiest streams are wont, +To the great river with such headlong sweep +Rush'd, that nought stay'd its course. My stiffen'd frame +Laid at his mouth the fell Archiano found, +And dash'd it into Arno, from my breast +Loos'ning the cross, that of myself I made +When overcome with pain. He hurl'd me on, +Along the banks and bottom of his course; +Then in his muddy spoils encircling wrapt." + +"Ah! when thou to the world shalt be return'd, +And rested after thy long road," so spake +Next the third spirit; "then remember me. +I once was Pia. Sienna gave me life, +Maremma took it from me. That he knows, +Who me with jewell'd ring had first espous'd." + + +CANTO VI + +When from their game of dice men separate, +He, who hath lost, remains in sadness fix'd, +Revolving in his mind, what luckless throws +He cast: but meanwhile all the company +Go with the other; one before him runs, +And one behind his mantle twitches, one +Fast by his side bids him remember him. +He stops not; and each one, to whom his hand +Is stretch'd, well knows he bids him stand aside; +And thus he from the press defends himself. +E'en such was I in that close-crowding throng; +And turning so my face around to all, +And promising, I 'scap'd from it with pains. + +Here of Arezzo him I saw, who fell +By Ghino's cruel arm; and him beside, +Who in his chase was swallow'd by the stream. +Here Frederic Novello, with his hand +Stretch'd forth, entreated; and of Pisa he, +Who put the good Marzuco to such proof +Of constancy. Count Orso I beheld; +And from its frame a soul dismiss'd for spite +And envy, as it said, but for no crime: +I speak of Peter de la Brosse; and here, +While she yet lives, that Lady of Brabant +Let her beware; lest for so false a deed +She herd with worse than these. When I was freed +From all those spirits, who pray'd for others' prayers +To hasten on their state of blessedness; +Straight I began: "O thou, my luminary! +It seems expressly in thy text denied, +That heaven's supreme decree can never bend +To supplication; yet with this design +Do these entreat. Can then their hope be vain, +Or is thy saying not to me reveal'd?" + +He thus to me: "Both what I write is plain, +And these deceiv'd not in their hope, if well +Thy mind consider, that the sacred height +Of judgment doth not stoop, because love's flame +In a short moment all fulfils, which he +Who sojourns here, in right should satisfy. +Besides, when I this point concluded thus, +By praying no defect could be supplied; +Because the pray'r had none access to God. +Yet in this deep suspicion rest thou not +Contented unless she assure thee so, +Who betwixt truth and mind infuses light. +I know not if thou take me right; I mean +Beatrice. Her thou shalt behold above, +Upon this mountain's crown, fair seat of joy." + +Then I: "Sir! let us mend our speed; for now +I tire not as before; and lo! the hill +Stretches its shadow far." He answer'd thus: +"Our progress with this day shall be as much +As we may now dispatch; but otherwise +Than thou supposest is the truth. For there +Thou canst not be, ere thou once more behold +Him back returning, who behind the steep +Is now so hidden, that as erst his beam +Thou dost not break. But lo! a spirit there +Stands solitary, and toward us looks: +It will instruct us in the speediest way." + +We soon approach'd it. O thou Lombard spirit! +How didst thou stand, in high abstracted mood, +Scarce moving with slow dignity thine eyes! +It spoke not aught, but let us onward pass, +Eyeing us as a lion on his watch. +But Virgil with entreaty mild advanc'd, +Requesting it to show the best ascent. +It answer to his question none return'd, +But of our country and our kind of life +Demanded. When my courteous guide began, +"Mantua," the solitary shadow quick +Rose towards us from the place in which it stood, +And cry'd, "Mantuan! I am thy countryman +Sordello." Each the other then embrac'd. + +Ah slavish Italy! thou inn of grief, +Vessel without a pilot in loud storm, +Lady no longer of fair provinces, +But brothel-house impure! this gentle spirit, +Ev'n from the Pleasant sound of his dear land +Was prompt to greet a fellow citizen +With such glad cheer; while now thy living ones +In thee abide not without war; and one +Malicious gnaws another, ay of those +Whom the same wall and the same moat contains, +Seek, wretched one! around thy sea-coasts wide; +Then homeward to thy bosom turn, and mark +If any part of the sweet peace enjoy. +What boots it, that thy reins Justinian's hand +Befitted, if thy saddle be unpress'd? +Nought doth he now but aggravate thy shame. +Ah people! thou obedient still shouldst live, +And in the saddle let thy Caesar sit, +If well thou marked'st that which God commands. + +Look how that beast to felness hath relaps'd +From having lost correction of the spur, +Since to the bridle thou hast set thine hand, +O German Albert! who abandon'st her, +That is grown savage and unmanageable, +When thou should'st clasp her flanks with forked heels. +Just judgment from the stars fall on thy blood! +And be it strange and manifest to all! +Such as may strike thy successor with dread! +For that thy sire and thou have suffer'd thus, +Through greediness of yonder realms detain'd, +The garden of the empire to run waste. +Come see the Capulets and Montagues, +The Philippeschi and Monaldi! man +Who car'st for nought! those sunk in grief, and these +With dire suspicion rack'd. Come, cruel one! +Come and behold the' oppression of the nobles, +And mark their injuries: and thou mayst see. +What safety Santafiore can supply. +Come and behold thy Rome, who calls on thee, +Desolate widow! day and night with moans: +"My Caesar, why dost thou desert my side?" +Come and behold what love among thy people: +And if no pity touches thee for us, +Come and blush for thine own report. For me, +If it be lawful, O Almighty Power, +Who wast in earth for our sakes crucified! +Are thy just eyes turn'd elsewhere? or is this +A preparation in the wond'rous depth +Of thy sage counsel made, for some good end, +Entirely from our reach of thought cut off? +So are the' Italian cities all o'erthrong'd +With tyrants, and a great Marcellus made +Of every petty factious villager. + +My Florence! thou mayst well remain unmov'd +At this digression, which affects not thee: +Thanks to thy people, who so wisely speed. +Many have justice in their heart, that long +Waiteth for counsel to direct the bow, +Or ere it dart unto its aim: but shine +Have it on their lip's edge. Many refuse +To bear the common burdens: readier thine +Answer uneall'd, and cry, "Behold I stoop!" + +Make thyself glad, for thou hast reason now, +Thou wealthy! thou at peace! thou wisdom-fraught! +Facts best witness if I speak the truth. +Athens and Lacedaemon, who of old +Enacted laws, for civil arts renown'd, +Made little progress in improving life +Tow'rds thee, who usest such nice subtlety, +That to the middle of November scarce +Reaches the thread thou in October weav'st. +How many times, within thy memory, +Customs, and laws, and coins, and offices +Have been by thee renew'd, and people chang'd! + +If thou remember'st well and can'st see clear, +Thou wilt perceive thyself like a sick wretch, +Who finds no rest upon her down, but oft +Shifting her side, short respite seeks from pain. + + + + +CANTO VII + +After their courteous greetings joyfully +Sev'n times exchang'd, Sordello backward drew +Exclaiming, "Who are ye?" "Before this mount +By spirits worthy of ascent to God +Was sought, my bones had by Octavius' care +Been buried. I am Virgil, for no sin +Depriv'd of heav'n, except for lack of faith." + +So answer'd him in few my gentle guide. + +As one, who aught before him suddenly +Beholding, whence his wonder riseth, cries +"It is yet is not," wav'ring in belief; +Such he appear'd; then downward bent his eyes, +And drawing near with reverential step, +Caught him, where of mean estate might clasp +His lord. "Glory of Latium!" he exclaim'd, +"In whom our tongue its utmost power display'd! +Boast of my honor'd birth-place! what desert +Of mine, what favour rather undeserv'd, +Shows thee to me? If I to hear that voice +Am worthy, say if from below thou com'st +And from what cloister's pale?"--"Through every orb +Of that sad region," he reply'd, "thus far +Am I arriv'd, by heav'nly influence led +And with such aid I come. There is a place +There underneath, not made by torments sad, +But by dun shades alone; where mourning's voice +Sounds not of anguish sharp, but breathes in sighs. + +"There I with little innocents abide, +Who by death's fangs were bitten, ere exempt +From human taint. There I with those abide, +Who the three holy virtues put not on, +But understood the rest, and without blame +Follow'd them all. But if thou know'st and canst, +Direct us, how we soonest may arrive, +Where Purgatory its true beginning takes." + +He answer'd thus: "We have no certain place +Assign'd us: upwards I may go or round, +Far as I can, I join thee for thy guide. +But thou beholdest now how day declines: +And upwards to proceed by night, our power +Excels: therefore it may be well to choose +A place of pleasant sojourn. To the right +Some spirits sit apart retir'd. If thou +Consentest, I to these will lead thy steps: +And thou wilt know them, not without delight." + +"How chances this?" was answer'd; "who so wish'd +To ascend by night, would he be thence debarr'd +By other, or through his own weakness fail?" + +The good Sordello then, along the ground +Trailing his finger, spoke: "Only this line +Thou shalt not overpass, soon as the sun +Hath disappear'd; not that aught else impedes +Thy going upwards, save the shades of night. +These with the wont of power perplex the will. +With them thou haply mightst return beneath, +Or to and fro around the mountain's side +Wander, while day is in the horizon shut." + +My master straight, as wond'ring at his speech, +Exclaim'd: "Then lead us quickly, where thou sayst, +That, while we stay, we may enjoy delight." + +A little space we were remov'd from thence, +When I perceiv'd the mountain hollow'd out. +Ev'n as large valleys hollow'd out on earth, + +"That way," the' escorting spirit cried, "we go, +Where in a bosom the high bank recedes: +And thou await renewal of the day." + +Betwixt the steep and plain a crooked path +Led us traverse into the ridge's side, +Where more than half the sloping edge expires. +Refulgent gold, and silver thrice refin'd, +And scarlet grain and ceruse, Indian wood +Of lucid dye serene, fresh emeralds +But newly broken, by the herbs and flowers +Plac'd in that fair recess, in color all +Had been surpass'd, as great surpasses less. +Nor nature only there lavish'd her hues, +But of the sweetness of a thousand smells +A rare and undistinguish'd fragrance made. + +"Salve Regina," on the grass and flowers +Here chanting I beheld those spirits sit +Who not beyond the valley could be seen. + +"Before the west'ring sun sink to his bed," +Began the Mantuan, who our steps had turn'd, + +"'Mid those desires not that I lead ye on. +For from this eminence ye shall discern +Better the acts and visages of all, +Than in the nether vale among them mix'd. +He, who sits high above the rest, and seems +To have neglected that he should have done, +And to the others' song moves not his lip, +The Emperor Rodolph call, who might have heal'd +The wounds whereof fair Italy hath died, +So that by others she revives but slowly, +He, who with kindly visage comforts him, +Sway'd in that country, where the water springs, +That Moldaw's river to the Elbe, and Elbe +Rolls to the ocean: Ottocar his name: +Who in his swaddling clothes was of more worth +Than Winceslaus his son, a bearded man, +Pamper'd with rank luxuriousness and ease. +And that one with the nose depress, who close +In counsel seems with him of gentle look, +Flying expir'd, with'ring the lily's flower. +Look there how he doth knock against his breast! +The other ye behold, who for his cheek +Makes of one hand a couch, with frequent sighs. +They are the father and the father-in-law +Of Gallia's bane: his vicious life they know +And foul; thence comes the grief that rends them thus. + +"He, so robust of limb, who measure keeps +In song, with him of feature prominent, +With ev'ry virtue bore his girdle brac'd. +And if that stripling who behinds him sits, +King after him had liv'd, his virtue then +From vessel to like vessel had been pour'd; +Which may not of the other heirs be said. +By James and Frederick his realms are held; +Neither the better heritage obtains. +Rarely into the branches of the tree +Doth human worth mount up; and so ordains +He who bestows it, that as his free gift +It may be call'd. To Charles my words apply +No less than to his brother in the song; +Which Pouille and Provence now with grief confess. +So much that plant degenerates from its seed, +As more than Beatrice and Margaret +Costanza still boasts of her valorous spouse. + +"Behold the king of simple life and plain, +Harry of England, sitting there alone: +He through his branches better issue spreads. + +"That one, who on the ground beneath the rest +Sits lowest, yet his gaze directs aloft, +Us William, that brave Marquis, for whose cause +The deed of Alexandria and his war +Makes Conferrat and Canavese weep." + + + + +CANTO VIII + +Now was the hour that wakens fond desire +In men at sea, and melts their thoughtful heart, +Who in the morn have bid sweet friends farewell, +And pilgrim newly on his road with love +Thrills, if he hear the vesper bell from far, +That seems to mourn for the expiring day: +When I, no longer taking heed to hear +Began, with wonder, from those spirits to mark +One risen from its seat, which with its hand +Audience implor'd. Both palms it join'd and rais'd, +Fixing its steadfast gaze towards the east, +As telling God, "I care for naught beside." + +"Te Lucis Ante," so devoutly then +Came from its lip, and in so soft a strain, +That all my sense in ravishment was lost. +And the rest after, softly and devout, +Follow'd through all the hymn, with upward gaze +Directed to the bright supernal wheels. + +Here, reader! for the truth makes thine eyes keen: +For of so subtle texture is this veil, +That thou with ease mayst pass it through unmark'd. + +I saw that gentle band silently next +Look up, as if in expectation held, +Pale and in lowly guise; and from on high +I saw forth issuing descend beneath +Two angels with two flame-illumin'd swords, +Broken and mutilated at their points. +Green as the tender leaves but newly born, +Their vesture was, the which by wings as green +Beaten, they drew behind them, fann'd in air. +A little over us one took his stand, +The other lighted on the' Opposing hill, +So that the troop were in the midst contain'd. + +Well I descried the whiteness on their heads; +But in their visages the dazzled eye +Was lost, as faculty that by too much +Is overpower'd. "From Mary's bosom both +Are come," exclaim'd Sordello, "as a guard +Over the vale, ganst him, who hither tends, +The serpent." Whence, not knowing by which path +He came, I turn'd me round, and closely press'd, +All frozen, to my leader's trusted side. + +Sordello paus'd not: "To the valley now +(For it is time) let us descend; and hold +Converse with those great shadows: haply much +Their sight may please ye." Only three steps down +Methinks I measur'd, ere I was beneath, +And noted one who look'd as with desire +To know me. Time was now that air arrow dim; +Yet not so dim, that 'twixt his eyes and mine +It clear'd not up what was conceal'd before. +Mutually tow'rds each other we advanc'd. +Nino, thou courteous judge! what joy I felt, +When I perceiv'd thou wert not with the bad! + +No salutation kind on either part +Was left unsaid. He then inquir'd: "How long +Since thou arrived'st at the mountain's foot, +Over the distant waves?"--"O!" answer'd I, +"Through the sad seats of woe this morn I came, +And still in my first life, thus journeying on, +The other strive to gain." Soon as they heard +My words, he and Sordello backward drew, +As suddenly amaz'd. To Virgil one, +The other to a spirit turn'd, who near +Was seated, crying: "Conrad! up with speed: +Come, see what of his grace high God hath will'd." +Then turning round to me: "By that rare mark +Of honour which thou ow'st to him, who hides +So deeply his first cause, it hath no ford, +When thou shalt be beyond the vast of waves. +Tell my Giovanna, that for me she call +There, where reply to innocence is made. +Her mother, I believe, loves me no more; +Since she has chang'd the white and wimpled folds, +Which she is doom'd once more with grief to wish. +By her it easily may be perceiv'd, +How long in women lasts the flame of love, +If sight and touch do not relume it oft. +For her so fair a burial will not make +The viper which calls Milan to the field, +As had been made by shrill Gallura's bird." + +He spoke, and in his visage took the stamp +Of that right seal, which with due temperature +Glows in the bosom. My insatiate eyes +Meanwhile to heav'n had travel'd, even there +Where the bright stars are slowest, as a wheel +Nearest the axle; when my guide inquir'd: +"What there aloft, my son, has caught thy gaze?" + +I answer'd: "The three torches, with which here +The pole is all on fire." He then to me: +"The four resplendent stars, thou saw'st this morn +Are there beneath, and these ris'n in their stead." + +While yet he spoke. Sordello to himself +Drew him, and cry'd: "Lo there our enemy!" +And with his hand pointed that way to look. + +Along the side, where barrier none arose +Around the little vale, a serpent lay, +Such haply as gave Eve the bitter food. +Between the grass and flowers, the evil snake +Came on, reverting oft his lifted head; +And, as a beast that smoothes its polish'd coat, +Licking his hack. I saw not, nor can tell, +How those celestial falcons from their seat +Mov'd, but in motion each one well descried, +Hearing the air cut by their verdant plumes. +The serpent fled; and to their stations back +The angels up return'd with equal flight. + +The Spirit (who to Nino, when he call'd, +Had come), from viewing me with fixed ken, +Through all that conflict, loosen'd not his sight. + +"So may the lamp, which leads thee up on high, +Find, in thy destin'd lot, of wax so much, +As may suffice thee to the enamel's height." +It thus began: "If any certain news +Of Valdimagra and the neighbour part +Thou know'st, tell me, who once was mighty there +They call'd me Conrad Malaspina, not +That old one, but from him I sprang. The love +I bore my people is now here refin'd." + +"In your dominions," I answer'd, "ne'er was I. +But through all Europe where do those men dwell, +To whom their glory is not manifest? +The fame, that honours your illustrious house, +Proclaims the nobles and proclaims the land; +So that he knows it who was never there. +I swear to you, so may my upward route +Prosper! your honour'd nation not impairs +The value of her coffer and her sword. +Nature and use give her such privilege, +That while the world is twisted from his course +By a bad head, she only walks aright, +And has the evil way in scorn." He then: +"Now pass thee on: sev'n times the tired sun +Revisits not the couch, which with four feet +The forked Aries covers, ere that kind +Opinion shall be nail'd into thy brain +With stronger nails than other's speech can drive, +If the sure course of judgment be not stay'd." + + + + +CANTO IX + +Now the fair consort of Tithonus old, +Arisen from her mate's beloved arms, +Look'd palely o'er the eastern cliff: her brow, +Lucent with jewels, glitter'd, set in sign +Of that chill animal, who with his train +Smites fearful nations: and where then we were, +Two steps of her ascent the night had past, +And now the third was closing up its wing, +When I, who had so much of Adam with me, +Sank down upon the grass, o'ercome with sleep, +There where all five were seated. In that hour, +When near the dawn the swallow her sad lay, +Rememb'ring haply ancient grief, renews, +And with our minds more wand'rers from the flesh, +And less by thought restrain'd are, as 't were, full +Of holy divination in their dreams, +Then in a vision did I seem to view +A golden-feather'd eagle in the sky, +With open wings, and hov'ring for descent, +And I was in that place, methought, from whence +Young Ganymede, from his associates 'reft, +Was snatch'd aloft to the high consistory. +"Perhaps," thought I within me, "here alone +He strikes his quarry, and elsewhere disdains +To pounce upon the prey." Therewith, it seem'd, +A little wheeling in his airy tour +Terrible as the lightning rush'd he down, +And snatch'd me upward even to the fire. + +There both, I thought, the eagle and myself +Did burn; and so intense th' imagin'd flames, +That needs my sleep was broken off. As erst +Achilles shook himself, and round him roll'd +His waken'd eyeballs wond'ring where he was, +Whenas his mother had from Chiron fled +To Scyros, with him sleeping in her arms; +E'en thus I shook me, soon as from my face +The slumber parted, turning deadly pale, +Like one ice-struck with dread. Solo at my side +My comfort stood: and the bright sun was now +More than two hours aloft: and to the sea +My looks were turn'd. "Fear not," my master cried, +"Assur'd we are at happy point. Thy strength +Shrink not, but rise dilated. Thou art come +To Purgatory now. Lo! there the cliff +That circling bounds it! Lo! the entrance there, +Where it doth seem disparted! re the dawn +Usher'd the daylight, when thy wearied soul +Slept in thee, o'er the flowery vale beneath +A lady came, and thus bespake me: "I +Am Lucia. Suffer me to take this man, +Who slumbers. Easier so his way shall speed." +Sordello and the other gentle shapes +Tarrying, she bare thee up: and, as day shone, +This summit reach'd: and I pursued her steps. +Here did she place thee. First her lovely eyes +That open entrance show'd me; then at once +She vanish'd with thy sleep. Like one, whose doubts +Are chas'd by certainty, and terror turn'd +To comfort on discovery of the truth, +Such was the change in me: and as my guide +Beheld me fearless, up along the cliff +He mov'd, and I behind him, towards the height. + +Reader! thou markest how my theme doth rise, +Nor wonder therefore, if more artfully +I prop the structure! nearer now we drew, +Arriv'd' whence in that part, where first a breach +As of a wall appear'd, I could descry +A portal, and three steps beneath, that led +For inlet there, of different colour each, +And one who watch'd, but spake not yet a word. +As more and more mine eye did stretch its view, +I mark'd him seated on the highest step, +In visage such, as past my power to bear. + +Grasp'd in his hand a naked sword, glanc'd back +The rays so toward me, that I oft in vain +My sight directed. "Speak from whence ye stand:" +He cried: "What would ye? Where is your escort? +Take heed your coming upward harm ye not." + +"A heavenly dame, not skilless of these things," +Replied the' instructor, "told us, even now, +"Pass that way: here the gate is." --"And may she +Befriending prosper your ascent," resum'd +The courteous keeper of the gate: "Come then +Before our steps." We straightway thither came. + +The lowest stair was marble white so smooth +And polish'd, that therein my mirror'd form +Distinct I saw. The next of hue more dark +Than sablest grain, a rough and singed block, +Crack'd lengthwise and across. The third, that lay +Massy above, seem'd porphyry, that flam'd +Red as the life-blood spouting from a vein. +On this God's angel either foot sustain'd, +Upon the threshold seated, which appear'd +A rock of diamond. Up the trinal steps +My leader cheerily drew me. "Ask," said he, + +"With humble heart, that he unbar the bolt." + +Piously at his holy feet devolv'd +I cast me, praying him for pity's sake +That he would open to me: but first fell +Thrice on my bosom prostrate. Seven times +The letter, that denotes the inward stain, +He on my forehead with the blunted point +Of his drawn sword inscrib'd. And "Look," he cried, +"When enter'd, that thou wash these scars away." + +Ashes, or earth ta'en dry out of the ground, +Were of one colour with the robe he wore. +From underneath that vestment forth he drew +Two keys of metal twain: the one was gold, +Its fellow silver. With the pallid first, +And next the burnish'd, he so ply'd the gate, +As to content me well. "Whenever one +Faileth of these, that in the keyhole straight +It turn not, to this alley then expect +Access in vain." Such were the words he spake. +"One is more precious: but the other needs +Skill and sagacity, large share of each, +Ere its good task to disengage the knot +Be worthily perform'd. From Peter these +I hold, of him instructed, that I err +Rather in opening than in keeping fast; +So but the suppliant at my feet implore." + +Then of that hallow'd gate he thrust the door, +Exclaiming, "Enter, but this warning hear: +He forth again departs who looks behind." + +As in the hinges of that sacred ward +The swivels turn'd, sonorous metal strong, +Harsh was the grating; nor so surlily +Roar'd the Tarpeian, when by force bereft +Of good Metellus, thenceforth from his loss +To leanness doom'd. Attentively I turn'd, +List'ning the thunder, that first issued forth; +And "We praise thee, O God," methought I heard +In accents blended with sweet melody. +The strains came o'er mine ear, e'en as the sound +Of choral voices, that in solemn chant +With organ mingle, and, now high and clear, +Come swelling, now float indistinct away. + + + + +CANTO X + +When we had passed the threshold of the gate +(Which the soul's ill affection doth disuse, +Making the crooked seem the straighter path), +I heard its closing sound. Had mine eyes turn'd, +For that offence what plea might have avail'd? + +We mounted up the riven rock, that wound +On either side alternate, as the wave +Flies and advances. "Here some little art +Behooves us," said my leader, "that our steps +Observe the varying flexure of the path." + +Thus we so slowly sped, that with cleft orb +The moon once more o'erhangs her wat'ry couch, +Ere we that strait have threaded. But when free +We came and open, where the mount above +One solid mass retires, I spent, with toil, +And both, uncertain of the way, we stood, +Upon a plain more lonesome, than the roads +That traverse desert wilds. From whence the brink +Borders upon vacuity, to foot +Of the steep bank, that rises still, the space +Had measur'd thrice the stature of a man: +And, distant as mine eye could wing its flight, +To leftward now and now to right dispatch'd, +That cornice equal in extent appear'd. + +Not yet our feet had on that summit mov'd, +When I discover'd that the bank around, +Whose proud uprising all ascent denied, +Was marble white, and so exactly wrought +With quaintest sculpture, that not there alone +Had Polycletus, but e'en nature's self +Been sham'd. The angel who came down to earth +With tidings of the peace so many years +Wept for in vain, that op'd the heavenly gates +From their long interdict, before us seem'd, +In a sweet act, so sculptur'd to the life, +He look'd no silent image. One had sworn +He had said, "Hail!" for she was imag'd there, +By whom the key did open to God's love, +And in her act as sensibly impress +That word, "Behold the handmaid of the Lord," +As figure seal'd on wax. "Fix not thy mind +On one place only," said the guide belov'd, +Who had me near him on that part where lies +The heart of man. My sight forthwith I turn'd +And mark'd, behind the virgin mother's form, +Upon that side, where he, that mov'd me, stood, +Another story graven on the rock. + +I passed athwart the bard, and drew me near, +That it might stand more aptly for my view. +There in the self-same marble were engrav'd +The cart and kine, drawing the sacred ark, +That from unbidden office awes mankind. +Before it came much people; and the whole +Parted in seven quires. One sense cried, "Nay," +Another, "Yes, they sing." Like doubt arose +Betwixt the eye and smell, from the curl'd fume +Of incense breathing up the well-wrought toil. +Preceding the blest vessel, onward came +With light dance leaping, girt in humble guise, +Sweet Israel's harper: in that hap he seem'd +Less and yet more than kingly. Opposite, +At a great palace, from the lattice forth +Look'd Michol, like a lady full of scorn +And sorrow. To behold the tablet next, +Which at the hack of Michol whitely shone, +I mov'd me. There was storied on the rock +The' exalted glory of the Roman prince, +Whose mighty worth mov'd Gregory to earn +His mighty conquest, Trajan th' Emperor. +A widow at his bridle stood, attir'd +In tears and mourning. Round about them troop'd +Full throng of knights, and overhead in gold +The eagles floated, struggling with the wind. + +The wretch appear'd amid all these to say: +"Grant vengeance, sire! for, woe beshrew this heart +My son is murder'd." He replying seem'd; + +"Wait now till I return." And she, as one +Made hasty by her grief; "O sire, if thou +Dost not return?"--"Where I am, who then is, +May right thee."--"What to thee is other's good, +If thou neglect thy own?"--"Now comfort thee," +At length he answers. "It beseemeth well +My duty be perform'd, ere I move hence: +So justice wills; and pity bids me stay." + +He, whose ken nothing new surveys, produc'd +That visible speaking, new to us and strange +The like not found on earth. Fondly I gaz'd +Upon those patterns of meek humbleness, +Shapes yet more precious for their artist's sake, +When "Lo," the poet whisper'd, "where this way +(But slack their pace), a multitude advance. +These to the lofty steps shall guide us on." + +Mine eyes, though bent on view of novel sights +Their lov'd allurement, were not slow to turn. + +Reader! would not that amaz'd thou miss +Of thy good purpose, hearing how just God +Decrees our debts be cancel'd. Ponder not +The form of suff'ring. Think on what succeeds, +Think that at worst beyond the mighty doom +It cannot pass. "Instructor," I began, +"What I see hither tending, bears no trace +Of human semblance, nor of aught beside +That my foil'd sight can guess." He answering thus: +"So courb'd to earth, beneath their heavy teems +Of torment stoop they, that mine eye at first +Struggled as thine. But look intently thither, +An disentangle with thy lab'ring view, +What underneath those stones approacheth: now, +E'en now, mayst thou discern the pangs of each." + +Christians and proud! poor and wretched ones! +That feeble in the mind's eye, lean your trust +Upon unstaid perverseness! now ye not +That we are worms, yet made at last to form +The winged insect, imp'd with angel plumes +That to heaven's justice unobstructed soars? +Why buoy ye up aloft your unfleg'd souls? +Abortive then and shapeless ye remain, +Like the untimely embryon of a worm! + +As, to support incumbent floor or roof, +For corbel is a figure sometimes seen, +That crumples up its knees unto its breast, +With the feign'd posture stirring ruth unfeign'd +In the beholder's fancy; so I saw +These fashion'd, when I noted well their guise. + +Each, as his back was laden, came indeed +Or more or less contract; but it appear'd +As he, who show'd most patience in his look, +Wailing exclaim'd: "I can endure no more." + + + + +CANTO XI + +"O thou Almighty Father, who dost make +The heavens thy dwelling, not in bounds confin'd, +But that with love intenser there thou view'st +Thy primal effluence, hallow'd be thy name: +Join each created being to extol +Thy might, for worthy humblest thanks and praise +Is thy blest Spirit. May thy kingdom's peace +Come unto us; for we, unless it come, +With all our striving thither tend in vain. +As of their will the angels unto thee +Tender meet sacrifice, circling thy throne +With loud hosannas, so of theirs be done +By saintly men on earth. Grant us this day +Our daily manna, without which he roams +Through this rough desert retrograde, who most +Toils to advance his steps. As we to each +Pardon the evil done us, pardon thou +Benign, and of our merit take no count. +'Gainst the old adversary prove thou not +Our virtue easily subdu'd; but free +From his incitements and defeat his wiles. +This last petition, dearest Lord! is made +Not for ourselves, since that were needless now, +But for their sakes who after us remain." + +Thus for themselves and us good speed imploring, +Those spirits went beneath a weight like that +We sometimes feel in dreams, all, sore beset, +But with unequal anguish, wearied all, +Round the first circuit, purging as they go, +The world's gross darkness off: In our behalf +If there vows still be offer'd, what can here +For them be vow'd and done by such, whose wills +Have root of goodness in them? Well beseems +That we should help them wash away the stains +They carried hence, that so made pure and light, +They may spring upward to the starry spheres. + +"Ah! so may mercy-temper'd justice rid +Your burdens speedily, that ye have power +To stretch your wing, which e'en to your desire +Shall lift you, as ye show us on which hand +Toward the ladder leads the shortest way. +And if there be more passages than one, +Instruct us of that easiest to ascend; +For this man who comes with me, and bears yet +The charge of fleshly raiment Adam left him, +Despite his better will but slowly mounts." +From whom the answer came unto these words, +Which my guide spake, appear'd not; but 'twas said: + +"Along the bank to rightward come with us, +And ye shall find a pass that mocks not toil +Of living man to climb: and were it not +That I am hinder'd by the rock, wherewith +This arrogant neck is tam'd, whence needs I stoop +My visage to the ground, him, who yet lives, +Whose name thou speak'st not him I fain would view. +To mark if e'er I knew himnd to crave +His pity for the fardel that I bear. +I was of Latiun, of a Tuscan horn +A mighty one: Aldobranlesco's name +My sire's, I know not if ye e'er have heard. +My old blood and forefathers' gallant deeds +Made me so haughty, that I clean forgot +The common mother, and to such excess, +Wax'd in my scorn of all men, that I fell, +Fell therefore; by what fate Sienna's sons, +Each child in Campagnatico, can tell. +I am Omberto; not me only pride +Hath injur'd, but my kindred all involv'd +In mischief with her. Here my lot ordains +Under this weight to groan, till I appease +God's angry justice, since I did it not +Amongst the living, here amongst the dead." + +List'ning I bent my visage down: and one +(Not he who spake) twisted beneath the weight +That urg'd him, saw me, knew me straight, and call'd, +Holding his eyes With difficulty fix'd +Intent upon me, stooping as I went +Companion of their way. "O!" I exclaim'd, + +"Art thou not Oderigi, art not thou +Agobbio's glory, glory of that art +Which they of Paris call the limmer's skill?" + +"Brother!" said he, "with tints that gayer smile, +Bolognian Franco's pencil lines the leaves. +His all the honour now; mine borrow'd light. +In truth I had not been thus courteous to him, +The whilst I liv'd, through eagerness of zeal +For that pre-eminence my heart was bent on. +Here of such pride the forfeiture is paid. +Nor were I even here; if, able still +To sin, I had not turn'd me unto God. +O powers of man! how vain your glory, nipp'd +E'en in its height of verdure, if an age +Less bright succeed not! imbue thought +To lord it over painting's field; and now +The cry is Giotto's, and his name eclips'd. +Thus hath one Guido from the other snatch'd +The letter'd prize: and he perhaps is born, +Who shall drive either from their nest. The noise +Of worldly fame is but a blast of wind, +That blows from divers points, and shifts its name +Shifting the point it blows from. Shalt thou more +Live in the mouths of mankind, if thy flesh +Part shrivel'd from thee, than if thou hadst died, +Before the coral and the pap were left, +Or ere some thousand years have passed? and that +Is, to eternity compar'd, a space, +Briefer than is the twinkling of an eye +To the heaven's slowest orb. He there who treads +So leisurely before me, far and wide +Through Tuscany resounded once; and now +Is in Sienna scarce with whispers nam'd: +There was he sov'reign, when destruction caught +The madd'ning rage of Florence, in that day +Proud as she now is loathsome. Your renown +Is as the herb, whose hue doth come and go, +And his might withers it, by whom it sprang +Crude from the lap of earth." I thus to him: +"True are thy sayings: to my heart they breathe +The kindly spirit of meekness, and allay +What tumours rankle there. But who is he +Of whom thou spak'st but now?"--"This," he replied, +"Is Provenzano. He is here, because +He reach'd, with grasp presumptuous, at the sway +Of all Sienna. Thus he still hath gone, +Thus goeth never-resting, since he died. +Such is th' acquittance render'd back of him, +Who, beyond measure, dar'd on earth." I then: +"If soul that to the verge of life delays +Repentance, linger in that lower space, +Nor hither mount, unless good prayers befriend, +How chanc'd admittance was vouchsaf'd to him?" + +"When at his glory's topmost height," said he, +"Respect of dignity all cast aside, +Freely He fix'd him on Sienna's plain, +A suitor to redeem his suff'ring friend, +Who languish'd in the prison-house of Charles, +Nor for his sake refus'd through every vein +To tremble. More I will not say; and dark, +I know, my words are, but thy neighbours soon +Shall help thee to a comment on the text. +This is the work, that from these limits freed him." + + + + +CANTO XII + +With equal pace as oxen in the yoke, +I with that laden spirit journey'd on +Long as the mild instructor suffer'd me; +But when he bade me quit him, and proceed +(For "here," said he, "behooves with sail and oars +Each man, as best he may, push on his bark"), +Upright, as one dispos'd for speed, I rais'd +My body, still in thought submissive bow'd. + +I now my leader's track not loth pursued; +And each had shown how light we far'd along +When thus he warn'd me: "Bend thine eyesight down: +For thou to ease the way shall find it good +To ruminate the bed beneath thy feet." + +As in memorial of the buried, drawn +Upon earth-level tombs, the sculptur'd form +Of what was once, appears (at sight whereof +Tears often stream forth by remembrance wak'd, +Whose sacred stings the piteous only feel), +So saw I there, but with more curious skill +Of portraiture o'erwrought, whate'er of space +From forth the mountain stretches. On one part +Him I beheld, above all creatures erst +Created noblest, light'ning fall from heaven: +On th' other side with bolt celestial pierc'd +Briareus: cumb'ring earth he lay through dint +Of mortal ice-stroke. The Thymbraean god +With Mars, I saw, and Pallas, round their sire, +Arm'd still, and gazing on the giant's limbs +Strewn o'er th' ethereal field. Nimrod I saw: +At foot of the stupendous work he stood, +As if bewilder'd, looking on the crowd +Leagued in his proud attempt on Sennaar's plain. + +O Niobe! in what a trance of woe +Thee I beheld, upon that highway drawn, +Sev'n sons on either side thee slain! Saul! +How ghastly didst thou look! on thine own sword +Expiring in Gilboa, from that hour +Ne'er visited with rain from heav'n or dew! + +O fond Arachne! thee I also saw +Half spider now in anguish crawling up +Th' unfinish'd web thou weaved'st to thy bane! + +O Rehoboam! here thy shape doth seem +Louring no more defiance! but fear-smote +With none to chase him in his chariot whirl'd. + +Was shown beside upon the solid floor +How dear Alcmaeon forc'd his mother rate +That ornament in evil hour receiv'd: +How in the temple on Sennacherib fell +His sons, and how a corpse they left him there. +Was shown the scath and cruel mangling made +By Tomyris on Cyrus, when she cried: +"Blood thou didst thirst for, take thy fill of blood!" +Was shown how routed in the battle fled +Th' Assyrians, Holofernes slain, and e'en +The relics of the carnage. Troy I mark'd +In ashes and in caverns. Oh! how fall'n, +How abject, Ilion, was thy semblance there! + +What master of the pencil or the style +Had trac'd the shades and lines, that might have made +The subtlest workman wonder? Dead the dead, +The living seem'd alive; with clearer view +His eye beheld not who beheld the truth, +Than mine what I did tread on, while I went +Low bending. Now swell out; and with stiff necks +Pass on, ye sons of Eve! veil not your looks, +Lest they descry the evil of your path! + +I noted not (so busied was my thought) +How much we now had circled of the mount, +And of his course yet more the sun had spent, +When he, who with still wakeful caution went, +Admonish'd: "Raise thou up thy head: for know +Time is not now for slow suspense. Behold +That way an angel hasting towards us! Lo! +Where duly the sixth handmaid doth return +From service on the day. Wear thou in look +And gesture seemly grace of reverent awe, +That gladly he may forward us aloft. +Consider that this day ne'er dawns again." + +Time's loss he had so often warn'd me 'gainst, +I could not miss the scope at which he aim'd. + +The goodly shape approach'd us, snowy white +In vesture, and with visage casting streams +Of tremulous lustre like the matin star. +His arms he open'd, then his wings; and spake: +"Onward: the steps, behold! are near; and now +Th' ascent is without difficulty gain'd." + +A scanty few are they, who when they hear +Such tidings, hasten. O ye race of men +Though born to soar, why suffer ye a wind +So slight to baffle ye? He led us on +Where the rock parted; here against my front +Did beat his wings, then promis'd I should fare +In safety on my way. As to ascend +That steep, upon whose brow the chapel stands +(O'er Rubaconte, looking lordly down +On the well-guided city,) up the right +Th' impetuous rise is broken by the steps +Carv'd in that old and simple age, when still +The registry and label rested safe; +Thus is th' acclivity reliev'd, which here +Precipitous from the other circuit falls: +But on each hand the tall cliff presses close. + +As ent'ring there we turn'd, voices, in strain +Ineffable, sang: "Blessed are the poor +In spirit." Ah how far unlike to these +The straits of hell; here songs to usher us, +There shrieks of woe! We climb the holy stairs: +And lighter to myself by far I seem'd +Than on the plain before, whence thus I spake: +"Say, master, of what heavy thing have I +Been lighten'd, that scarce aught the sense of toil +Affects me journeying?" He in few replied: +"When sin's broad characters, that yet remain +Upon thy temples, though well nigh effac'd, +Shall be, as one is, all clean razed out, +Then shall thy feet by heartiness of will +Be so o'ercome, they not alone shall feel +No sense of labour, but delight much more +Shall wait them urg'd along their upward way." + +Then like to one, upon whose head is plac'd +Somewhat he deems not of but from the becks +Of others as they pass him by; his hand +Lends therefore help to' assure him, searches, finds, +And well performs such office as the eye +Wants power to execute: so stretching forth +The fingers of my right hand, did I find +Six only of the letters, which his sword +Who bare the keys had trac'd upon my brow. +The leader, as he mark'd mine action, smil'd. + + + + +CANTO XIII + +We reach'd the summit of the scale, and stood +Upon the second buttress of that mount +Which healeth him who climbs. A cornice there, +Like to the former, girdles round the hill; +Save that its arch with sweep less ample bends. + +Shadow nor image there is seen; all smooth +The rampart and the path, reflecting nought +But the rock's sullen hue. "If here we wait +For some to question," said the bard, "I fear +Our choice may haply meet too long delay." + +Then fixedly upon the sun his eyes +He fastn'd, made his right the central point +From whence to move, and turn'd the left aside. +"O pleasant light, my confidence and hope, +Conduct us thou," he cried, "on this new way, +Where now I venture, leading to the bourn +We seek. The universal world to thee +Owes warmth and lustre. If no other cause +Forbid, thy beams should ever be our guide." + +Far, as is measur'd for a mile on earth, +In brief space had we journey'd; such prompt will +Impell'd; and towards us flying, now were heard +Spirits invisible, who courteously +Unto love's table bade the welcome guest. +The voice, that firstlew by, call'd forth aloud, +"They have no wine;" so on behind us past, +Those sounds reiterating, nor yet lost +In the faint distance, when another came +Crying, "I am Orestes," and alike +Wing'd its fleet way. "Oh father!" I exclaim'd, +"What tongues are these?" and as I question'd, lo! +A third exclaiming, "Love ye those have wrong'd you." + +"This circuit," said my teacher, "knots the scourge +For envy, and the cords are therefore drawn +By charity's correcting hand. The curb +Is of a harsher sound, as thou shalt hear +(If I deem rightly), ere thou reach the pass, +Where pardon sets them free. But fix thine eyes +Intently through the air, and thou shalt see +A multitude before thee seated, each +Along the shelving grot." Then more than erst +I op'd my eyes, before me view'd, and saw +Shadows with garments dark as was the rock; +And when we pass'd a little forth, I heard +A crying, "Blessed Mary! pray for us, +Michael and Peter! all ye saintly host!" + +I do not think there walks on earth this day +Man so remorseless, that he hath not yearn'd +With pity at the sight that next I saw. +Mine eyes a load of sorrow teemed, when now +I stood so near them, that their semblances +Came clearly to my view. Of sackcloth vile +Their cov'ring seem'd; and on his shoulder one +Did stay another, leaning, and all lean'd +Against the cliff. E'en thus the blind and poor, +Near the confessionals, to crave an alms, +Stand, each his head upon his fellow's sunk, + +So most to stir compassion, not by sound +Of words alone, but that, which moves not less, +The sight of mis'ry. And as never beam +Of noonday visiteth the eyeless man, +E'en so was heav'n a niggard unto these +Of his fair light; for, through the orbs of all, +A thread of wire, impiercing, knits them up, +As for the taming of a haggard hawk. + +It were a wrong, methought, to pass and look +On others, yet myself the while unseen. +To my sage counsel therefore did I turn. +He knew the meaning of the mute appeal, +Nor waited for my questioning, but said: +"Speak; and be brief, be subtle in thy words." + +On that part of the cornice, whence no rim +Engarlands its steep fall, did Virgil come; +On the' other side me were the spirits, their cheeks +Bathing devout with penitential tears, +That through the dread impalement forc'd a way. + +I turn'd me to them, and "O shades!" said I, + +"Assur'd that to your eyes unveil'd shall shine +The lofty light, sole object of your wish, +So may heaven's grace clear whatsoe'er of foam +Floats turbid on the conscience, that thenceforth +The stream of mind roll limpid from its source, +As ye declare (for so shall ye impart +A boon I dearly prize) if any soul +Of Latium dwell among ye; and perchance +That soul may profit, if I learn so much." + +"My brother, we are each one citizens +Of one true city. Any thou wouldst say, +Who lived a stranger in Italia's land." + +So heard I answering, as appeal'd, a voice +That onward came some space from whence I stood. + +A spirit I noted, in whose look was mark'd +Expectance. Ask ye how? The chin was rais'd +As in one reft of sight. "Spirit," said I, +"Who for thy rise are tutoring (if thou be +That which didst answer to me,) or by place +Or name, disclose thyself, that I may know thee." + +"I was," it answer'd, "of Sienna: here +I cleanse away with these the evil life, +Soliciting with tears that He, who is, +Vouchsafe him to us. Though Sapia nam'd +In sapience I excell'd not, gladder far +Of others' hurt, than of the good befell me. +That thou mayst own I now deceive thee not, +Hear, if my folly were not as I speak it. +When now my years slop'd waning down the arch, +It so bechanc'd, my fellow citizens +Near Colle met their enemies in the field, +And I pray'd God to grant what He had will'd. +There were they vanquish'd, and betook themselves +Unto the bitter passages of flight. +I mark'd the hunt, and waxing out of bounds +In gladness, lifted up my shameless brow, +And like the merlin cheated by a gleam, +Cried, "It is over. Heav'n! fear thee not." +Upon my verge of life I wish'd for peace +With God; nor repentance had supplied +What I did lack of duty, were it not +The hermit Piero, touch'd with charity, +In his devout orisons thought on me. +"But who art thou that question'st of our state, +Who go'st to my belief, with lids unclos'd, +And breathest in thy talk?"--"Mine eyes," said I, +"May yet be here ta'en from me; but not long; +For they have not offended grievously +With envious glances. But the woe beneath +Urges my soul with more exceeding dread. +That nether load already weighs me down." + +She thus: "Who then amongst us here aloft +Hath brought thee, if thou weenest to return?" + +"He," answer'd I, "who standeth mute beside me. +I live: of me ask therefore, chosen spirit, +If thou desire I yonder yet should move +For thee my mortal feet."--"Oh!" she replied, +"This is so strange a thing, it is great sign +That God doth love thee. Therefore with thy prayer +Sometime assist me: and by that I crave, +Which most thou covetest, that if thy feet +E'er tread on Tuscan soil, thou save my fame +Amongst my kindred. Them shalt thou behold +With that vain multitude, who set their hope +On Telamone's haven, there to fail +Confounded, more shall when the fancied stream +They sought of Dian call'd: but they who lead +Their navies, more than ruin'd hopes shall mourn." + + + + +CANTO XIV + +"Say who is he around our mountain winds, +Or ever death has prun'd his wing for flight, +That opes his eyes and covers them at will?" + +"I know not who he is, but know thus much +He comes not singly. Do thou ask of him, +For thou art nearer to him, and take heed +Accost him gently, so that he may speak." + +Thus on the right two Spirits bending each +Toward the other, talk'd of me, then both +Addressing me, their faces backward lean'd, +And thus the one began: "O soul, who yet +Pent in the body, tendest towards the sky! +For charity, we pray thee' comfort us, +Recounting whence thou com'st, and who thou art: +For thou dost make us at the favour shown thee +Marvel, as at a thing that ne'er hath been." + +"There stretches through the midst of Tuscany," +I straight began: "a brooklet, whose well-head +Springs up in Falterona, with his race +Not satisfied, when he some hundred miles +Hath measur'd. From his banks bring, I this frame. +To tell you who I am were words misspent: +For yet my name scarce sounds on rumour's lip." + +"If well I do incorp'rate with my thought +The meaning of thy speech," said he, who first +Addrest me, "thou dost speak of Arno's wave." + +To whom the other: "Why hath he conceal'd +The title of that river, as a man +Doth of some horrible thing?" The spirit, who +Thereof was question'd, did acquit him thus: +"I know not: but 'tis fitting well the name +Should perish of that vale; for from the source +Where teems so plenteously the Alpine steep +Maim'd of Pelorus, (that doth scarcely pass +Beyond that limit,) even to the point +Whereunto ocean is restor'd, what heaven +Drains from th' exhaustless store for all earth's streams, +Throughout the space is virtue worried down, +As 'twere a snake, by all, for mortal foe, +Or through disastrous influence on the place, +Or else distortion of misguided wills, +That custom goads to evil: whence in those, +The dwellers in that miserable vale, +Nature is so transform'd, it seems as they +Had shar'd of Circe's feeding. 'Midst brute swine, +Worthier of acorns than of other food +Created for man's use, he shapeth first +His obscure way; then, sloping onward, finds +Curs, snarlers more in spite than power, from whom +He turns with scorn aside: still journeying down, +By how much more the curst and luckless foss +Swells out to largeness, e'en so much it finds +Dogs turning into wolves. Descending still +Through yet more hollow eddies, next he meets +A race of foxes, so replete with craft, +They do not fear that skill can master it. +Nor will I cease because my words are heard +By other ears than thine. It shall be well +For this man, if he keep in memory +What from no erring Spirit I reveal. +Lo! behold thy grandson, that becomes +A hunter of those wolves, upon the shore +Of the fierce stream, and cows them all with dread: +Their flesh yet living sets he up to sale, +Then like an aged beast to slaughter dooms. +Many of life he reaves, himself of worth +And goodly estimation. Smear'd with gore +Mark how he issues from the rueful wood, +Leaving such havoc, that in thousand years +It spreads not to prime lustihood again." + +As one, who tidings hears of woe to come, +Changes his looks perturb'd, from whate'er part +The peril grasp him, so beheld I change +That spirit, who had turn'd to listen, struck +With sadness, soon as he had caught the word. + +His visage and the other's speech did raise +Desire in me to know the names of both, +whereof with meek entreaty I inquir'd. + +The shade, who late addrest me, thus resum'd: +"Thy wish imports that I vouchsafe to do +For thy sake what thou wilt not do for mine. +But since God's will is that so largely shine +His grace in thee, I will be liberal too. +Guido of Duca know then that I am. +Envy so parch'd my blood, that had I seen +A fellow man made joyous, thou hadst mark'd +A livid paleness overspread my cheek. +Such harvest reap I of the seed I sow'd. +O man, why place thy heart where there doth need +Exclusion of participants in good? +This is Rinieri's spirit, this the boast +And honour of the house of Calboli, +Where of his worth no heritage remains. +Nor his the only blood, that hath been stript +('twixt Po, the mount, the Reno, and the shore,) +Of all that truth or fancy asks for bliss; +But in those limits such a growth has sprung +Of rank and venom'd roots, as long would mock +Slow culture's toil. Where is good Liziohere +Manardi, Traversalo, and Carpigna? +O bastard slips of old Romagna's line! +When in Bologna the low artisan, +And in Faenza yon Bernardin sprouts, +A gentle cyon from ignoble stem. +Wonder not, Tuscan, if thou see me weep, +When I recall to mind those once lov'd names, +Guido of Prata, and of Azzo him +That dwelt with you; Tignoso and his troop, +With Traversaro's house and Anastagio's, +(Each race disherited) and beside these, +The ladies and the knights, the toils and ease, +That witch'd us into love and courtesy; +Where now such malice reigns in recreant hearts. +O Brettinoro! wherefore tarriest still, +Since forth of thee thy family hath gone, +And many, hating evil, join'd their steps? +Well doeth he, that bids his lineage cease, +Bagnacavallo; Castracaro ill, +And Conio worse, who care to propagate +A race of Counties from such blood as theirs. +Well shall ye also do, Pagani, then +When from amongst you tries your demon child. +Not so, howe'er, that henceforth there remain +True proof of what ye were. O Hugolin! +Thou sprung of Fantolini's line! thy name +Is safe, since none is look'd for after thee +To cloud its lustre, warping from thy stock. +But, Tuscan, go thy ways; for now I take +Far more delight in weeping than in words. +Such pity for your sakes hath wrung my heart." + +We knew those gentle spirits at parting heard +Our steps. Their silence therefore of our way +Assur'd us. Soon as we had quitted them, +Advancing onward, lo! a voice that seem'd +Like vollied light'ning, when it rives the air, +Met us, and shouted, "Whosoever finds +Will slay me," then fled from us, as the bolt +Lanc'd sudden from a downward-rushing cloud. +When it had giv'n short truce unto our hearing, +Behold the other with a crash as loud +As the quick-following thunder: "Mark in me +Aglauros turn'd to rock." I at the sound +Retreating drew more closely to my guide. + +Now in mute stillness rested all the air: +And thus he spake: "There was the galling bit. +But your old enemy so baits his hook, +He drags you eager to him. Hence nor curb +Avails you, nor reclaiming call. Heav'n calls +And round about you wheeling courts your gaze +With everlasting beauties. Yet your eye +Turns with fond doting still upon the earth. +Therefore He smites you who discerneth all." + + + + +CANTO XV + +As much as 'twixt the third hour's close and dawn, +Appeareth of heav'n's sphere, that ever whirls +As restless as an infant in his play, +So much appear'd remaining to the sun +Of his slope journey towards the western goal. + +Evening was there, and here the noon of night; +and full upon our forehead smote the beams. +For round the mountain, circling, so our path +Had led us, that toward the sun-set now +Direct we journey'd: when I felt a weight +Of more exceeding splendour, than before, +Press on my front. The cause unknown, amaze +Possess'd me, and both hands against my brow +Lifting, I interpos'd them, as a screen, +That of its gorgeous superflux of light +Clipp'd the diminish'd orb. As when the ray, +Striking On water or the surface clear +Of mirror, leaps unto the opposite part, +Ascending at a glance, e'en as it fell, +(And so much differs from the stone, that falls +Through equal space, as practice skill hath shown); +Thus with refracted light before me seemed +The ground there smitten; whence in sudden haste +My sight recoil'd. "What is this, sire belov'd! +'Gainst which I strive to shield the sight in vain?" +Cried I, "and which towards us moving seems?" + +"Marvel not, if the family of heav'n," +He answer'd, "yet with dazzling radiance dim +Thy sense it is a messenger who comes, +Inviting man's ascent. Such sights ere long, +Not grievous, shall impart to thee delight, +As thy perception is by nature wrought +Up to their pitch." The blessed angel, soon +As we had reach'd him, hail'd us with glad voice: +"Here enter on a ladder far less steep +Than ye have yet encounter'd." We forthwith +Ascending, heard behind us chanted sweet, +"Blessed the merciful," and "happy thou! +That conquer'st." Lonely each, my guide and I +Pursued our upward way; and as we went, +Some profit from his words I hop'd to win, +And thus of him inquiring, fram'd my speech: + +"What meant Romagna's spirit, when he spake +Of bliss exclusive with no partner shar'd?" + +He straight replied: "No wonder, since he knows, +What sorrow waits on his own worst defect, +If he chide others, that they less may mourn. +Because ye point your wishes at a mark, +Where, by communion of possessors, part +Is lessen'd, envy bloweth up the sighs of men. +No fear of that might touch ye, if the love +Of higher sphere exalted your desire. +For there, by how much more they call it ours, +So much propriety of each in good +Increases more, and heighten'd charity +Wraps that fair cloister in a brighter flame." + +"Now lack I satisfaction more," said I, +"Than if thou hadst been silent at the first, +And doubt more gathers on my lab'ring thought. +How can it chance, that good distributed, +The many, that possess it, makes more rich, +Than if 't were shar'd by few?" He answering thus: +"Thy mind, reverting still to things of earth, +Strikes darkness from true light. The highest good +Unlimited, ineffable, doth so speed +To love, as beam to lucid body darts, +Giving as much of ardour as it finds. +The sempiternal effluence streams abroad +Spreading, wherever charity extends. +So that the more aspirants to that bliss +Are multiplied, more good is there to love, +And more is lov'd; as mirrors, that reflect, +Each unto other, propagated light. +If these my words avail not to allay +Thy thirsting, Beatrice thou shalt see, +Who of this want, and of all else thou hast, +Shall rid thee to the full. Provide but thou +That from thy temples may be soon eras'd, +E'en as the two already, those five scars, +That when they pain thee worst, then kindliest heal," + +"Thou," I had said, "content'st me," when I saw +The other round was gain'd, and wond'ring eyes +Did keep me mute. There suddenly I seem'd +By an ecstatic vision wrapt away; +And in a temple saw, methought, a crowd +Of many persons; and at th' entrance stood +A dame, whose sweet demeanour did express +A mother's love, who said, "Child! why hast thou +Dealt with us thus? Behold thy sire and I +Sorrowing have sought thee;" and so held her peace, +And straight the vision fled. A female next +Appear'd before me, down whose visage cours'd +Those waters, that grief forces out from one +By deep resentment stung, who seem'd to say: +"If thou, Pisistratus, be lord indeed +Over this city, nam'd with such debate +Of adverse gods, and whence each science sparkles, +Avenge thee of those arms, whose bold embrace +Hath clasp'd our daughter; "and to fuel, meseem'd, +Benign and meek, with visage undisturb'd, +Her sovran spake: "How shall we those requite, +Who wish us evil, if we thus condemn +The man that loves us?" After that I saw +A multitude, in fury burning, slay +With stones a stripling youth, and shout amain +"Destroy, destroy:" and him I saw, who bow'd +Heavy with death unto the ground, yet made +His eyes, unfolded upward, gates to heav'n, + +Praying forgiveness of th' Almighty Sire, +Amidst that cruel conflict, on his foes, +With looks, that With compassion to their aim. + +Soon as my spirit, from her airy flight +Returning, sought again the things, whose truth +Depends not on her shaping, I observ'd +How she had rov'd to no unreal scenes + +Meanwhile the leader, who might see I mov'd, +As one, who struggles to shake off his sleep, +Exclaim'd: "What ails thee, that thou canst not hold +Thy footing firm, but more than half a league +Hast travel'd with clos'd eyes and tott'ring gait, +Like to a man by wine or sleep o'ercharg'd?" + +"Beloved father! so thou deign," said I, +"To listen, I will tell thee what appear'd +Before me, when so fail'd my sinking steps." + +He thus: "Not if thy Countenance were mask'd +With hundred vizards, could a thought of thine +How small soe'er, elude me. What thou saw'st +Was shown, that freely thou mightst ope thy heart +To the waters of peace, that flow diffus'd +From their eternal fountain. I not ask'd, +What ails theeor such cause as he doth, who +Looks only with that eye which sees no more, +When spiritless the body lies; but ask'd, +To give fresh vigour to thy foot. Such goads +The slow and loit'ring need; that they be found +Not wanting, when their hour of watch returns." + +So on we journey'd through the evening sky +Gazing intent, far onward, as our eyes +With level view could stretch against the bright +Vespertine ray: and lo! by slow degrees +Gath'ring, a fog made tow'rds us, dark as night. +There was no room for 'scaping; and that mist +Bereft us, both of sight and the pure air. + + + + +CANTO XVI + +Hell's dunnest gloom, or night unlustrous, dark, +Of every planes 'reft, and pall'd in clouds, +Did never spread before the sight a veil +In thickness like that fog, nor to the sense +So palpable and gross. Ent'ring its shade, +Mine eye endured not with unclosed lids; +Which marking, near me drew the faithful guide, +Offering me his shoulder for a stay. + +As the blind man behind his leader walks, +Lest he should err, or stumble unawares +On what might harm him, or perhaps destroy, +I journey'd through that bitter air and foul, +Still list'ning to my escort's warning voice, +"Look that from me thou part not." Straight I heard +Voices, and each one seem'd to pray for peace, +And for compassion, to the Lamb of God +That taketh sins away. Their prelude still +Was "Agnus Dei," and through all the choir, +One voice, one measure ran, that perfect seem'd +The concord of their song. "Are these I hear +Spirits, O master?" I exclaim'd; and he: +"Thou aim'st aright: these loose the bonds of wrath." + +"Now who art thou, that through our smoke dost cleave? +And speak'st of us, as thou thyself e'en yet +Dividest time by calends?" So one voice +Bespake me; whence my master said: "Reply; +And ask, if upward hence the passage lead." + +"O being! who dost make thee pure, to stand +Beautiful once more in thy Maker's sight! +Along with me: and thou shalt hear and wonder." +Thus I, whereto the spirit answering spake: + +"Long as 't is lawful for me, shall my steps +Follow on thine; and since the cloudy smoke +Forbids the seeing, hearing in its stead +Shall keep us join'd." I then forthwith began +"Yet in my mortal swathing, I ascend +To higher regions, and am hither come +Through the fearful agony of hell. +And, if so largely God hath doled his grace, +That, clean beside all modern precedent, +He wills me to behold his kingly state, +From me conceal not who thou wast, ere death +Had loos'd thee; but instruct me: and instruct +If rightly to the pass I tend; thy words +The way directing as a safe escort." + +"I was of Lombardy, and Marco call'd: +Not inexperienc'd of the world, that worth +I still affected, from which all have turn'd +The nerveless bow aside. Thy course tends right +Unto the summit:" and, replying thus, +He added, "I beseech thee pray for me, +When thou shalt come aloft." And I to him: +"Accept my faith for pledge I will perform +What thou requirest. Yet one doubt remains, +That wrings me sorely, if I solve it not, +Singly before it urg'd me, doubled now +By thine opinion, when I couple that +With one elsewhere declar'd, each strength'ning other. +The world indeed is even so forlorn +Of all good as thou speak'st it and so swarms +With every evil. Yet, beseech thee, point +The cause out to me, that myself may see, +And unto others show it: for in heaven +One places it, and one on earth below." + +Then heaving forth a deep and audible sigh, +"Brother!" he thus began, "the world is blind; +And thou in truth com'st from it. Ye, who live, +Do so each cause refer to heav'n above, +E'en as its motion of necessity +Drew with it all that moves. If this were so, +Free choice in you were none; nor justice would +There should be joy for virtue, woe for ill. +Your movements have their primal bent from heaven; +Not all; yet said I all; what then ensues? +Light have ye still to follow evil or good, +And of the will free power, which, if it stand +Firm and unwearied in Heav'n's first assay, +Conquers at last, so it be cherish'd well, +Triumphant over all. To mightier force, +To better nature subject, ye abide +Free, not constrain'd by that, which forms in you +The reasoning mind uninfluenc'd of the stars. +If then the present race of mankind err, +Seek in yourselves the cause, and find it there. +Herein thou shalt confess me no false spy. + +"Forth from his plastic hand, who charm'd beholds +Her image ere she yet exist, the soul +Comes like a babe, that wantons sportively +Weeping and laughing in its wayward moods, +As artless and as ignorant of aught, +Save that her Maker being one who dwells +With gladness ever, willingly she turns +To whate'er yields her joy. Of some slight good +The flavour soon she tastes; and, snar'd by that, +With fondness she pursues it, if no guide +Recall, no rein direct her wand'ring course. +Hence it behov'd, the law should be a curb; +A sovereign hence behov'd, whose piercing view +Might mark at least the fortress and main tower +Of the true city. Laws indeed there are: +But who is he observes them? None; not he, +Who goes before, the shepherd of the flock, +Who chews the cud but doth not cleave the hoof. +Therefore the multitude, who see their guide +Strike at the very good they covet most, +Feed there and look no further. Thus the cause +Is not corrupted nature in yourselves, +But ill-conducting, that hath turn'd the world +To evil. Rome, that turn'd it unto good, +Was wont to boast two suns, whose several beams +Cast light on either way, the world's and God's. +One since hath quench'd the other; and the sword +Is grafted on the crook; and so conjoin'd +Each must perforce decline to worse, unaw'd +By fear of other. If thou doubt me, mark +The blade: each herb is judg'd of by its seed. +That land, through which Adice and the Po +Their waters roll, was once the residence +Of courtesy and velour, ere the day, +That frown'd on Frederick; now secure may pass +Those limits, whosoe'er hath left, for shame, +To talk with good men, or come near their haunts. +Three aged ones are still found there, in whom +The old time chides the new: these deem it long +Ere God restore them to a better world: +The good Gherardo, of Palazzo he +Conrad, and Guido of Castello, nam'd +In Gallic phrase more fitly the plain Lombard. +On this at last conclude. The church of Rome, +Mixing two governments that ill assort, +Hath miss'd her footing, fall'n into the mire, +And there herself and burden much defil'd." + +"O Marco!" I replied, shine arguments +Convince me: and the cause I now discern +Why of the heritage no portion came +To Levi's offspring. But resolve me this +Who that Gherardo is, that as thou sayst +Is left a sample of the perish'd race, +And for rebuke to this untoward age?" + +"Either thy words," said he, "deceive; or else +Are meant to try me; that thou, speaking Tuscan, +Appear'st not to have heard of good Gherado; +The sole addition that, by which I know him; +Unless I borrow'd from his daughter Gaia +Another name to grace him. God be with you. +I bear you company no more. Behold +The dawn with white ray glimm'ring through the mist. +I must away--the angel comes--ere he +Appear." He said, and would not hear me more. + + + + +CANTO XVII + +Call to remembrance, reader, if thou e'er +Hast, on a mountain top, been ta'en by cloud, +Through which thou saw'st no better, than the mole +Doth through opacous membrane; then, whene'er +The wat'ry vapours dense began to melt +Into thin air, how faintly the sun's sphere +Seem'd wading through them; so thy nimble thought +May image, how at first I re-beheld +The sun, that bedward now his couch o'erhung. + +Thus with my leader's feet still equaling pace +From forth that cloud I came, when now expir'd +The parting beams from off the nether shores. + +O quick and forgetive power! that sometimes dost +So rob us of ourselves, we take no mark +Though round about us thousand trumpets clang! +What moves thee, if the senses stir not? Light +Kindled in heav'n, spontaneous, self-inform'd, +Or likelier gliding down with swift illapse +By will divine. Portray'd before me came +The traces of her dire impiety, +Whose form was chang'd into the bird, that most +Delights itself in song: and here my mind +Was inwardly so wrapt, it gave no place +To aught that ask'd admittance from without. + +Next shower'd into my fantasy a shape +As of one crucified, whose visage spake +Fell rancour, malice deep, wherein he died; +And round him Ahasuerus the great king, +Esther his bride, and Mordecai the just, +Blameless in word and deed. As of itself +That unsubstantial coinage of the brain +Burst, like a bubble, Which the water fails +That fed it; in my vision straight uprose +A damsel weeping loud, and cried, "O queen! +O mother! wherefore has intemperate ire +Driv'n thee to loath thy being? Not to lose +Lavinia, desp'rate thou hast slain thyself. +Now hast thou lost me. I am she, whose tears +Mourn, ere I fall, a mother's timeless end." + +E'en as a sleep breaks off, if suddenly +New radiance strike upon the closed lids, +The broken slumber quivering ere it dies; +Thus from before me sunk that imagery +Vanishing, soon as on my face there struck +The light, outshining far our earthly beam. +As round I turn'd me to survey what place +I had arriv'd at, "Here ye mount," exclaim'd +A voice, that other purpose left me none, +Save will so eager to behold who spake, +I could not choose but gaze. As 'fore the sun, +That weighs our vision down, and veils his form +In light transcendent, thus my virtue fail'd +Unequal. "This is Spirit from above, +Who marshals us our upward way, unsought; +And in his own light shrouds him. As a man +Doth for himself, so now is done for us. +For whoso waits imploring, yet sees need +Of his prompt aidance, sets himself prepar'd +For blunt denial, ere the suit be made. +Refuse we not to lend a ready foot +At such inviting: haste we to ascend, +Before it darken: for we may not then, +Till morn again return." So spake my guide; +And to one ladder both address'd our steps; +And the first stair approaching, I perceiv'd +Near me as 'twere the waving of a wing, +That fann'd my face and whisper'd: "Blessed they +The peacemakers: they know not evil wrath." + +Now to such height above our heads were rais'd +The last beams, follow'd close by hooded night, +That many a star on all sides through the gloom +Shone out. "Why partest from me, O my strength?" +So with myself I commun'd; for I felt +My o'ertoil'd sinews slacken. We had reach'd +The summit, and were fix'd like to a bark +Arriv'd at land. And waiting a short space, +If aught should meet mine ear in that new round, +Then to my guide I turn'd, and said: "Lov'd sire! +Declare what guilt is on this circle purg'd. +If our feet rest, no need thy speech should pause." + +He thus to me: "The love of good, whate'er +Wanted of just proportion, here fulfils. +Here plies afresh the oar, that loiter'd ill. +But that thou mayst yet clearlier understand, +Give ear unto my words, and thou shalt cull +Some fruit may please thee well, from this delay. + +"Creator, nor created being, ne'er, +My son," he thus began, "was without love, +Or natural, or the free spirit's growth. +Thou hast not that to learn. The natural still +Is without error; but the other swerves, +If on ill object bent, or through excess +Of vigour, or defect. While e'er it seeks +The primal blessings, or with measure due +Th' inferior, no delight, that flows from it, +Partakes of ill. But let it warp to evil, +Or with more ardour than behooves, or less. +Pursue the good, the thing created then +Works 'gainst its Maker. Hence thou must infer +That love is germin of each virtue in ye, +And of each act no less, that merits pain. +Now since it may not be, but love intend +The welfare mainly of the thing it loves, +All from self-hatred are secure; and since +No being can be thought t' exist apart +And independent of the first, a bar +Of equal force restrains from hating that. + +"Grant the distinction just; and it remains +The' evil must be another's, which is lov'd. +Three ways such love is gender'd in your clay. +There is who hopes (his neighbour's worth deprest,) +Preeminence himself, and coverts hence +For his own greatness that another fall. +There is who so much fears the loss of power, +Fame, favour, glory (should his fellow mount +Above him), and so sickens at the thought, +He loves their opposite: and there is he, +Whom wrong or insult seems to gall and shame +That he doth thirst for vengeance, and such needs +Must doat on other's evil. Here beneath +This threefold love is mourn'd. Of th' other sort +Be now instructed, that which follows good +But with disorder'd and irregular course. + +"All indistinctly apprehend a bliss +On which the soul may rest, the hearts of all +Yearn after it, and to that wished bourn +All therefore strive to tend. If ye behold +Or seek it with a love remiss and lax, +This cornice after just repenting lays +Its penal torment on ye. Other good +There is, where man finds not his happiness: +It is not true fruition, not that blest +Essence, of every good the branch and root. +The love too lavishly bestow'd on this, +Along three circles over us, is mourn'd. +Account of that division tripartite +Expect not, fitter for thine own research." + + + + +CANTO XVIII + +The teacher ended, and his high discourse +Concluding, earnest in my looks inquir'd +If I appear'd content; and I, whom still +Unsated thirst to hear him urg'd, was mute, +Mute outwardly, yet inwardly I said: +"Perchance my too much questioning offends" +But he, true father, mark'd the secret wish +By diffidence restrain'd, and speaking, gave +Me boldness thus to speak: 'Master, my Sight +Gathers so lively virtue from thy beams, +That all, thy words convey, distinct is seen. +Wherefore I pray thee, father, whom this heart +Holds dearest! thou wouldst deign by proof t' unfold +That love, from which as from their source thou bring'st +All good deeds and their opposite.'" He then: +"To what I now disclose be thy clear ken +Directed, and thou plainly shalt behold +How much those blind have err'd, who make themselves +The guides of men. The soul, created apt +To love, moves versatile which way soe'er +Aught pleasing prompts her, soon as she is wak'd +By pleasure into act. Of substance true +Your apprehension forms its counterfeit, +And in you the ideal shape presenting +Attracts the soul's regard. If she, thus drawn, +incline toward it, love is that inclining, +And a new nature knit by pleasure in ye. +Then as the fire points up, and mounting seeks +His birth-place and his lasting seat, e'en thus +Enters the captive soul into desire, +Which is a spiritual motion, that ne'er rests +Before enjoyment of the thing it loves. +Enough to show thee, how the truth from those +Is hidden, who aver all love a thing +Praise-worthy in itself: although perhaps +Its substance seem still good. Yet if the wax +Be good, it follows not th' impression must." +"What love is," I return'd, "thy words, O guide! +And my own docile mind, reveal. Yet thence +New doubts have sprung. For from without if love +Be offer'd to us, and the spirit knows +No other footing, tend she right or wrong, +Is no desert of hers." He answering thus: +"What reason here discovers I have power +To show thee: that which lies beyond, expect +From Beatrice, faith not reason's task. +Spirit, substantial form, with matter join'd +Not in confusion mix'd, hath in itself +Specific virtue of that union born, +Which is not felt except it work, nor prov'd +But through effect, as vegetable life +By the green leaf. From whence his intellect +Deduced its primal notices of things, +Man therefore knows not, or his appetites +Their first affections; such in you, as zeal +In bees to gather honey; at the first, +Volition, meriting nor blame nor praise. +But o'er each lower faculty supreme, +That as she list are summon'd to her bar, +Ye have that virtue in you, whose just voice +Uttereth counsel, and whose word should keep +The threshold of assent. Here is the source, +Whence cause of merit in you is deriv'd, +E'en as the affections good or ill she takes, +Or severs, winnow'd as the chaff. Those men +Who reas'ning went to depth profoundest, mark'd +That innate freedom, and were thence induc'd +To leave their moral teaching to the world. +Grant then, that from necessity arise +All love that glows within you; to dismiss +Or harbour it, the pow'r is in yourselves. +Remember, Beatrice, in her style, +Denominates free choice by eminence +The noble virtue, if in talk with thee +She touch upon that theme." The moon, well nigh +To midnight hour belated, made the stars +Appear to wink and fade; and her broad disk +Seem'd like a crag on fire, as up the vault +That course she journey'd, which the sun then warms, +When they of Rome behold him at his set. +Betwixt Sardinia and the Corsic isle. +And now the weight, that hung upon my thought, +Was lighten'd by the aid of that clear spirit, +Who raiseth Andes above Mantua's name. +I therefore, when my questions had obtain'd +Solution plain and ample, stood as one +Musing in dreary slumber; but not long +Slumber'd; for suddenly a multitude, + +The steep already turning, from behind, +Rush'd on. With fury and like random rout, +As echoing on their shores at midnight heard +Ismenus and Asopus, for his Thebes +If Bacchus' help were needed; so came these +Tumultuous, curving each his rapid step, +By eagerness impell'd of holy love. + +Soon they o'ertook us; with such swiftness mov'd +The mighty crowd. Two spirits at their head +Cried weeping; "Blessed Mary sought with haste +The hilly region. Caesar to subdue +Ilerda, darted in Marseilles his sting, +And flew to Spain."--"Oh tarry not: away;" +The others shouted; "let not time be lost +Through slackness of affection. Hearty zeal +To serve reanimates celestial grace." + +"O ye, in whom intenser fervency +Haply supplies, where lukewarm erst ye fail'd, +Slow or neglectful, to absolve your part +Of good and virtuous, this man, who yet lives, +(Credit my tale, though strange) desires t' ascend, +So morning rise to light us. Therefore say +Which hand leads nearest to the rifted rock?" + +So spake my guide, to whom a shade return'd: +"Come after us, and thou shalt find the cleft. +We may not linger: such resistless will +Speeds our unwearied course. Vouchsafe us then +Thy pardon, if our duty seem to thee +Discourteous rudeness. In Verona I +Was abbot of San Zeno, when the hand +Of Barbarossa grasp'd Imperial sway, +That name, ne'er utter'd without tears in Milan. +And there is he, hath one foot in his grave, +Who for that monastery ere long shall weep, +Ruing his power misus'd: for that his son, +Of body ill compact, and worse in mind, +And born in evil, he hath set in place +Of its true pastor." Whether more he spake, +Or here was mute, I know not: he had sped +E'en now so far beyond us. Yet thus much +I heard, and in rememb'rance treasur'd it. + +He then, who never fail'd me at my need, +Cried, "Hither turn. Lo! two with sharp remorse +Chiding their sin!" In rear of all the troop +These shouted: "First they died, to whom the sea +Open'd, or ever Jordan saw his heirs: +And they, who with Aeneas to the end +Endur'd not suffering, for their portion chose +Life without glory." Soon as they had fled +Past reach of sight, new thought within me rose +By others follow'd fast, and each unlike +Its fellow: till led on from thought to thought, +And pleasur'd with the fleeting train, mine eye +Was clos'd, and meditation chang'd to dream. + + + + +CANTO XIX + +It was the hour, when of diurnal heat +No reliques chafe the cold beams of the moon, +O'erpower'd by earth, or planetary sway +Of Saturn; and the geomancer sees +His Greater Fortune up the east ascend, +Where gray dawn checkers first the shadowy cone; +When 'fore me in my dream a woman's shape +There came, with lips that stammer'd, eyes aslant, +Distorted feet, hands maim'd, and colour pale. + +I look'd upon her; and as sunshine cheers +Limbs numb'd by nightly cold, e'en thus my look +Unloos'd her tongue, next in brief space her form +Decrepit rais'd erect, and faded face +With love's own hue illum'd. Recov'ring speech +She forthwith warbling such a strain began, +That I, how loth soe'er, could scarce have held +Attention from the song. "I," thus she sang, +"I am the Siren, she, whom mariners +On the wide sea are wilder'd when they hear: +Such fulness of delight the list'ner feels. +I from his course Ulysses by my lay +Enchanted drew. Whoe'er frequents me once +Parts seldom; so I charm him, and his heart +Contented knows no void." Or ere her mouth +Was clos'd, to shame her at her side appear'd +A dame of semblance holy. With stern voice +She utter'd; "Say, O Virgil, who is this?" +Which hearing, he approach'd, with eyes still bent +Toward that goodly presence: th' other seiz'd her, +And, her robes tearing, open'd her before, +And show'd the belly to me, whence a smell, +Exhaling loathsome, wak'd me. Round I turn'd +Mine eyes, and thus the teacher: "At the least +Three times my voice hath call'd thee. Rise, begone. +Let us the opening find where thou mayst pass." + +I straightway rose. Now day, pour'd down from high, +Fill'd all the circuits of the sacred mount; +And, as we journey'd, on our shoulder smote +The early ray. I follow'd, stooping low +My forehead, as a man, o'ercharg'd with thought, +Who bends him to the likeness of an arch, +That midway spans the flood; when thus I heard, +"Come, enter here," in tone so soft and mild, +As never met the ear on mortal strand. + +With swan-like wings dispread and pointing up, +Who thus had spoken marshal'd us along, +Where each side of the solid masonry +The sloping, walls retir'd; then mov'd his plumes, +And fanning us, affirm'd that those, who mourn, +Are blessed, for that comfort shall be theirs. + +"What aileth thee, that still thou look'st to earth?" +Began my leader; while th' angelic shape +A little over us his station took. + +"New vision," I replied, "hath rais'd in me +Surmisings strange and anxious doubts, whereon +My soul intent allows no other thought +Or room or entrance."--"Hast thou seen," said he, +"That old enchantress, her, whose wiles alone +The spirits o'er us weep for? Hast thou seen +How man may free him of her bonds? Enough. +Let thy heels spurn the earth, and thy rais'd ken +Fix on the lure, which heav'n's eternal King +Whirls in the rolling spheres." As on his feet +The falcon first looks down, then to the sky +Turns, and forth stretches eager for the food, +That woos him thither; so the call I heard, +So onward, far as the dividing rock +Gave way, I journey'd, till the plain was reach'd. + +On the fifth circle when I stood at large, +A race appear'd before me, on the ground +All downward lying prone and weeping sore. +"My soul hath cleaved to the dust," I heard +With sighs so deep, they well nigh choak'd the words. +"O ye elect of God, whose penal woes +Both hope and justice mitigate, direct +Tow'rds the steep rising our uncertain way." + +"If ye approach secure from this our doom, +Prostration--and would urge your course with speed, +See that ye still to rightward keep the brink." + +So them the bard besought; and such the words, +Beyond us some short space, in answer came. + +I noted what remain'd yet hidden from them: +Thence to my liege's eyes mine eyes I bent, +And he, forthwith interpreting their suit, +Beckon'd his glad assent. Free then to act, +As pleas'd me, I drew near, and took my stand +O`er that shade, whose words I late had mark'd. +And, "Spirit!" I said, "in whom repentant tears +Mature that blessed hour, when thou with God +Shalt find acceptance, for a while suspend +For me that mightier care. Say who thou wast, +Why thus ye grovel on your bellies prone, +And if in aught ye wish my service there, +Whence living I am come." He answering spake +"The cause why Heav'n our back toward his cope +Reverses, shalt thou know: but me know first +The successor of Peter, and the name +And title of my lineage from that stream, +That' twixt Chiaveri and Siestri draws +His limpid waters through the lowly glen. +A month and little more by proof I learnt, +With what a weight that robe of sov'reignty +Upon his shoulder rests, who from the mire +Would guard it: that each other fardel seems +But feathers in the balance. Late, alas! +Was my conversion: but when I became +Rome's pastor, I discern'd at once the dream +And cozenage of life, saw that the heart +Rested not there, and yet no prouder height +Lur'd on the climber: wherefore, of that life +No more enamour'd, in my bosom love +Of purer being kindled. For till then +I was a soul in misery, alienate +From God, and covetous of all earthly things; +Now, as thou seest, here punish'd for my doting. +Such cleansing from the taint of avarice +Do spirits converted need. This mount inflicts +No direr penalty. E'en as our eyes +Fasten'd below, nor e'er to loftier clime +Were lifted, thus hath justice level'd us +Here on the earth. As avarice quench'd our love +Of good, without which is no working, thus +Here justice holds us prison'd, hand and foot +Chain'd down and bound, while heaven's just Lord shall please. +So long to tarry motionless outstretch'd." + +My knees I stoop'd, and would have spoke; but he, +Ere my beginning, by his ear perceiv'd +I did him reverence; and "What cause," said he, +"Hath bow'd thee thus!"--"Compunction," I rejoin'd. +"And inward awe of your high dignity." + +"Up," he exclaim'd, "brother! upon thy feet +Arise: err not: thy fellow servant I, +(Thine and all others') of one Sovran Power. +If thou hast ever mark'd those holy sounds +Of gospel truth, 'nor shall be given ill marriage,' +Thou mayst discern the reasons of my speech. +Go thy ways now; and linger here no more. +Thy tarrying is a let unto the tears, +With which I hasten that whereof thou spak'st. +I have on earth a kinswoman; her name +Alagia, worthy in herself, so ill +Example of our house corrupt her not: +And she is all remaineth of me there." + + + + +CANTO XX + +Ill strives the will, 'gainst will more wise that strives +His pleasure therefore to mine own preferr'd, +I drew the sponge yet thirsty from the wave. + +Onward I mov'd: he also onward mov'd, +Who led me, coasting still, wherever place +Along the rock was vacant, as a man +Walks near the battlements on narrow wall. +For those on th' other part, who drop by drop +Wring out their all-infecting malady, +Too closely press the verge. Accurst be thou! +Inveterate wolf! whose gorge ingluts more prey, +Than every beast beside, yet is not fill'd! +So bottomless thy maw!--Ye spheres of heaven! +To whom there are, as seems, who attribute +All change in mortal state, when is the day +Of his appearing, for whom fate reserves +To chase her hence?--With wary steps and slow +We pass'd; and I attentive to the shades, +Whom piteously I heard lament and wail; + +And, 'midst the wailing, one before us heard +Cry out "O blessed Virgin!" as a dame +In the sharp pangs of childbed; and "How poor +Thou wast," it added, "witness that low roof +Where thou didst lay thy sacred burden down. +O good Fabricius! thou didst virtue choose +With poverty, before great wealth with vice." + +The words so pleas'd me, that desire to know +The spirit, from whose lip they seem'd to come, +Did draw me onward. Yet it spake the gift +Of Nicholas, which on the maidens he +Bounteous bestow'd, to save their youthful prime +Unblemish'd. "Spirit! who dost speak of deeds +So worthy, tell me who thou was," I said, +"And why thou dost with single voice renew +Memorial of such praise. That boon vouchsaf'd +Haply shall meet reward; if I return +To finish the Short pilgrimage of life, +Still speeding to its close on restless wing." + +"I," answer'd he, "will tell thee, not for hell, +Which thence I look for; but that in thyself +Grace so exceeding shines, before thy time +Of mortal dissolution. I was root +Of that ill plant, whose shade such poison sheds +O'er all the Christian land, that seldom thence +Good fruit is gather'd. Vengeance soon should come, +Had Ghent and Douay, Lille and Bruges power; +And vengeance I of heav'n's great Judge implore. +Hugh Capet was I high: from me descend +The Philips and the Louis, of whom France +Newly is govern'd; born of one, who ply'd +The slaughterer's trade at Paris. When the race +Of ancient kings had vanish'd (all save one +Wrapt up in sable weeds) within my gripe +I found the reins of empire, and such powers +Of new acquirement, with full store of friends, +That soon the widow'd circlet of the crown +Was girt upon the temples of my son, +He, from whose bones th' anointed race begins. +Till the great dower of Provence had remov'd +The stains, that yet obscur'd our lowly blood, +Its sway indeed was narrow, but howe'er +It wrought no evil: there, with force and lies, +Began its rapine; after, for amends, +Poitou it seiz'd, Navarre and Gascony. +To Italy came Charles, and for amends +Young Conradine an innocent victim slew, +And sent th' angelic teacher back to heav'n, +Still for amends. I see the time at hand, +That forth from France invites another Charles +To make himself and kindred better known. +Unarm'd he issues, saving with that lance, +Which the arch-traitor tilted with; and that +He carries with so home a thrust, as rives +The bowels of poor Florence. No increase +Of territory hence, but sin and shame +Shall be his guerdon, and so much the more +As he more lightly deems of such foul wrong. +I see the other, who a prisoner late +Had steps on shore, exposing to the mart +His daughter, whom he bargains for, as do +The Corsairs for their slaves. O avarice! +What canst thou more, who hast subdued our blood +So wholly to thyself, they feel no care +Of their own flesh? To hide with direr guilt +Past ill and future, lo! the flower-de-luce +Enters Alagna! in his Vicar Christ +Himself a captive, and his mockery +Acted again! Lo! to his holy lip +The vinegar and gall once more applied! +And he 'twixt living robbers doom'd to bleed! +Lo! the new Pilate, of whose cruelty +Such violence cannot fill the measure up, +With no degree to sanction, pushes on +Into the temple his yet eager sails! + +"O sovran Master! when shall I rejoice +To see the vengeance, which thy wrath well-pleas'd +In secret silence broods?--While daylight lasts, +So long what thou didst hear of her, sole spouse +Of the Great Spirit, and on which thou turn'dst +To me for comment, is the general theme +Of all our prayers: but when it darkens, then +A different strain we utter, then record +Pygmalion, whom his gluttonous thirst of gold +Made traitor, robber, parricide: the woes +Of Midas, which his greedy wish ensued, +Mark'd for derision to all future times: +And the fond Achan, how he stole the prey, +That yet he seems by Joshua's ire pursued. +Sapphira with her husband next, we blame; +And praise the forefeet, that with furious ramp +Spurn'd Heliodorus. All the mountain round +Rings with the infamy of Thracia's king, +Who slew his Phrygian charge: and last a shout +Ascends: "Declare, O Crassus! for thou know'st, +The flavour of thy gold." The voice of each +Now high now low, as each his impulse prompts, +Is led through many a pitch, acute or grave. +Therefore, not singly, I erewhile rehears'd +That blessedness we tell of in the day: +But near me none beside his accent rais'd." + +From him we now had parted, and essay'd +With utmost efforts to surmount the way, +When I did feel, as nodding to its fall, +The mountain tremble; whence an icy chill +Seiz'd on me, as on one to death convey'd. +So shook not Delos, when Latona there +Couch'd to bring forth the twin-born eyes of heaven. + +Forthwith from every side a shout arose +So vehement, that suddenly my guide +Drew near, and cried: "Doubt not, while I conduct thee." +"Glory!" all shouted (such the sounds mine ear +Gather'd from those, who near me swell'd the sounds) +"Glory in the highest be to God." We stood +Immovably suspended, like to those, +The shepherds, who first heard in Bethlehem's field +That song: till ceas'd the trembling, and the song +Was ended: then our hallow'd path resum'd, +Eying the prostrate shadows, who renew'd +Their custom'd mourning. Never in my breast +Did ignorance so struggle with desire +Of knowledge, if my memory do not err, +As in that moment; nor through haste dar'd I +To question, nor myself could aught discern, +So on I far'd in thoughtfulness and dread. + + + + +CANTO XXI + +The natural thirst, ne'er quench'd but from the well, +Whereof the woman of Samaria crav'd, +Excited: haste along the cumber'd path, +After my guide, impell'd; and pity mov'd +My bosom for the 'vengeful deed, though just. +When lo! even as Luke relates, that Christ +Appear'd unto the two upon their way, +New-risen from his vaulted grave; to us +A shade appear'd, and after us approach'd, +Contemplating the crowd beneath its feet. +We were not ware of it; so first it spake, +Saying, "God give you peace, my brethren!" then +Sudden we turn'd: and Virgil such salute, +As fitted that kind greeting, gave, and cried: +"Peace in the blessed council be thy lot +Awarded by that righteous court, which me +To everlasting banishment exiles!" + +"How!" he exclaim'd, nor from his speed meanwhile +Desisting, "If that ye be spirits, whom God +Vouchsafes not room above, who up the height +Has been thus far your guide?" To whom the bard: +"If thou observe the tokens, which this man +Trac'd by the finger of the angel bears, +'Tis plain that in the kingdom of the just +He needs must share. But sithence she, whose wheel +Spins day and night, for him not yet had drawn +That yarn, which, on the fatal distaff pil'd, +Clotho apportions to each wight that breathes, +His soul, that sister is to mine and thine, +Not of herself could mount, for not like ours +Her ken: whence I, from forth the ample gulf +Of hell was ta'en, to lead him, and will lead +Far as my lore avails. But, if thou know, +Instruct us for what cause, the mount erewhile +Thus shook and trembled: wherefore all at once +Seem'd shouting, even from his wave-wash'd foot." + +That questioning so tallied with my wish, +The thirst did feel abatement of its edge +E'en from expectance. He forthwith replied, +"In its devotion nought irregular +This mount can witness, or by punctual rule +Unsanction'd; here from every change exempt. +Other than that, which heaven in itself +Doth of itself receive, no influence +Can reach us. Tempest none, shower, hail or snow, +Hoar frost or dewy moistness, higher falls +Than that brief scale of threefold steps: thick clouds +Nor scudding rack are ever seen: swift glance +Ne'er lightens, nor Thaumantian Iris gleams, +That yonder often shift on each side heav'n. +Vapour adust doth never mount above +The highest of the trinal stairs, whereon +Peter's vicegerent stands. Lower perchance, +With various motion rock'd, trembles the soil: +But here, through wind in earth's deep hollow pent, +I know not how, yet never trembled: then +Trembles, when any spirit feels itself +So purified, that it may rise, or move +For rising, and such loud acclaim ensues. +Purification by the will alone +Is prov'd, that free to change society +Seizes the soul rejoicing in her will. +Desire of bliss is present from the first; +But strong propension hinders, to that wish +By the just ordinance of heav'n oppos'd; +Propension now as eager to fulfil +Th' allotted torment, as erewhile to sin. +And I who in this punishment had lain +Five hundred years and more, but now have felt +Free wish for happier clime. Therefore thou felt'st +The mountain tremble, and the spirits devout +Heard'st, over all his limits, utter praise +To that liege Lord, whom I entreat their joy +To hasten." Thus he spake: and since the draught +Is grateful ever as the thirst is keen, +No words may speak my fullness of content. + +"Now," said the instructor sage, "I see the net +That takes ye here, and how the toils are loos'd, +Why rocks the mountain and why ye rejoice. +Vouchsafe, that from thy lips I next may learn, +Who on the earth thou wast, and wherefore here +So many an age wert prostrate."--"In that time, +When the good Titus, with Heav'n's King to help, +Aveng'd those piteous gashes, whence the blood +By Judas sold did issue, with the name +Most lasting and most honour'd there was I +Abundantly renown'd," the shade reply'd, +"Not yet with faith endued. So passing sweet +My vocal Spirit, from Tolosa, Rome +To herself drew me, where I merited +A myrtle garland to inwreathe my brow. +Statius they name me still. Of Thebes I sang, +And next of great Achilles: but i' th' way +Fell with the second burthen. Of my flame +Those sparkles were the seeds, which I deriv'd +From the bright fountain of celestial fire +That feeds unnumber'd lamps, the song I mean +Which sounds Aeneas' wand'rings: that the breast +I hung at, that the nurse, from whom my veins +Drank inspiration: whose authority +Was ever sacred with me. To have liv'd +Coeval with the Mantuan, I would bide +The revolution of another sun +Beyond my stated years in banishment." + +The Mantuan, when he heard him, turn'd to me, +And holding silence: by his countenance +Enjoin'd me silence but the power which wills, +Bears not supreme control: laughter and tears +Follow so closely on the passion prompts them, +They wait not for the motions of the will +In natures most sincere. I did but smile, +As one who winks; and thereupon the shade +Broke off, and peer'd into mine eyes, where best +Our looks interpret. "So to good event +Mayst thou conduct such great emprize," he cried, +"Say, why across thy visage beam'd, but now, +The lightning of a smile!" On either part +Now am I straiten'd; one conjures me speak, +Th' other to silence binds me: whence a sigh +I utter, and the sigh is heard. "Speak on;" +The teacher cried; "and do not fear to speak, +But tell him what so earnestly he asks." +Whereon I thus: "Perchance, O ancient spirit! +Thou marvel'st at my smiling. There is room +For yet more wonder. He who guides my ken +On high, he is that Mantuan, led by whom +Thou didst presume of men and gods to sing. +If other cause thou deem'dst for which I smil'd, +Leave it as not the true one; and believe +Those words, thou spak'st of him, indeed the cause." + +Now down he bent t' embrace my teacher's feet; +But he forbade him: "Brother! do it not: +Thou art a shadow, and behold'st a shade." +He rising answer'd thus: "Now hast thou prov'd +The force and ardour of the love I bear thee, +When I forget we are but things of air, +And as a substance treat an empty shade." + + + + +CANTO XXII + +Now we had left the angel, who had turn'd +To the sixth circle our ascending step, +One gash from off my forehead raz'd: while they, +Whose wishes tend to justice, shouted forth: +"Blessed!" and ended with, "I thirst:" and I, +More nimble than along the other straits, +So journey'd, that, without the sense of toil, +I follow'd upward the swift-footed shades; +When Virgil thus began: "Let its pure flame +From virtue flow, and love can never fail +To warm another's bosom' so the light +Shine manifestly forth. Hence from that hour, +When 'mongst us in the purlieus of the deep, +Came down the spirit of Aquinum's hard, +Who told of thine affection, my good will +Hath been for thee of quality as strong +As ever link'd itself to one not seen. +Therefore these stairs will now seem short to me. +But tell me: and if too secure I loose +The rein with a friend's license, as a friend +Forgive me, and speak now as with a friend: +How chanc'd it covetous desire could find +Place in that bosom, 'midst such ample store +Of wisdom, as thy zeal had treasur'd there?" + +First somewhat mov'd to laughter by his words, +Statius replied: "Each syllable of thine +Is a dear pledge of love. Things oft appear +That minister false matters to our doubts, +When their true causes are remov'd from sight. +Thy question doth assure me, thou believ'st +I was on earth a covetous man, perhaps +Because thou found'st me in that circle plac'd. +Know then I was too wide of avarice: +And e'en for that excess, thousands of moons +Have wax'd and wan'd upon my sufferings. +And were it not that I with heedful care +Noted where thou exclaim'st as if in ire +With human nature, 'Why, thou cursed thirst +Of gold! dost not with juster measure guide +The appetite of mortals?' I had met +The fierce encounter of the voluble rock. +Then was I ware that with too ample wing +The hands may haste to lavishment, and turn'd, +As from my other evil, so from this +In penitence. How many from their grave +Shall with shorn locks arise, who living, aye +And at life's last extreme, of this offence, +Through ignorance, did not repent. And know, +The fault which lies direct from any sin +In level opposition, here With that +Wastes its green rankness on one common heap. +Therefore if I have been with those, who wail +Their avarice, to cleanse me, through reverse +Of their transgression, such hath been my lot." + +To whom the sovran of the pastoral song: +"While thou didst sing that cruel warfare wag'd +By the twin sorrow of Jocasta's womb, +From thy discourse with Clio there, it seems +As faith had not been shine: without the which +Good deeds suffice not. And if so, what sun +Rose on thee, or what candle pierc'd the dark +That thou didst after see to hoist the sail, +And follow, where the fisherman had led?" + +He answering thus: "By thee conducted first, +I enter'd the Parnassian grots, and quaff'd +Of the clear spring; illumin'd first by thee +Open'd mine eyes to God. Thou didst, as one, +Who, journeying through the darkness, hears a light +Behind, that profits not himself, but makes +His followers wise, when thou exclaimedst, 'Lo! +A renovated world! Justice return'd! +Times of primeval innocence restor'd! +And a new race descended from above!' +Poet and Christian both to thee I owed. +That thou mayst mark more clearly what I trace, +My hand shall stretch forth to inform the lines +With livelier colouring. Soon o'er all the world, +By messengers from heav'n, the true belief +Teem'd now prolific, and that word of thine +Accordant, to the new instructors chim'd. +Induc'd by which agreement, I was wont +Resort to them; and soon their sanctity +So won upon me, that, Domitian's rage +Pursuing them, I mix'd my tears with theirs, +And, while on earth I stay'd, still succour'd them; +And their most righteous customs made me scorn +All sects besides. Before I led the Greeks +In tuneful fiction, to the streams of Thebes, +I was baptiz'd; but secretly, through fear, +Remain'd a Christian, and conform'd long time +To Pagan rites. Five centuries and more, +T for that lukewarmness was fain to pace +Round the fourth circle. Thou then, who hast rais'd +The covering, which did hide such blessing from me, +Whilst much of this ascent is yet to climb, +Say, if thou know, where our old Terence bides, +Caecilius, Plautus, Varro: if condemn'd +They dwell, and in what province of the deep." +"These," said my guide, "with Persius and myself, +And others many more, are with that Greek, +Of mortals, the most cherish'd by the Nine, +In the first ward of darkness. There ofttimes +We of that mount hold converse, on whose top +For aye our nurses live. We have the bard +Of Pella, and the Teian, Agatho, +Simonides, and many a Grecian else +Ingarlanded with laurel. Of thy train +Antigone is there, Deiphile, +Argia, and as sorrowful as erst +Ismene, and who show'd Langia's wave: +Deidamia with her sisters there, +And blind Tiresias' daughter, and the bride +Sea-born of Peleus." Either poet now +Was silent, and no longer by th' ascent +Or the steep walls obstructed, round them cast +Inquiring eyes. Four handmaids of the day +Had finish'd now their office, and the fifth +Was at the chariot-beam, directing still +Its balmy point aloof, when thus my guide: +"Methinks, it well behooves us to the brink +Bend the right shoulder' circuiting the mount, +As we have ever us'd." So custom there +Was usher to the road, the which we chose +Less doubtful, as that worthy shade complied. + +They on before me went; I sole pursued, +List'ning their speech, that to my thoughts convey'd +Mysterious lessons of sweet poesy. +But soon they ceas'd; for midway of the road +A tree we found, with goodly fruitage hung, +And pleasant to the smell: and as a fir +Upward from bough to bough less ample spreads, +So downward this less ample spread, that none. +Methinks, aloft may climb. Upon the side, +That clos'd our path, a liquid crystal fell +From the steep rock, and through the sprays above +Stream'd showering. With associate step the bards +Drew near the plant; and from amidst the leaves +A voice was heard: "Ye shall be chary of me;" +And after added: "Mary took more thought +For joy and honour of the nuptial feast, +Than for herself who answers now for you. +The women of old Rome were satisfied +With water for their beverage. Daniel fed +On pulse, and wisdom gain'd. The primal age +Was beautiful as gold; and hunger then +Made acorns tasteful, thirst each rivulet +Run nectar. Honey and locusts were the food, +Whereon the Baptist in the wilderness +Fed, and that eminence of glory reach'd +And greatness, which the' Evangelist records." + + + + +CANTO XXIII + +On the green leaf mine eyes were fix'd, like his +Who throws away his days in idle chase +Of the diminutive, when thus I heard +The more than father warn me: "Son! our time +Asks thriftier using. Linger not: away." + +Thereat my face and steps at once I turn'd +Toward the sages, by whose converse cheer'd +I journey'd on, and felt no toil: and lo! +A sound of weeping and a song: "My lips, +O Lord!" and these so mingled, it gave birth +To pleasure and to pain. "O Sire, belov'd! +Say what is this I hear?" Thus I inquir'd. + +"Spirits," said he, "who as they go, perchance, +Their debt of duty pay." As on their road +The thoughtful pilgrims, overtaking some +Not known unto them, turn to them, and look, +But stay not; thus, approaching from behind +With speedier motion, eyed us, as they pass'd, +A crowd of spirits, silent and devout. +The eyes of each were dark and hollow: pale +Their visage, and so lean withal, the bones +Stood staring thro' the skin. I do not think +Thus dry and meagre Erisicthon show'd, +When pinc'ed by sharp-set famine to the quick. + +"Lo!" to myself I mus'd, "the race, who lost +Jerusalem, when Mary with dire beak +Prey'd on her child." The sockets seem'd as rings, +From which the gems were drops. Who reads the name +Of man upon his forehead, there the M +Had trac'd most plainly. Who would deem, that scent +Of water and an apple, could have prov'd +Powerful to generate such pining want, +Not knowing how it wrought? While now I stood +Wond'ring what thus could waste them (for the cause +Of their gaunt hollowness and scaly rind +Appear'd not) lo! a spirit turn'd his eyes +In their deep-sunken cell, and fasten'd then +On me, then cried with vehemence aloud: +"What grace is this vouchsaf'd me?" By his looks +I ne'er had recogniz'd him: but the voice +Brought to my knowledge what his cheer conceal'd. +Remembrance of his alter'd lineaments +Was kindled from that spark; and I agniz'd +The visage of Forese. "Ah! respect +This wan and leprous wither'd skin," thus he +Suppliant implor'd, "this macerated flesh. +Speak to me truly of thyself. And who +Are those twain spirits, that escort thee there? +Be it not said thou Scorn'st to talk with me." + +"That face of thine," I answer'd him, "which dead +I once bewail'd, disposes me not less +For weeping, when I see It thus transform'd. +Say then, by Heav'n, what blasts ye thus? The whilst +I wonder, ask not Speech from me: unapt +Is he to speak, whom other will employs." + +He thus: "The water and tee plant we pass'd, +Virtue possesses, by th' eternal will +Infus'd, the which so pines me. Every spirit, +Whose song bewails his gluttony indulg'd +Too grossly, here in hunger and in thirst +Is purified. The odour, which the fruit, +And spray, that showers upon the verdure, breathe, +Inflames us with desire to feed and drink. +Nor once alone encompassing our route +We come to add fresh fuel to the pain: +Pain, said Iolace rather: for that will +To the tree leads us, by which Christ was led +To call Elias, joyful when he paid +Our ransom from his vein." I answering thus: +"Forese! from that day, in which the world +For better life thou changedst, not five years +Have circled. If the power of sinning more +Were first concluded in thee, ere thou knew'st +That kindly grief, which re-espouses us +To God, how hither art thou come so soon? +I thought to find thee lower, there, where time +Is recompense for time." He straight replied: +"To drink up the sweet wormwood of affliction +I have been brought thus early by the tears +Stream'd down my Nella's cheeks. Her prayers devout, +Her sighs have drawn me from the coast, where oft +Expectance lingers, and have set me free +From th' other circles. In the sight of God +So much the dearer is my widow priz'd, +She whom I lov'd so fondly, as she ranks +More singly eminent for virtuous deeds. +The tract most barb'rous of Sardinia's isle, +Hath dames more chaste and modester by far +Than that wherein I left her. O sweet brother! +What wouldst thou have me say? A time to come +Stands full within my view, to which this hour +Shall not be counted of an ancient date, +When from the pulpit shall be loudly warn'd +Th' unblushing dames of Florence, lest they bare +Unkerchief'd bosoms to the common gaze. +What savage women hath the world e'er seen, +What Saracens, for whom there needed scourge +Of spiritual or other discipline, +To force them walk with cov'ring on their limbs! +But did they see, the shameless ones, that Heav'n +Wafts on swift wing toward them, while I speak, +Their mouths were op'd for howling: they shall taste +Of Borrow (unless foresight cheat me here) +Or ere the cheek of him be cloth'd with down +Who is now rock'd with lullaby asleep. +Ah! now, my brother, hide thyself no more, +Thou seest how not I alone but all +Gaze, where thou veil'st the intercepted sun." + +Whence I replied: "If thou recall to mind +What we were once together, even yet +Remembrance of those days may grieve thee sore. +That I forsook that life, was due to him +Who there precedes me, some few evenings past, +When she was round, who shines with sister lamp +To his, that glisters yonder," and I show'd +The sun. "Tis he, who through profoundest night +Of he true dead has brought me, with this flesh +As true, that follows. From that gloom the aid +Of his sure comfort drew me on to climb, +And climbing wind along this mountain-steep, +Which rectifies in you whate'er the world +Made crooked and deprav'd I have his word, +That he will bear me company as far +As till I come where Beatrice dwells: +But there must leave me. Virgil is that spirit, +Who thus hath promis'd," and I pointed to him; +"The other is that shade, for whom so late +Your realm, as he arose, exulting shook +Through every pendent cliff and rocky bound." + + + + +CANTO XXIV + +Our journey was not slacken'd by our talk, +Nor yet our talk by journeying. Still we spake, +And urg'd our travel stoutly, like a ship +When the wind sits astern. The shadowy forms, + +That seem'd things dead and dead again, drew in +At their deep-delved orbs rare wonder of me, +Perceiving I had life; and I my words +Continued, and thus spake; "He journeys up +Perhaps more tardily then else he would, +For others' sake. But tell me, if thou know'st, +Where is Piccarda? Tell me, if I see +Any of mark, among this multitude, +Who eye me thus."--"My sister (she for whom, +'Twixt beautiful and good I cannot say +Which name was fitter ) wears e'en now her crown, +And triumphs in Olympus." Saying this, +He added: "Since spare diet hath so worn +Our semblance out, 't is lawful here to name +Each one. This," and his finger then he rais'd, +"Is Buonaggiuna,--Buonaggiuna, he +Of Lucca: and that face beyond him, pierc'd +Unto a leaner fineness than the rest, +Had keeping of the church: he was of Tours, +And purges by wan abstinence away +Bolsena's eels and cups of muscadel." + +He show'd me many others, one by one, +And all, as they were nam'd, seem'd well content; +For no dark gesture I discern'd in any. +I saw through hunger Ubaldino grind +His teeth on emptiness; and Boniface, +That wav'd the crozier o'er a num'rous flock. +I saw the Marquis, who tad time erewhile +To swill at Forli with less drought, yet so +Was one ne'er sated. I howe'er, like him, +That gazing 'midst a crowd, singles out one, +So singled him of Lucca; for methought +Was none amongst them took such note of me. +Somewhat I heard him whisper of Gentucca: +The sound was indistinct, and murmur'd there, +Where justice, that so strips them, fix'd her sting. + +"Spirit!" said I, "it seems as thou wouldst fain +Speak with me. Let me hear thee. Mutual wish +To converse prompts, which let us both indulge." + +He, answ'ring, straight began: "Woman is born, +Whose brow no wimple shades yet, that shall make +My city please thee, blame it as they may. +Go then with this forewarning. If aught false +My whisper too implied, th' event shall tell +But say, if of a truth I see the man +Of that new lay th' inventor, which begins +With 'Ladies, ye that con the lore of love'." + +To whom I thus: "Count of me but as one +Who am the scribe of love; that, when he breathes, +Take up my pen, and, as he dictates, write." + +"Brother!" said he, "the hind'rance which once held +The notary with Guittone and myself, +Short of that new and sweeter style I hear, +Is now disclos'd. I see how ye your plumes +Stretch, as th' inditer guides them; which, no question, +Ours did not. He that seeks a grace beyond, +Sees not the distance parts one style from other." +And, as contented, here he held his peace. + +Like as the bird, that winter near the Nile, +In squared regiment direct their course, +Then stretch themselves in file for speedier flight; +Thus all the tribe of spirits, as they turn'd +Their visage, faster deaf, nimble alike +Through leanness and desire. And as a man, +Tir'd With the motion of a trotting steed, +Slacks pace, and stays behind his company, +Till his o'erbreathed lungs keep temperate time; +E'en so Forese let that holy crew +Proceed, behind them lingering at my side, +And saying: "When shall I again behold thee?" + +"How long my life may last," said I, "I know not; +This know, how soon soever I return, +My wishes will before me have arriv'd. +Sithence the place, where I am set to live, +Is, day by day, more scoop'd of all its good, +And dismal ruin seems to threaten it." + +"Go now," he cried: "lo! he, whose guilt is most, +Passes before my vision, dragg'd at heels +Of an infuriate beast. Toward the vale, +Where guilt hath no redemption, on it speeds, +Each step increasing swiftness on the last; +Until a blow it strikes, that leaveth him +A corse most vilely shatter'd. No long space +Those wheels have yet to roll" (therewith his eyes +Look'd up to heav'n) "ere thou shalt plainly see +That which my words may not more plainly tell. +I quit thee: time is precious here: I lose +Too much, thus measuring my pace with shine." + +As from a troop of well-rank'd chivalry +One knight, more enterprising than the rest, +Pricks forth at gallop, eager to display +His prowess in the first encounter prov'd +So parted he from us with lengthen'd strides, +And left me on the way with those twain spirits, +Who were such mighty marshals of the world. + +When he beyond us had so fled mine eyes +No nearer reach'd him, than my thought his words, +The branches of another fruit, thick hung, +And blooming fresh, appear'd. E'en as our steps +Turn'd thither, not far off it rose to view. +Beneath it were a multitude, that rais'd +Their hands, and shouted forth I know not What +Unto the boughs; like greedy and fond brats, +That beg, and answer none obtain from him, +Of whom they beg; but more to draw them on, +He at arm's length the object of their wish +Above them holds aloft, and hides it not. + +At length, as undeceiv'd they went their way: +And we approach the tree, who vows and tears +Sue to in vain, the mighty tree. "Pass on, +And come not near. Stands higher up the wood, +Whereof Eve tasted, and from it was ta'en +'this plant." Such sounds from midst the thickets came. +Whence I, with either bard, close to the side +That rose, pass'd forth beyond. "Remember," next +We heard, "those noblest creatures of the clouds, +How they their twofold bosoms overgorg'd +Oppos'd in fight to Theseus: call to mind +The Hebrews, how effeminate they stoop'd +To ease their thirst; whence Gideon's ranks were thinn'd, +As he to Midian march'd adown the hills." + +Thus near one border coasting, still we heard +The sins of gluttony, with woe erewhile +Reguerdon'd. Then along the lonely path, +Once more at large, full thousand paces on +We travel'd, each contemplative and mute. + +"Why pensive journey thus ye three alone?" +Thus suddenly a voice exclaim'd: whereat +I shook, as doth a scar'd and paltry beast; +Then rais'd my head to look from whence it came. + +Was ne'er, in furnace, glass, or metal seen +So bright and glowing red, as was the shape +I now beheld. "If ye desire to mount," +He cried, "here must ye turn. This way he goes, +Who goes in quest of peace." His countenance +Had dazzled me; and to my guides I fac'd +Backward, like one who walks, as sound directs. + +As when, to harbinger the dawn, springs up +On freshen'd wing the air of May, and breathes +Of fragrance, all impregn'd with herb and flowers, +E'en such a wind I felt upon my front +Blow gently, and the moving of a wing +Perceiv'd, that moving shed ambrosial smell; +And then a voice: "Blessed are they, whom grace +Doth so illume, that appetite in them +Exhaleth no inordinate desire, +Still hung'ring as the rule of temperance wills." + + + + +CANTO XXV + +It was an hour, when he who climbs, had need +To walk uncrippled: for the sun had now +To Taurus the meridian circle left, +And to the Scorpion left the night. As one +That makes no pause, but presses on his road, +Whate'er betide him, if some urgent need +Impel: so enter'd we upon our way, +One before other; for, but singly, none +That steep and narrow scale admits to climb. + +E'en as the young stork lifteth up his wing +Through wish to fly, yet ventures not to quit +The nest, and drops it; so in me desire +Of questioning my guide arose, and fell, +Arriving even to the act, that marks +A man prepar'd for speech. Him all our haste +Restrain'd not, but thus spake the sire belov'd: +Fear not to speed the shaft, that on thy lip +Stands trembling for its flight. Encourag'd thus +I straight began: "How there can leanness come, +Where is no want of nourishment to feed?" + +"If thou," he answer'd, "hadst remember'd thee, +How Meleager with the wasting brand +Wasted alike, by equal fires consum'd, +This would not trouble thee: and hadst thou thought, +How in the mirror your reflected form +With mimic motion vibrates, what now seems +Hard, had appear'd no harder than the pulp +Of summer fruit mature. But that thy will +In certainty may find its full repose, +Lo Statius here! on him I call, and pray +That he would now be healer of thy wound." + +"If in thy presence I unfold to him +The secrets of heaven's vengeance, let me plead +Thine own injunction, to exculpate me." +So Statius answer'd, and forthwith began: +"Attend my words, O son, and in thy mind +Receive them: so shall they be light to clear +The doubt thou offer'st. Blood, concocted well, +Which by the thirsty veins is ne'er imbib'd, +And rests as food superfluous, to be ta'en +From the replenish'd table, in the heart +Derives effectual virtue, that informs +The several human limbs, as being that, +Which passes through the veins itself to make them. +Yet more concocted it descends, where shame +Forbids to mention: and from thence distils +In natural vessel on another's blood. +Then each unite together, one dispos'd +T' endure, to act the other, through meet frame +Of its recipient mould: that being reach'd, +It 'gins to work, coagulating first; +Then vivifies what its own substance caus'd +To bear. With animation now indued, +The active virtue (differing from a plant +No further, than that this is on the way +And at its limit that) continues yet +To operate, that now it moves, and feels, +As sea sponge clinging to the rock: and there +Assumes th' organic powers its seed convey'd. +'This is the period, son! at which the virtue, +That from the generating heart proceeds, +Is pliant and expansive; for each limb +Is in the heart by forgeful nature plann'd. +How babe of animal becomes, remains +For thy consid'ring. At this point, more wise, +Than thou hast err'd, making the soul disjoin'd +From passive intellect, because he saw +No organ for the latter's use assign'd. + +"Open thy bosom to the truth that comes. +Know soon as in the embryo, to the brain, +Articulation is complete, then turns +The primal Mover with a smile of joy +On such great work of nature, and imbreathes +New spirit replete with virtue, that what here +Active it finds, to its own substance draws, +And forms an individual soul, that lives, +And feels, and bends reflective on itself. +And that thou less mayst marvel at the word, +Mark the sun's heat, how that to wine doth change, +Mix'd with the moisture filter'd through the vine. + +"When Lachesis hath spun the thread, the soul +Takes with her both the human and divine, +Memory, intelligence, and will, in act +Far keener than before, the other powers +Inactive all and mute. No pause allow'd, +In wond'rous sort self-moving, to one strand +Of those, where the departed roam, she falls, +Here learns her destin'd path. Soon as the place +Receives her, round the plastic virtue beams, +Distinct as in the living limbs before: +And as the air, when saturate with showers, +The casual beam refracting, decks itself +With many a hue; so here the ambient air +Weareth that form, which influence of the soul +Imprints on it; and like the flame, that where +The fire moves, thither follows, so henceforth +The new form on the spirit follows still: +Hence hath it semblance, and is shadow call'd, +With each sense even to the sight endued: +Hence speech is ours, hence laughter, tears, and sighs +Which thou mayst oft have witness'd on the mount +Th' obedient shadow fails not to present +Whatever varying passion moves within us. +And this the cause of what thou marvel'st at." + +Now the last flexure of our way we reach'd, +And to the right hand turning, other care +Awaits us. Here the rocky precipice +Hurls forth redundant flames, and from the rim +A blast upblown, with forcible rebuff +Driveth them back, sequester'd from its bound. + +Behoov'd us, one by one, along the side, +That border'd on the void, to pass; and I +Fear'd on one hand the fire, on th' other fear'd +Headlong to fall: when thus th' instructor warn'd: +"Strict rein must in this place direct the eyes. +A little swerving and the way is lost." + +Then from the bosom of the burning mass, +"O God of mercy!" heard I sung; and felt +No less desire to turn. And when I saw +Spirits along the flame proceeding, I +Between their footsteps and mine own was fain +To share by turns my view. At the hymn's close +They shouted loud, "I do not know a man;" +Then in low voice again took up the strain, +Which once more ended, "To the wood," they cried, +"Ran Dian, and drave forth Callisto, stung +With Cytherea's poison:" then return'd +Unto their song; then marry a pair extoll'd, +Who liv'd in virtue chastely, and the bands +Of wedded love. Nor from that task, I ween, +Surcease they; whilesoe'er the scorching fire +Enclasps them. Of such skill appliance needs +To medicine the wound, that healeth last. + + +CANTO XXVI + +While singly thus along the rim we walk'd, +Oft the good master warn'd me: "Look thou well. +Avail it that I caution thee." The sun +Now all the western clime irradiate chang'd +From azure tinct to white; and, as I pass'd, +My passing shadow made the umber'd flame +Burn ruddier. At so strange a sight I mark'd +That many a spirit marvel'd on his way. + +This bred occasion first to speak of me, +"He seems," said they, "no insubstantial frame:" +Then to obtain what certainty they might, +Stretch'd towards me, careful not to overpass +The burning pale. "O thou, who followest +The others, haply not more slow than they, +But mov'd by rev'rence, answer me, who burn +In thirst and fire: nor I alone, but these +All for thine answer do more thirst, than doth +Indian or Aethiop for the cooling stream. +Tell us, how is it that thou mak'st thyself +A wall against the sun, as thou not yet +Into th' inextricable toils of death +Hadst enter'd?" Thus spake one, and I had straight +Declar'd me, if attention had not turn'd +To new appearance. Meeting these, there came, +Midway the burning path, a crowd, on whom +Earnestly gazing, from each part I view +The shadows all press forward, sev'rally +Each snatch a hasty kiss, and then away. +E'en so the emmets, 'mid their dusky troops, +Peer closely one at other, to spy out +Their mutual road perchance, and how they thrive. + +That friendly greeting parted, ere dispatch +Of the first onward step, from either tribe +Loud clamour rises: those, who newly come, +Shout "Sodom and Gomorrah!" these, "The cow +Pasiphae enter'd, that the beast she woo'd +Might rush unto her luxury." Then as cranes, +That part towards the Riphaean mountains fly, +Part towards the Lybic sands, these to avoid +The ice, and those the sun; so hasteth off +One crowd, advances th' other; and resume +Their first song weeping, and their several shout. + +Again drew near my side the very same, +Who had erewhile besought me, and their looks +Mark'd eagerness to listen. I, who twice +Their will had noted, spake: "O spirits secure, +Whene'er the time may be, of peaceful end! +My limbs, nor crude, nor in mature old age, +Have I left yonder: here they bear me, fed +With blood, and sinew-strung. That I no more +May live in blindness, hence I tend aloft. +There is a dame on high, who wind for us +This grace, by which my mortal through your realm +I bear. But may your utmost wish soon meet +Such full fruition, that the orb of heaven, +Fullest of love, and of most ample space, +Receive you, as ye tell (upon my page +Henceforth to stand recorded) who ye are, +And what this multitude, that at your backs +Have past behind us." As one, mountain-bred, +Rugged and clownish, if some city's walls +He chance to enter, round him stares agape, +Confounded and struck dumb; e'en such appear'd +Each spirit. But when rid of that amaze, +(Not long the inmate of a noble heart) +He, who before had question'd, thus resum'd: +"O blessed, who, for death preparing, tak'st +Experience of our limits, in thy bark! +Their crime, who not with us proceed, was that, +For which, as he did triumph, Caesar heard +The snout of 'queen,' to taunt him. Hence their cry +Of 'Sodom,' as they parted, to rebuke +Themselves, and aid the burning by their shame. +Our sinning was Hermaphrodite: but we, +Because the law of human kind we broke, +Following like beasts our vile concupiscence, +Hence parting from them, to our own disgrace +Record the name of her, by whom the beast +In bestial tire was acted. Now our deeds +Thou know'st, and how we sinn'd. If thou by name +Wouldst haply know us, time permits not now +To tell so much, nor can I. Of myself +Learn what thou wishest. Guinicelli I, +Who having truly sorrow'd ere my last, +Already cleanse me." With such pious joy, +As the two sons upon their mother gaz'd +From sad Lycurgus rescu'd, such my joy +(Save that I more represt it) when I heard +From his own lips the name of him pronounc'd, +Who was a father to me, and to those +My betters, who have ever us'd the sweet +And pleasant rhymes of love. So nought I heard +Nor spake, but long time thoughtfully I went, +Gazing on him; and, only for the fire, +Approach'd not nearer. When my eyes were fed +By looking on him, with such solemn pledge, +As forces credence, I devoted me +Unto his service wholly. In reply +He thus bespake me: "What from thee I hear +Is grav'd so deeply on my mind, the waves +Of Lethe shall not wash it off, nor make +A whit less lively. But as now thy oath +Has seal'd the truth, declare what cause impels +That love, which both thy looks and speech bewray." + +"Those dulcet lays," I answer'd, "which, as long +As of our tongue the beauty does not fade, +Shall make us love the very ink that trac'd them." + +"Brother!" he cried, and pointed at a shade +Before him, "there is one, whose mother speech +Doth owe to him a fairer ornament. +He in love ditties and the tales of prose +Without a rival stands, and lets the fools +Talk on, who think the songster of Limoges +O'ertops him. Rumour and the popular voice +They look to more than truth, and so confirm +Opinion, ere by art or reason taught. +Thus many of the elder time cried up +Guittone, giving him the prize, till truth +By strength of numbers vanquish'd. If thou own +So ample privilege, as to have gain'd +Free entrance to the cloister, whereof Christ +Is Abbot of the college, say to him +One paternoster for me, far as needs +For dwellers in this world, where power to sin +No longer tempts us." Haply to make way +For one, that follow'd next, when that was said, +He vanish'd through the fire, as through the wave +A fish, that glances diving to the deep. + +I, to the spirit he had shown me, drew +A little onward, and besought his name, +For which my heart, I said, kept gracious room. +He frankly thus began: "Thy courtesy +So wins on me, I have nor power nor will +To hide me. I am Arnault; and with songs, +Sorely lamenting for my folly past, +Thorough this ford of fire I wade, and see +The day, I hope for, smiling in my view. +I pray ye by the worth that guides ye up +Unto the summit of the scale, in time +Remember ye my suff'rings." With such words +He disappear'd in the refining flame. + + + + +CANTO XXVII + +Now was the sun so station'd, as when first +His early radiance quivers on the heights, +Where stream'd his Maker's blood, while Libra hangs +Above Hesperian Ebro, and new fires +Meridian flash on Ganges' yellow tide. + +So day was sinking, when the' angel of God +Appear'd before us. Joy was in his mien. +Forth of the flame he stood upon the brink, +And with a voice, whose lively clearness far +Surpass'd our human, "Blessed are the pure +In heart," he Sang: then near him as we came, +"Go ye not further, holy spirits!" he cried, +"Ere the fire pierce you: enter in; and list +Attentive to the song ye hear from thence." + +I, when I heard his saying, was as one +Laid in the grave. My hands together clasp'd, +And upward stretching, on the fire I look'd, +And busy fancy conjur'd up the forms +Erewhile beheld alive consum'd in flames. + +Th' escorting spirits turn'd with gentle looks +Toward me, and the Mantuan spake: "My son, +Here torment thou mayst feel, but canst not death. +Remember thee, remember thee, if I +Safe e'en on Geryon brought thee: now I come +More near to God, wilt thou not trust me now? +Of this be sure: though in its womb that flame +A thousand years contain'd thee, from thy head +No hair should perish. If thou doubt my truth, +Approach, and with thy hands thy vesture's hem +Stretch forth, and for thyself confirm belief. +Lay now all fear, O lay all fear aside. +Turn hither, and come onward undismay'd." +I still, though conscience urg'd' no step advanc'd. + +When still he saw me fix'd and obstinate, +Somewhat disturb'd he cried: "Mark now, my son, +From Beatrice thou art by this wall +Divided." As at Thisbe's name the eye +Of Pyramus was open'd (when life ebb'd +Fast from his veins), and took one parting glance, +While vermeil dyed the mulberry; thus I turn'd +To my sage guide, relenting, when I heard +The name, that springs forever in my breast. + +He shook his forehead; and, "How long," he said, +"Linger we now?" then smil'd, as one would smile +Upon a child, that eyes the fruit and yields. +Into the fire before me then he walk'd; +And Statius, who erewhile no little space +Had parted us, he pray'd to come behind. + +I would have cast me into molten glass +To cool me, when I enter'd; so intense +Rag'd the conflagrant mass. The sire belov'd, +To comfort me, as he proceeded, still +Of Beatrice talk'd. "Her eyes," saith he, +"E'en now I seem to view." From the other side +A voice, that sang, did guide us, and the voice +Following, with heedful ear, we issued forth, +There where the path led upward. "Come," we heard, +"Come, blessed of my Father." Such the sounds, +That hail'd us from within a light, which shone +So radiant, I could not endure the view. +"The sun," it added, "hastes: and evening comes. +Delay not: ere the western sky is hung +With blackness, strive ye for the pass." Our way +Upright within the rock arose, and fac'd +Such part of heav'n, that from before my steps +The beams were shrouded of the sinking sun. + +Nor many stairs were overpass, when now +By fading of the shadow we perceiv'd +The sun behind us couch'd: and ere one face +Of darkness o'er its measureless expanse +Involv'd th' horizon, and the night her lot +Held individual, each of us had made +A stair his pallet: not that will, but power, +Had fail'd us, by the nature of that mount +Forbidden further travel. As the goats, +That late have skipp'd and wanton'd rapidly +Upon the craggy cliffs, ere they had ta'en +Their supper on the herb, now silent lie +And ruminate beneath the umbrage brown, +While noonday rages; and the goatherd leans +Upon his staff, and leaning watches them: +And as the swain, that lodges out all night +In quiet by his flock, lest beast of prey +Disperse them; even so all three abode, +I as a goat and as the shepherds they, +Close pent on either side by shelving rock. + +A little glimpse of sky was seen above; +Yet by that little I beheld the stars +In magnitude and rustle shining forth +With more than wonted glory. As I lay, +Gazing on them, and in that fit of musing, +Sleep overcame me, sleep, that bringeth oft +Tidings of future hap. About the hour, +As I believe, when Venus from the east +First lighten'd on the mountain, she whose orb +Seems always glowing with the fire of love, +A lady young and beautiful, I dream'd, +Was passing o'er a lea; and, as she came, +Methought I saw her ever and anon +Bending to cull the flowers; and thus she sang: +"Know ye, whoever of my name would ask, +That I am Leah: for my brow to weave +A garland, these fair hands unwearied ply. +To please me at the crystal mirror, here +I deck me. But my sister Rachel, she +Before her glass abides the livelong day, +Her radiant eyes beholding, charm'd no less, +Than I with this delightful task. Her joy +In contemplation, as in labour mine." + +And now as glimm'ring dawn appear'd, that breaks +More welcome to the pilgrim still, as he +Sojourns less distant on his homeward way, +Darkness from all sides fled, and with it fled +My slumber; whence I rose and saw my guide +Already risen. "That delicious fruit, +Which through so many a branch the zealous care +Of mortals roams in quest of, shall this day +Appease thy hunger." Such the words I heard +From Virgil's lip; and never greeting heard +So pleasant as the sounds. Within me straight +Desire so grew upon desire to mount, +Thenceforward at each step I felt the wings +Increasing for my flight. When we had run +O'er all the ladder to its topmost round, +As there we stood, on me the Mantuan fix'd +His eyes, and thus he spake: "Both fires, my son, +The temporal and eternal, thou hast seen, +And art arriv'd, where of itself my ken +No further reaches. I with skill and art +Thus far have drawn thee. Now thy pleasure take +For guide. Thou hast o'ercome the steeper way, +O'ercome the straighter. Lo! the sun, that darts +His beam upon thy forehead! lo! the herb, +The arboreta and flowers, which of itself +This land pours forth profuse! Will those bright eyes +With gladness come, which, weeping, made me haste +To succour thee, thou mayst or seat thee down, +Or wander where thou wilt. Expect no more +Sanction of warning voice or sign from me, +Free of thy own arbitrement to choose, +Discreet, judicious. To distrust thy sense +Were henceforth error. I invest thee then +With crown and mitre, sovereign o'er thyself." + + + + +CANTO XXVIII + +Through that celestial forest, whose thick shade +With lively greenness the new-springing day +Attemper'd, eager now to roam, and search +Its limits round, forthwith I left the bank, +Along the champain leisurely my way +Pursuing, o'er the ground, that on all sides +Delicious odour breath'd. A pleasant air, +That intermitted never, never veer'd, +Smote on my temples, gently, as a wind +Of softest influence: at which the sprays, +Obedient all, lean'd trembling to that part +Where first the holy mountain casts his shade, +Yet were not so disorder'd, but that still +Upon their top the feather'd quiristers +Applied their wonted art, and with full joy +Welcom'd those hours of prime, and warbled shrill +Amid the leaves, that to their jocund lays +inept tenor; even as from branch to branch, +Along the piney forests on the shore +Of Chiassi, rolls the gath'ring melody, +When Eolus hath from his cavern loos'd +The dripping south. Already had my steps, +Though slow, so far into that ancient wood +Transported me, I could not ken the place +Where I had enter'd, when behold! my path +Was bounded by a rill, which to the left +With little rippling waters bent the grass, +That issued from its brink. On earth no wave +How clean soe'er, that would not seem to have +Some mixture in itself, compar'd with this, +Transpicuous, clear; yet darkly on it roll'd, +Darkly beneath perpetual gloom, which ne'er +Admits or sun or moon light there to shine. + +My feet advanc'd not; but my wond'ring eyes +Pass'd onward, o'er the streamlet, to survey +The tender May-bloom, flush'd through many a hue, +In prodigal variety: and there, +As object, rising suddenly to view, +That from our bosom every thought beside +With the rare marvel chases, I beheld +A lady all alone, who, singing, went, +And culling flower from flower, wherewith her way +Was all o'er painted. "Lady beautiful! +Thou, who (if looks, that use to speak the heart, +Are worthy of our trust), with love's own beam +Dost warm thee," thus to her my speech I fram'd: +"Ah! please thee hither towards the streamlet bend +Thy steps so near, that I may list thy song. +Beholding thee and this fair place, methinks, +I call to mind where wander'd and how look'd +Proserpine, in that season, when her child +The mother lost, and she the bloomy spring." + +As when a lady, turning in the dance, +Doth foot it featly, and advances scarce +One step before the other to the ground; +Over the yellow and vermilion flowers +Thus turn'd she at my suit, most maiden-like, +Valing her sober eyes, and came so near, +That I distinctly caught the dulcet sound. +Arriving where the limped waters now +Lav'd the green sward, her eyes she deign'd to raise, +That shot such splendour on me, as I ween +Ne'er glanced from Cytherea's, when her son +Had sped his keenest weapon to her heart. +Upon the opposite bank she stood and smil'd +through her graceful fingers shifted still +The intermingling dyes, which without seed +That lofty land unbosoms. By the stream +Three paces only were we sunder'd: yet +The Hellespont, where Xerxes pass'd it o'er, +(A curb for ever to the pride of man) +Was by Leander not more hateful held +For floating, with inhospitable wave +'Twixt Sestus and Abydos, than by me +That flood, because it gave no passage thence. + +"Strangers ye come, and haply in this place, +That cradled human nature in its birth, +Wond'ring, ye not without suspicion view +My smiles: but that sweet strain of psalmody, +'Thou, Lord! hast made me glad,' will give ye light, +Which may uncloud your minds. And thou, who stand'st +The foremost, and didst make thy suit to me, +Say if aught else thou wish to hear: for I +Came prompt to answer every doubt of thine." + +She spake; and I replied: "I know not how +To reconcile this wave and rustling sound +Of forest leaves, with what I late have heard +Of opposite report." She answering thus: +"I will unfold the cause, whence that proceeds, +Which makes thee wonder; and so purge the cloud +That hath enwraps thee. The First Good, whose joy +Is only in himself, created man +For happiness, and gave this goodly place, +His pledge and earnest of eternal peace. +Favour'd thus highly, through his own defect +He fell, and here made short sojourn; he fell, +And, for the bitterness of sorrow, chang'd +Laughter unblam'd and ever-new delight. +That vapours none, exhal'd from earth beneath, +Or from the waters (which, wherever heat +Attracts them, follow), might ascend thus far +To vex man's peaceful state, this mountain rose +So high toward the heav'n, nor fears the rage +Of elements contending, from that part +Exempted, where the gate his limit bars. +Because the circumambient air throughout +With its first impulse circles still, unless +Aught interpose to cheek or thwart its course; +Upon the summit, which on every side +To visitation of th' impassive air +Is open, doth that motion strike, and makes +Beneath its sway th' umbrageous wood resound: +And in the shaken plant such power resides, +That it impregnates with its efficacy +The voyaging breeze, upon whose subtle plume +That wafted flies abroad; and th' other land +Receiving (as 't is worthy in itself, +Or in the clime, that warms it), doth conceive, +And from its womb produces many a tree +Of various virtue. This when thou hast heard, +The marvel ceases, if in yonder earth +Some plant without apparent seed be found +To fix its fibrous stem. And further learn, +That with prolific foison of all seeds, +This holy plain is fill'd, and in itself +Bears fruit that ne'er was pluck'd on other soil. + +"The water, thou behold'st, springs not from vein, +As stream, that intermittently repairs +And spends his pulse of life, but issues forth +From fountain, solid, undecaying, sure; +And by the will omnific, full supply +Feeds whatsoe'er On either side it pours; +On this devolv'd with power to take away +Remembrance of offence, on that to bring +Remembrance back of every good deed done. +From whence its name of Lethe on this part; +On th' other Eunoe: both of which must first +Be tasted ere it work; the last exceeding +All flavours else. Albeit thy thirst may now +Be well contented, if I here break off, +No more revealing: yet a corollary +I freely give beside: nor deem my words +Less grateful to thee, if they somewhat pass +The stretch of promise. They, whose verse of yore +The golden age recorded and its bliss, +On the Parnassian mountain, of this place +Perhaps had dream'd. Here was man guiltless, here +Perpetual spring and every fruit, and this +The far-fam'd nectar." Turning to the bards, +When she had ceas'd, I noted in their looks +A smile at her conclusion; then my face +Again directed to the lovely dame. + + + + +CANTO XXIX + +Singing, as if enamour'd, she resum'd +And clos'd the song, with "Blessed they whose sins +Are cover'd." Like the wood-nymphs then, that tripp'd +Singly across the sylvan shadows, one +Eager to view and one to 'scape the sun, +So mov'd she on, against the current, up +The verdant rivage. I, her mincing step +Observing, with as tardy step pursued. + +Between us not an hundred paces trod, +The bank, on each side bending equally, +Gave me to face the orient. Nor our way +Far onward brought us, when to me at once +She turn'd, and cried: "My brother! look and hearken." +And lo! a sudden lustre ran across +Through the great forest on all parts, so bright +I doubted whether lightning were abroad; +But that expiring ever in the spleen, +That doth unfold it, and this during still +And waxing still in splendor, made me question +What it might be: and a sweet melody +Ran through the luminous air. Then did I chide +With warrantable zeal the hardihood +Of our first parent, for that there were earth +Stood in obedience to the heav'ns, she only, +Woman, the creature of an hour, endur'd not +Restraint of any veil: which had she borne +Devoutly, joys, ineffable as these, +Had from the first, and long time since, been mine. + +While through that wilderness of primy sweets +That never fade, suspense I walk'd, and yet +Expectant of beatitude more high, +Before us, like a blazing fire, the air +Under the green boughs glow'd; and, for a song, +Distinct the sound of melody was heard. + +O ye thrice holy virgins! for your sakes +If e'er I suffer'd hunger, cold and watching, +Occasion calls on me to crave your bounty. +Now through my breast let Helicon his stream +Pour copious; and Urania with her choir +Arise to aid me: while the verse unfolds +Things that do almost mock the grasp of thought. + +Onward a space, what seem'd seven trees of gold, +The intervening distance to mine eye +Falsely presented; but when I was come +So near them, that no lineament was lost +Of those, with which a doubtful object, seen +Remotely, plays on the misdeeming sense, +Then did the faculty, that ministers +Discourse to reason, these for tapers of gold +Distinguish, and it th' singing trace the sound +"Hosanna." Above, their beauteous garniture +Flam'd with more ample lustre, than the moon +Through cloudless sky at midnight in her full. + +I turn'd me full of wonder to my guide; +And he did answer with a countenance +Charg'd with no less amazement: whence my view +Reverted to those lofty things, which came +So slowly moving towards us, that the bride +Would have outstript them on her bridal day. + +The lady called aloud: "Why thus yet burns +Affection in thee for these living, lights, +And dost not look on that which follows them?" + +I straightway mark'd a tribe behind them walk, +As if attendant on their leaders, cloth'd +With raiment of such whiteness, as on earth +Was never. On my left, the wat'ry gleam +Borrow'd, and gave me back, when there I look'd. +As in a mirror, my left side portray'd. + +When I had chosen on the river's edge +Such station, that the distance of the stream +Alone did separate me; there I stay'd +My steps for clearer prospect, and beheld +The flames go onward, leaving, as they went, +The air behind them painted as with trail +Of liveliest pencils! so distinct were mark'd +All those sev'n listed colours, whence the sun +Maketh his bow, and Cynthia her zone. +These streaming gonfalons did flow beyond +My vision; and ten paces, as I guess, +Parted the outermost. Beneath a sky +So beautiful, came foul and-twenty elders, +By two and two, with flower-de-luces crown'd. + +All sang one song: "Blessed be thou among +The daughters of Adam! and thy loveliness +Blessed for ever!" After that the flowers, +And the fresh herblets, on the opposite brink, +Were free from that elected race; as light +In heav'n doth second light, came after them +Four animals, each crown'd with verdurous leaf. +With six wings each was plum'd, the plumage full +Of eyes, and th' eyes of Argus would be such, +Were they endued with life. Reader, more rhymes +Will not waste in shadowing forth their form: +For other need no straitens, that in this +I may not give my bounty room. But read +Ezekiel; for he paints them, from the north +How he beheld them come by Chebar's flood, +In whirlwind, cloud and fire; and even such +As thou shalt find them character'd by him, +Here were they; save as to the pennons; there, +From him departing, John accords with me. + +The space, surrounded by the four, enclos'd +A car triumphal: on two wheels it came +Drawn at a Gryphon's neck; and he above +Stretch'd either wing uplifted, 'tween the midst +And the three listed hues, on each side three; +So that the wings did cleave or injure none; +And out of sight they rose. The members, far +As he was bird, were golden; white the rest +With vermeil intervein'd. So beautiful +A car in Rome ne'er grac'd Augustus pomp, +Or Africanus': e'en the sun's itself +Were poor to this, that chariot of the sun +Erroneous, which in blazing ruin fell +At Tellus' pray'r devout, by the just doom +Mysterious of all-seeing Jove. Three nymphs +at the right wheel, came circling in smooth dance; +The one so ruddy, that her form had scarce +Been known within a furnace of clear flame: +The next did look, as if the flesh and bones +Were emerald: snow new-fallen seem'd the third. + +Now seem'd the white to lead, the ruddy now; +And from her song who led, the others took +Their treasure, swift or slow. At th' other wheel, +A band quaternion, each in purple clad, +Advanc'd with festal step, as of them one +The rest conducted, one, upon whose front +Three eyes were seen. In rear of all this group, +Two old men I beheld, dissimilar +In raiment, but in port and gesture like, +Solid and mainly grave; of whom the one +Did show himself some favour'd counsellor +Of the great Coan, him, whom nature made +To serve the costliest creature of her tribe. +His fellow mark'd an opposite intent, +Bearing a sword, whose glitterance and keen edge, +E'en as I view'd it with the flood between, +Appall'd me. Next four others I beheld, +Of humble seeming: and, behind them all, +One single old man, sleeping, as he came, +With a shrewd visage. And these seven, each +Like the first troop were habited, but wore +No braid of lilies on their temples wreath'd. +Rather with roses and each vermeil flower, +A sight, but little distant, might have sworn, +That they were all on fire above their brow. + +Whenas the car was o'er against me, straight. +Was heard a thund'ring, at whose voice it seem'd +The chosen multitude were stay'd; for there, +With the first ensigns, made they solemn halt. + + + + +CANTO XXX + +Soon as the polar light, which never knows +Setting nor rising, nor the shadowy veil +Of other cloud than sin, fair ornament +Of the first heav'n, to duty each one there +Safely convoying, as that lower doth +The steersman to his port, stood firmly fix'd; +Forthwith the saintly tribe, who in the van +Between the Gryphon and its radiance came, +Did turn them to the car, as to their rest: +And one, as if commission'd from above, +In holy chant thrice shorted forth aloud: +"Come, spouse, from Libanus!" and all the rest +Took up the song--At the last audit so +The blest shall rise, from forth his cavern each +Uplifting lightly his new-vested flesh, +As, on the sacred litter, at the voice +Authoritative of that elder, sprang +A hundred ministers and messengers +Of life eternal. "Blessed thou! who com'st!" +And, "O," they cried, "from full hands scatter ye +Unwith'ring lilies;" and, so saying, cast +Flowers over head and round them on all sides. + +I have beheld, ere now, at break of day, +The eastern clime all roseate, and the sky +Oppos'd, one deep and beautiful serene, +And the sun's face so shaded, and with mists +Attemper'd at lids rising, that the eye +Long while endur'd the sight: thus in a cloud +Of flowers, that from those hands angelic rose, +And down, within and outside of the car, +Fell showering, in white veil with olive wreath'd, +A virgin in my view appear'd, beneath +Green mantle, rob'd in hue of living flame: + +And o'er my Spirit, that in former days +Within her presence had abode so long, +No shudd'ring terror crept. Mine eyes no more +Had knowledge of her; yet there mov'd from her +A hidden virtue, at whose touch awak'd, +The power of ancient love was strong within me. + +No sooner on my vision streaming, smote +The heav'nly influence, which years past, and e'en +In childhood, thrill'd me, than towards Virgil I +Turn'd me to leftward, panting, like a babe, +That flees for refuge to his mother's breast, +If aught have terrified or work'd him woe: +And would have cried: "There is no dram of blood, +That doth not quiver in me. The old flame +Throws out clear tokens of reviving fire:" +But Virgil had bereav'd us of himself, +Virgil, my best-lov'd father; Virgil, he +To whom I gave me up for safety: nor, +All, our prime mother lost, avail'd to save +My undew'd cheeks from blur of soiling tears. + +"Dante, weep not, that Virgil leaves thee: nay, +Weep thou not yet: behooves thee feel the edge +Of other sword, and thou shalt weep for that." + +As to the prow or stern, some admiral +Paces the deck, inspiriting his crew, +When 'mid the sail-yards all hands ply aloof; +Thus on the left side of the car I saw, +(Turning me at the sound of mine own name, +Which here I am compell'd to register) +The virgin station'd, who before appeared +Veil'd in that festive shower angelical. + +Towards me, across the stream, she bent her eyes; +Though from her brow the veil descending, bound +With foliage of Minerva, suffer'd not +That I beheld her clearly; then with act +Full royal, still insulting o'er her thrall, +Added, as one, who speaking keepeth back +The bitterest saying, to conclude the speech: +"Observe me well. I am, in sooth, I am +Beatrice. What! and hast thou deign'd at last +Approach the mountainnewest not, O man! +Thy happiness is whole?" Down fell mine eyes +On the clear fount, but there, myself espying, +Recoil'd, and sought the greensward: such a weight +Of shame was on my forehead. With a mien +Of that stern majesty, which doth surround +mother's presence to her awe-struck child, +She look'd; a flavour of such bitterness +Was mingled in her pity. There her words +Brake off, and suddenly the angels sang: +"In thee, O gracious Lord, my hope hath been:" +But went no farther than, "Thou Lord, hast set +My feet in ample room." As snow, that lies +Amidst the living rafters on the back +Of Italy congeal'd when drifted high +And closely pil'd by rough Sclavonian blasts, +Breathe but the land whereon no shadow falls, +And straightway melting it distils away, +Like a fire-wasted taper: thus was I, +Without a sigh or tear, or ever these +Did sing, that with the chiming of heav'n's sphere, +Still in their warbling chime: but when the strain +Of dulcet symphony, express'd for me +Their soft compassion, more than could the words +"Virgin, why so consum'st him?" then the ice, +Congeal'd about my bosom, turn'd itself +To spirit and water, and with anguish forth +Gush'd through the lips and eyelids from the heart. + +Upon the chariot's right edge still she stood, +Immovable, and thus address'd her words +To those bright semblances with pity touch'd: +"Ye in th' eternal day your vigils keep, +So that nor night nor slumber, with close stealth, +Conveys from you a single step in all +The goings on of life: thence with more heed +I shape mine answer, for his ear intended, +Who there stands weeping, that the sorrow now +May equal the transgression. Not alone +Through operation of the mighty orbs, +That mark each seed to some predestin'd aim, +As with aspect or fortunate or ill +The constellations meet, but through benign +Largess of heav'nly graces, which rain down +From such a height, as mocks our vision, this man +Was in the freshness of his being, such, +So gifted virtually, that in him +All better habits wond'rously had thriv'd. +The more of kindly strength is in the soil, +So much doth evil seed and lack of culture +Mar it the more, and make it run to wildness. +These looks sometime upheld him; for I show'd +My youthful eyes, and led him by their light +In upright walking. Soon as I had reach'd +The threshold of my second age, and chang'd +My mortal for immortal, then he left me, +And gave himself to others. When from flesh +To spirit I had risen, and increase +Of beauty and of virtue circled me, +I was less dear to him, and valued less. +His steps were turn'd into deceitful ways, +Following false images of good, that make +No promise perfect. Nor avail'd me aught +To sue for inspirations, with the which, +I, both in dreams of night, and otherwise, +Did call him back; of them so little reck'd him, +Such depth he fell, that all device was short +Of his preserving, save that he should view +The children of perdition. To this end +I visited the purlieus of the dead: +And one, who hath conducted him thus high, +Receiv'd my supplications urg'd with weeping. +It were a breaking of God's high decree, +If Lethe should be past, and such food tasted +Without the cost of some repentant tear." + + + + +CANTO XXXI + +"O Thou!" her words she thus without delay +Resuming, turn'd their point on me, to whom +They but with lateral edge seem'd harsh before, +"Say thou, who stand'st beyond the holy stream, +If this be true. A charge so grievous needs +Thine own avowal." On my faculty +Such strange amazement hung, the voice expir'd +Imperfect, ere its organs gave it birth. + +A little space refraining, then she spake: +"What dost thou muse on? Answer me. The wave +On thy remembrances of evil yet +Hath done no injury." A mingled sense +Of fear and of confusion, from my lips +Did such a "Yea" produce, as needed help +Of vision to interpret. As when breaks +In act to be discharg'd, a cross-bow bent +Beyond its pitch, both nerve and bow o'erstretch'd, +The flagging weapon feebly hits the mark; +Thus, tears and sighs forth gushing, did I burst +Beneath the heavy load, and thus my voice +Was slacken'd on its way. She straight began: +"When my desire invited thee to love +The good, which sets a bound to our aspirings, +What bar of thwarting foss or linked chain +Did meet thee, that thou so should'st quit the hope +Of further progress, or what bait of ease +Or promise of allurement led thee on +Elsewhere, that thou elsewhere should'st rather wait?" + +A bitter sigh I drew, then scarce found voice +To answer, hardly to these sounds my lips +Gave utterance, wailing: "Thy fair looks withdrawn, +Things present, with deceitful pleasures, turn'd +My steps aside." She answering spake: "Hadst thou +Been silent, or denied what thou avow'st, +Thou hadst not hid thy sin the more: such eye +Observes it. But whene'er the sinner's cheek +Breaks forth into the precious-streaming tears +Of self-accusing, in our court the wheel +Of justice doth run counter to the edge. +Howe'er that thou may'st profit by thy shame +For errors past, and that henceforth more strength +May arm thee, when thou hear'st the Siren-voice, +Lay thou aside the motive to this grief, +And lend attentive ear, while I unfold +How opposite a way my buried flesh +Should have impell'd thee. Never didst thou spy +In art or nature aught so passing sweet, +As were the limbs, that in their beauteous frame +Enclos'd me, and are scatter'd now in dust. +If sweetest thing thus fail'd thee with my death, +What, afterward, of mortal should thy wish +Have tempted? When thou first hadst felt the dart +Of perishable things, in my departing +For better realms, thy wing thou should'st have prun'd +To follow me, and never stoop'd again +To 'bide a second blow for a slight girl, +Or other gaud as transient and as vain. +The new and inexperienc'd bird awaits, +Twice it may be, or thrice, the fowler's aim; +But in the sight of one, whose plumes are full, +In vain the net is spread, the arrow wing'd." + +I stood, as children silent and asham'd +Stand, list'ning, with their eyes upon the earth, +Acknowledging their fault and self-condemn'd. +And she resum'd: "If, but to hear thus pains thee, +Raise thou thy beard, and lo! what sight shall do!" + +With less reluctance yields a sturdy holm, +Rent from its fibers by a blast, that blows +From off the pole, or from Iarbas' land, +Than I at her behest my visage rais'd: +And thus the face denoting by the beard, +I mark'd the secret sting her words convey'd. + +No sooner lifted I mine aspect up, +Than downward sunk that vision I beheld +Of goodly creatures vanish; and mine eyes +Yet unassur'd and wavering, bent their light +On Beatrice. Towards the animal, +Who joins two natures in one form, she turn'd, +And, even under shadow of her veil, +And parted by the verdant rill, that flow'd +Between, in loveliness appear'd as much +Her former self surpassing, as on earth +All others she surpass'd. Remorseful goads +Shot sudden through me. Each thing else, the more +Its love had late beguil'd me, now the more +I Was loathsome. On my heart so keenly smote +The bitter consciousness, that on the ground +O'erpower'd I fell: and what my state was then, +She knows who was the cause. When now my strength +Flow'd back, returning outward from the heart, +The lady, whom alone I first had seen, +I found above me. "Loose me not," she cried: +"Loose not thy hold;" and lo! had dragg'd me high +As to my neck into the stream, while she, +Still as she drew me after, swept along, +Swift as a shuttle, bounding o'er the wave. + +The blessed shore approaching then was heard +So sweetly, "Tu asperges me," that I +May not remember, much less tell the sound. +The beauteous dame, her arms expanding, clasp'd +My temples, and immerg'd me, where 't was fit +The wave should drench me: and thence raising up, +Within the fourfold dance of lovely nymphs +Presented me so lav'd, and with their arm +They each did cover me. "Here are we nymphs, +And in the heav'n are stars. Or ever earth +Was visited of Beatrice, we +Appointed for her handmaids, tended on her. +We to her eyes will lead thee; but the light +Of gladness that is in them, well to scan, +Those yonder three, of deeper ken than ours, +Thy sight shall quicken." Thus began their song; +And then they led me to the Gryphon's breast, +While, turn'd toward us, Beatrice stood. +"Spare not thy vision. We have stationed thee +Before the emeralds, whence love erewhile +Hath drawn his weapons on thee." As they spake, +A thousand fervent wishes riveted +Mine eyes upon her beaming eyes, that stood +Still fix'd toward the Gryphon motionless. +As the sun strikes a mirror, even thus +Within those orbs the twofold being, shone, +For ever varying, in one figure now +Reflected, now in other. Reader! muse +How wond'rous in my sight it seem'd to mark +A thing, albeit steadfast in itself, +Yet in its imag'd semblance mutable. + +Full of amaze, and joyous, while my soul +Fed on the viand, whereof still desire +Grows with satiety, the other three +With gesture, that declar'd a loftier line, +Advanc'd: to their own carol on they came +Dancing in festive ring angelical. + +"Turn, Beatrice!" was their song: "O turn +Thy saintly sight on this thy faithful one, +Who to behold thee many a wearisome pace +Hath measur'd. Gracious at our pray'r vouchsafe +Unveil to him thy cheeks: that he may mark +Thy second beauty, now conceal'd." O splendour! +O sacred light eternal! who is he +So pale with musing in Pierian shades, +Or with that fount so lavishly imbued, +Whose spirit should not fail him in th' essay +To represent thee such as thou didst seem, +When under cope of the still-chiming heaven +Thou gav'st to open air thy charms reveal'd. + + + + +CANTO XXXII + +Mine eyes with such an eager coveting, +Were bent to rid them of their ten years' thirst, +No other sense was waking: and e'en they +Were fenc'd on either side from heed of aught; +So tangled in its custom'd toils that smile +Of saintly brightness drew me to itself, +When forcibly toward the left my sight +The sacred virgins turn'd; for from their lips +I heard the warning sounds: "Too fix'd a gaze!" + +Awhile my vision labor'd; as when late +Upon the' o'erstrained eyes the sun hath smote: +But soon to lesser object, as the view +Was now recover'd (lesser in respect +To that excess of sensible, whence late +I had perforce been sunder'd) on their right +I mark'd that glorious army wheel, and turn, +Against the sun and sev'nfold lights, their front. +As when, their bucklers for protection rais'd, +A well-rang'd troop, with portly banners curl'd, +Wheel circling, ere the whole can change their ground: +E'en thus the goodly regiment of heav'n +Proceeding, all did pass us, ere the car +Had slop'd his beam. Attendant at the wheels +The damsels turn'd; and on the Gryphon mov'd +The sacred burden, with a pace so smooth, +No feather on him trembled. The fair dame +Who through the wave had drawn me, companied +By Statius and myself, pursued the wheel, +Whose orbit, rolling, mark'd a lesser arch. + +Through the high wood, now void (the more her blame, +Who by the serpent was beguil'd) I past +With step in cadence to the harmony +Angelic. Onward had we mov'd, as far +Perchance as arrow at three several flights +Full wing'd had sped, when from her station down +Descended Beatrice. With one voice +All murmur'd "Adam," circling next a plant +Despoil'd of flowers and leaf on every bough. +Its tresses, spreading more as more they rose, +Were such, as 'midst their forest wilds for height +The Indians might have gaz'd at. "Blessed thou! +Gryphon, whose beak hath never pluck'd that tree +Pleasant to taste: for hence the appetite +Was warp'd to evil." Round the stately trunk +Thus shouted forth the rest, to whom return'd +The animal twice-gender'd: "Yea: for so +The generation of the just are sav'd." +And turning to the chariot-pole, to foot +He drew it of the widow'd branch, and bound +There left unto the stock whereon it grew. + +As when large floods of radiance from above +Stream, with that radiance mingled, which ascends +Next after setting of the scaly sign, +Our plants then burgeon, and each wears anew +His wonted colours, ere the sun have yok'd +Beneath another star his flamy steeds; +Thus putting forth a hue, more faint than rose, +And deeper than the violet, was renew'd +The plant, erewhile in all its branches bare. + +Unearthly was the hymn, which then arose. +I understood it not, nor to the end +Endur'd the harmony. Had I the skill +To pencil forth, how clos'd th' unpitying eyes +Slumb'ring, when Syrinx warbled, (eyes that paid +So dearly for their watching,) then like painter, +That with a model paints, I might design +The manner of my falling into sleep. +But feign who will the slumber cunningly; +I pass it by to when I wak'd, and tell +How suddenly a flash of splendour rent +The curtain of my sleep, and one cries out: +"Arise, what dost thou?" As the chosen three, +On Tabor's mount, admitted to behold +The blossoming of that fair tree, whose fruit +Is coveted of angels, and doth make +Perpetual feast in heaven, to themselves +Returning at the word, whence deeper sleeps +Were broken, that they their tribe diminish'd saw, +Both Moses and Elias gone, and chang'd +The stole their master wore: thus to myself +Returning, over me beheld I stand +The piteous one, who cross the stream had brought +My steps. "And where," all doubting, I exclaim'd, +"Is Beatrice?"--"See her," she replied, +"Beneath the fresh leaf seated on its root. +Behold th' associate choir that circles her. +The others, with a melody more sweet +And more profound, journeying to higher realms, +Upon the Gryphon tend." If there her words +Were clos'd, I know not; but mine eyes had now +Ta'en view of her, by whom all other thoughts +Were barr'd admittance. On the very ground +Alone she sat, as she had there been left +A guard upon the wain, which I beheld +Bound to the twyform beast. The seven nymphs +Did make themselves a cloister round about her, +And in their hands upheld those lights secure +From blast septentrion and the gusty south. + +"A little while thou shalt be forester here: +And citizen shalt be forever with me, +Of that true Rome, wherein Christ dwells a Roman +To profit the misguided world, keep now +Thine eyes upon the car; and what thou seest, +Take heed thou write, returning to that place." + +Thus Beatrice: at whose feet inclin'd +Devout, at her behest, my thought and eyes, +I, as she bade, directed. Never fire, +With so swift motion, forth a stormy cloud +Leap'd downward from the welkin's farthest bound, +As I beheld the bird of Jove descending +Pounce on the tree, and, as he rush'd, the rind, +Disparting crush beneath him, buds much more +And leaflets. On the car with all his might +He struck, whence, staggering like a ship, it reel'd, +At random driv'n, to starboard now, o'ercome, +And now to larboard, by the vaulting waves. + +Next springing up into the chariot's womb +A fox I saw, with hunger seeming pin'd +Of all good food. But, for his ugly sins +The saintly maid rebuking him, away +Scamp'ring he turn'd, fast as his hide-bound corpse +Would bear him. Next, from whence before he came, +I saw the eagle dart into the hull +O' th' car, and leave it with his feathers lin'd; +And then a voice, like that which issues forth +From heart with sorrow riv'd, did issue forth +From heav'n, and, "O poor bark of mine!" it cried, +"How badly art thou freighted!" Then, it seem'd, +That the earth open'd between either wheel, +And I beheld a dragon issue thence, +That through the chariot fix'd his forked train; +And like a wasp that draggeth back the sting, +So drawing forth his baleful train, he dragg'd +Part of the bottom forth, and went his way +Exulting. What remain'd, as lively turf +With green herb, so did clothe itself with plumes, +Which haply had with purpose chaste and kind +Been offer'd; and therewith were cloth'd the wheels, +Both one and other, and the beam, so quickly +A sigh were not breath'd sooner. Thus transform'd, +The holy structure, through its several parts, +Did put forth heads, three on the beam, and one +On every side; the first like oxen horn'd, +But with a single horn upon their front +The four. Like monster sight hath never seen. +O'er it methought there sat, secure as rock +On mountain's lofty top, a shameless whore, +Whose ken rov'd loosely round her. At her side, +As 't were that none might bear her off, I saw +A giant stand; and ever, and anon +They mingled kisses. But, her lustful eyes +Chancing on me to wander, that fell minion +Scourg'd her from head to foot all o'er; then full +Of jealousy, and fierce with rage, unloos'd +The monster, and dragg'd on, so far across +The forest, that from me its shades alone +Shielded the harlot and the new-form'd brute. + + +CANTO XXXIII + +"The heathen, Lord! are come!" responsive thus, +The trinal now, and now the virgin band +Quaternion, their sweet psalmody began, +Weeping; and Beatrice listen'd, sad +And sighing, to the song', in such a mood, +That Mary, as she stood beside the cross, +Was scarce more chang'd. But when they gave her place +To speak, then, risen upright on her feet, +She, with a colour glowing bright as fire, +Did answer: "Yet a little while, and ye +Shall see me not; and, my beloved sisters, +Again a little while, and ye shall see me." + +Before her then she marshall'd all the seven, +And, beck'ning only motion'd me, the dame, +And that remaining sage, to follow her. + +So on she pass'd; and had not set, I ween, +Her tenth step to the ground, when with mine eyes +Her eyes encounter'd; and, with visage mild, +"So mend thy pace," she cried, "that if my words +Address thee, thou mayst still be aptly plac'd +To hear them." Soon as duly to her side +I now had hasten'd: "Brother!" she began, +"Why mak'st thou no attempt at questioning, +As thus we walk together?" Like to those +Who, speaking with too reverent an awe +Before their betters, draw not forth the voice +Alive unto their lips, befell me shell +That I in sounds imperfect thus began: +"Lady! what I have need of, that thou know'st, +And what will suit my need." She answering thus: +"Of fearfulness and shame, I will, that thou +Henceforth do rid thee: that thou speak no more, +As one who dreams. Thus far be taught of me: +The vessel, which thou saw'st the serpent break, +Was and is not: let him, who hath the blame, +Hope not to scare God's vengeance with a sop. +Without an heir for ever shall not be +That eagle, he, who left the chariot plum'd, +Which monster made it first and next a prey. +Plainly I view, and therefore speak, the stars +E'en now approaching, whose conjunction, free +From all impediment and bar, brings on +A season, in the which, one sent from God, +(Five hundred, five, and ten, do mark him out) +That foul one, and th' accomplice of her guilt, +The giant, both shall slay. And if perchance +My saying, dark as Themis or as Sphinx, +Fail to persuade thee, (since like them it foils +The intellect with blindness) yet ere long +Events shall be the Naiads, that will solve +This knotty riddle, and no damage light +On flock or field. Take heed; and as these words +By me are utter'd, teach them even so +To those who live that life, which is a race +To death: and when thou writ'st them, keep in mind +Not to conceal how thou hast seen the plant, +That twice hath now been spoil'd. This whoso robs, +This whoso plucks, with blasphemy of deed +Sins against God, who for his use alone +Creating hallow'd it. For taste of this, +In pain and in desire, five thousand years +And upward, the first soul did yearn for him, +Who punish'd in himself the fatal gust. + +"Thy reason slumbers, if it deem this height +And summit thus inverted of the plant, +Without due cause: and were not vainer thoughts, +As Elsa's numbing waters, to thy soul, +And their fond pleasures had not dyed it dark +As Pyramus the mulberry, thou hadst seen, +In such momentous circumstance alone, +God's equal justice morally implied +In the forbidden tree. But since I mark thee +In understanding harden'd into stone, +And, to that hardness, spotted too and stain'd, +So that thine eye is dazzled at my word, +I will, that, if not written, yet at least +Painted thou take it in thee, for the cause, +That one brings home his staff inwreath'd with palm." + +I thus: "As wax by seal, that changeth not +Its impress, now is stamp'd my brain by thee. +But wherefore soars thy wish'd-for speech so high +Beyond my sight, that loses it the more, +The more it strains to reach it?"--"To the end +That thou mayst know," she answer'd straight, "the school, +That thou hast follow'd; and how far behind, +When following my discourse, its learning halts: +And mayst behold your art, from the divine +As distant, as the disagreement is +'Twixt earth and heaven's most high and rapturous orb." + +"I not remember," I replied, "that e'er +I was estrang'd from thee, nor for such fault +Doth conscience chide me." Smiling she return'd: +"If thou canst, not remember, call to mind +How lately thou hast drunk of Lethe's wave; +And, sure as smoke doth indicate a flame, +In that forgetfulness itself conclude +Blame from thy alienated will incurr'd. +From henceforth verily my words shall be +As naked as will suit them to appear +In thy unpractis'd view." More sparkling now, +And with retarded course the sun possess'd +The circle of mid-day, that varies still +As th' aspect varies of each several clime, +When, as one, sent in vaward of a troop +For escort, pauses, if perchance he spy +Vestige of somewhat strange and rare: so paus'd +The sev'nfold band, arriving at the verge +Of a dun umbrage hoar, such as is seen, +Beneath green leaves and gloomy branches, oft +To overbrow a bleak and alpine cliff. +And, where they stood, before them, as it seem'd, +Tigris and Euphrates both beheld, +Forth from one fountain issue; and, like friends, +Linger at parting. "O enlight'ning beam! +O glory of our kind! beseech thee say +What water this, which from one source deriv'd +Itself removes to distance from itself?" + +To such entreaty answer thus was made: +"Entreat Matilda, that she teach thee this." + +And here, as one, who clears himself of blame +Imputed, the fair dame return'd: "Of me +He this and more hath learnt; and I am safe +That Lethe's water hath not hid it from him." + +And Beatrice: "Some more pressing care +That oft the memory 'reeves, perchance hath made +His mind's eye dark. But lo! where Eunoe cows! +Lead thither; and, as thou art wont, revive +His fainting virtue." As a courteous spirit, +That proffers no excuses, but as soon +As he hath token of another's will, +Makes it his own; when she had ta'en me, thus +The lovely maiden mov'd her on, and call'd +To Statius with an air most lady-like: +"Come thou with him." Were further space allow'd, +Then, Reader, might I sing, though but in part, +That beverage, with whose sweetness I had ne'er +Been sated. But, since all the leaves are full, +Appointed for this second strain, mine art +With warning bridle checks me. I return'd +From the most holy wave, regenerate, +If 'en as new plants renew'd with foliage new, +Pure and made apt for mounting to the stars. + + + + + + + +THE VISION + +OF + +HELL + +BY + +DANTE ALIGHIERI + + + +TRANSLATED BY + +THE REV. H. F. CARY, M.A. + + + + + +Cantos 1 - 34 + + + +CANTO I + + +In the midway of this our mortal life, +I found me in a gloomy wood, astray +Gone from the path direct: and e'en to tell +It were no easy task, how savage wild +That forest, how robust and rough its growth, +Which to remember only, my dismay +Renews, in bitterness not far from death. +Yet to discourse of what there good befell, +All else will I relate discover'd there. +How first I enter'd it I scarce can say, +Such sleepy dullness in that instant weigh'd +My senses down, when the true path I left, +But when a mountain's foot I reach'd, where clos'd +The valley, that had pierc'd my heart with dread, +I look'd aloft, and saw his shoulders broad +Already vested with that planet's beam, +Who leads all wanderers safe through every way. + +Then was a little respite to the fear, +That in my heart's recesses deep had lain, +All of that night, so pitifully pass'd: +And as a man, with difficult short breath, +Forespent with toiling, 'scap'd from sea to shore, +Turns to the perilous wide waste, and stands +At gaze; e'en so my spirit, that yet fail'd +Struggling with terror, turn'd to view the straits, +That none hath pass'd and liv'd. My weary frame +After short pause recomforted, again +I journey'd on over that lonely steep, + +The hinder foot still firmer. Scarce the ascent +Began, when, lo! a panther, nimble, light, +And cover'd with a speckled skin, appear'd, +Nor, when it saw me, vanish'd, rather strove +To check my onward going; that ofttimes +With purpose to retrace my steps I turn'd. + +The hour was morning's prime, and on his way +Aloft the sun ascended with those stars, +That with him rose, when Love divine first mov'd +Those its fair works: so that with joyous hope +All things conspir'd to fill me, the gay skin +Of that swift animal, the matin dawn +And the sweet season. Soon that joy was chas'd, +And by new dread succeeded, when in view +A lion came, 'gainst me, as it appear'd, + +With his head held aloft and hunger-mad, +That e'en the air was fear-struck. A she-wolf +Was at his heels, who in her leanness seem'd +Full of all wants, and many a land hath made +Disconsolate ere now. She with such fear +O'erwhelmed me, at the sight of her appall'd, +That of the height all hope I lost. As one, +Who with his gain elated, sees the time +When all unwares is gone, he inwardly +Mourns with heart-griping anguish; such was I, +Haunted by that fell beast, never at peace, +Who coming o'er against me, by degrees +Impell'd me where the sun in silence rests. + +While to the lower space with backward step +I fell, my ken discern'd the form one of one, +Whose voice seem'd faint through long disuse of speech. +When him in that great desert I espied, +"Have mercy on me!" cried I out aloud, +"Spirit! or living man! what e'er thou be!" + +He answer'd: "Now not man, man once I was, +And born of Lombard parents, Mantuana both +By country, when the power of Julius yet +Was scarcely firm. At Rome my life was past +Beneath the mild Augustus, in the time +Of fabled deities and false. A bard +Was I, and made Anchises' upright son +The subject of my song, who came from Troy, +When the flames prey'd on Ilium's haughty towers. +But thou, say wherefore to such perils past +Return'st thou? wherefore not this pleasant mount +Ascendest, cause and source of all delight?" +"And art thou then that Virgil, that well-spring, +From which such copious floods of eloquence +Have issued?" I with front abash'd replied. +"Glory and light of all the tuneful train! +May it avail me that I long with zeal +Have sought thy volume, and with love immense +Have conn'd it o'er. My master thou and guide! +Thou he from whom alone I have deriv'd +That style, which for its beauty into fame +Exalts me. See the beast, from whom I fled. +O save me from her, thou illustrious sage!" + +"For every vein and pulse throughout my frame +She hath made tremble." He, soon as he saw +That I was weeping, answer'd, "Thou must needs +Another way pursue, if thou wouldst 'scape +From out that savage wilderness. This beast, +At whom thou criest, her way will suffer none +To pass, and no less hindrance makes than death: +So bad and so accursed in her kind, +That never sated is her ravenous will, +Still after food more craving than before. +To many an animal in wedlock vile +She fastens, and shall yet to many more, +Until that greyhound come, who shall destroy +Her with sharp pain. He will not life support +By earth nor its base metals, but by love, +Wisdom, and virtue, and his land shall be +The land 'twixt either Feltro. In his might +Shall safety to Italia's plains arise, +For whose fair realm, Camilla, virgin pure, +Nisus, Euryalus, and Turnus fell. +He with incessant chase through every town +Shall worry, until he to hell at length +Restore her, thence by envy first let loose. +I for thy profit pond'ring now devise, +That thou mayst follow me, and I thy guide +Will lead thee hence through an eternal space, +Where thou shalt hear despairing shrieks, and see +Spirits of old tormented, who invoke +A second death; and those next view, who dwell +Content in fire, for that they hope to come, +Whene'er the time may be, among the blest, +Into whose regions if thou then desire +T' ascend, a spirit worthier then I +Must lead thee, in whose charge, when I depart, +Thou shalt be left: for that Almighty King, +Who reigns above, a rebel to his law, +Adjudges me, and therefore hath decreed, +That to his city none through me should come. +He in all parts hath sway; there rules, there holds +His citadel and throne. O happy those, +Whom there he chooses!" I to him in few: +"Bard! by that God, whom thou didst not adore, +I do beseech thee (that this ill and worse +I may escape) to lead me, where thou saidst, +That I Saint Peter's gate may view, and those +Who as thou tell'st, are in such dismal plight." + +Onward he mov'd, I close his steps pursu'd. + + + + +CANTO II + +NOW was the day departing, and the air, +Imbrown'd with shadows, from their toils releas'd +All animals on earth; and I alone +Prepar'd myself the conflict to sustain, +Both of sad pity, and that perilous road, +Which my unerring memory shall retrace. + +O Muses! O high genius! now vouchsafe +Your aid! O mind! that all I saw hast kept +Safe in a written record, here thy worth +And eminent endowments come to proof. + +I thus began: "Bard! thou who art my guide, +Consider well, if virtue be in me +Sufficient, ere to this high enterprise +Thou trust me. Thou hast told that Silvius' sire, +Yet cloth'd in corruptible flesh, among +Th' immortal tribes had entrance, and was there +Sensible present. Yet if heaven's great Lord, +Almighty foe to ill, such favour shew'd, +In contemplation of the high effect, +Both what and who from him should issue forth, +It seems in reason's judgment well deserv'd: +Sith he of Rome, and of Rome's empire wide, +In heaven's empyreal height was chosen sire: +Both which, if truth be spoken, were ordain'd +And 'stablish'd for the holy place, where sits +Who to great Peter's sacred chair succeeds. +He from this journey, in thy song renown'd, +Learn'd things, that to his victory gave rise +And to the papal robe. In after-times +The chosen vessel also travel'd there, +To bring us back assurance in that faith, +Which is the entrance to salvation's way. +But I, why should I there presume? or who +Permits it? not, Aeneas I nor Paul. +Myself I deem not worthy, and none else +Will deem me. I, if on this voyage then +I venture, fear it will in folly end. +Thou, who art wise, better my meaning know'st, +Than I can speak." As one, who unresolves +What he hath late resolv'd, and with new thoughts +Changes his purpose, from his first intent +Remov'd; e'en such was I on that dun coast, +Wasting in thought my enterprise, at first +So eagerly embrac'd. "If right thy words +I scan," replied that shade magnanimous, +"Thy soul is by vile fear assail'd, which oft +So overcasts a man, that he recoils +From noblest resolution, like a beast +At some false semblance in the twilight gloom. +That from this terror thou mayst free thyself, +I will instruct thee why I came, and what +I heard in that same instant, when for thee +Grief touch'd me first. I was among the tribe, +Who rest suspended, when a dame, so blest +And lovely, I besought her to command, +Call'd me; her eyes were brighter than the star +Of day; and she with gentle voice and soft +Angelically tun'd her speech address'd: +"O courteous shade of Mantua! thou whose fame +Yet lives, and shall live long as nature lasts! +A friend, not of my fortune but myself, +On the wide desert in his road has met +Hindrance so great, that he through fear has turn'd. +Now much I dread lest he past help have stray'd, +And I be ris'n too late for his relief, +From what in heaven of him I heard. Speed now, +And by thy eloquent persuasive tongue, +And by all means for his deliverance meet, +Assist him. So to me will comfort spring. +I who now bid thee on this errand forth +Am Beatrice; from a place I come + +(Note: Beatrice. I use this word, as it is +pronounced in the Italian, as consisting of four +syllables, of which the third is a long one.) + +Revisited with joy. Love brought me thence, +Who prompts my speech. When in my Master's sight +I stand, thy praise to him I oft will tell." + +She then was silent, and I thus began: +"O Lady! by whose influence alone, +Mankind excels whatever is contain'd +Within that heaven which hath the smallest orb, +So thy command delights me, that to obey, +If it were done already, would seem late. +No need hast thou farther to speak thy will; +Yet tell the reason, why thou art not loth +To leave that ample space, where to return +Thou burnest, for this centre here beneath." + +She then: "Since thou so deeply wouldst inquire, +I will instruct thee briefly, why no dread +Hinders my entrance here. Those things alone +Are to be fear'd, whence evil may proceed, +None else, for none are terrible beside. +I am so fram'd by God, thanks to his grace! +That any suff'rance of your misery +Touches me not, nor flame of that fierce fire +Assails me. In high heaven a blessed dame +Besides, who mourns with such effectual grief +That hindrance, which I send thee to remove, +That God's stern judgment to her will inclines." +To Lucia calling, her she thus bespake: +"Now doth thy faithful servant need thy aid +And I commend him to thee." At her word +Sped Lucia, of all cruelty the foe, +And coming to the place, where I abode +Seated with Rachel, her of ancient days, +She thus address'd me: "Thou true praise of God! +Beatrice! why is not thy succour lent +To him, who so much lov'd thee, as to leave +For thy sake all the multitude admires? +Dost thou not hear how pitiful his wail, +Nor mark the death, which in the torrent flood, +Swoln mightier than a sea, him struggling holds?" +"Ne'er among men did any with such speed +Haste to their profit, flee from their annoy, +As when these words were spoken, I came here, +Down from my blessed seat, trusting the force +Of thy pure eloquence, which thee, and all +Who well have mark'd it, into honour brings." + +"When she had ended, her bright beaming eyes +Tearful she turn'd aside; whereat I felt +Redoubled zeal to serve thee. As she will'd, +Thus am I come: I sav'd thee from the beast, +Who thy near way across the goodly mount +Prevented. What is this comes o'er thee then? +Why, why dost thou hang back? why in thy breast +Harbour vile fear? why hast not courage there +And noble daring? Since three maids so blest +Thy safety plan, e'en in the court of heaven; +And so much certain good my words forebode." + +As florets, by the frosty air of night +Bent down and clos'd, when day has blanch'd their leaves, +Rise all unfolded on their spiry stems; +So was my fainting vigour new restor'd, +And to my heart such kindly courage ran, +That I as one undaunted soon replied: +"O full of pity she, who undertook +My succour! and thou kind who didst perform +So soon her true behest! With such desire +Thou hast dispos'd me to renew my voyage, +That my first purpose fully is resum'd. +Lead on: one only will is in us both. +Thou art my guide, my master thou, and lord." + +So spake I; and when he had onward mov'd, +I enter'd on the deep and woody way. + + + + +CANTO III + +"THROUGH me you pass into the city of woe: +Through me you pass into eternal pain: +Through me among the people lost for aye. +Justice the founder of my fabric mov'd: +To rear me was the task of power divine, +Supremest wisdom, and primeval love. +Before me things create were none, save things +Eternal, and eternal I endure. + +"All hope abandon ye who enter here." + +Such characters in colour dim I mark'd +Over a portal's lofty arch inscrib'd: +Whereat I thus: "Master, these words import +Hard meaning." He as one prepar'd replied: +"Here thou must all distrust behind thee leave; +Here be vile fear extinguish'd. We are come +Where I have told thee we shall see the souls +To misery doom'd, who intellectual good +Have lost." And when his hand he had stretch'd forth +To mine, with pleasant looks, whence I was cheer'd, +Into that secret place he led me on. + +Here sighs with lamentations and loud moans +Resounded through the air pierc'd by no star, +That e'en I wept at entering. Various tongues, +Horrible languages, outcries of woe, +Accents of anger, voices deep and hoarse, +With hands together smote that swell'd the sounds, +Made up a tumult, that for ever whirls +Round through that air with solid darkness stain'd, +Like to the sand that in the whirlwind flies. + +I then, with error yet encompass'd, cried: +"O master! What is this I hear? What race +Are these, who seem so overcome with woe?" + +He thus to me: "This miserable fate +Suffer the wretched souls of those, who liv'd +Without or praise or blame, with that ill band +Of angels mix'd, who nor rebellious prov'd +Nor yet were true to God, but for themselves +Were only. From his bounds Heaven drove them forth, +Not to impair his lustre, nor the depth +Of Hell receives them, lest th' accursed tribe +Should glory thence with exultation vain." + +I then: "Master! what doth aggrieve them thus, +That they lament so loud?" He straight replied: +"That will I tell thee briefly. These of death +No hope may entertain: and their blind life +So meanly passes, that all other lots +They envy. Fame of them the world hath none, +Nor suffers; mercy and justice scorn them both. +Speak not of them, but look, and pass them by." + +And I, who straightway look'd, beheld a flag, +Which whirling ran around so rapidly, +That it no pause obtain'd: and following came +Such a long train of spirits, I should ne'er +Have thought, that death so many had despoil'd. + +When some of these I recogniz'd, I saw +And knew the shade of him, who to base fear +Yielding, abjur'd his high estate. Forthwith +I understood for certain this the tribe +Of those ill spirits both to God displeasing +And to his foes. These wretches, who ne'er lived, +Went on in nakedness, and sorely stung +By wasps and hornets, which bedew'd their cheeks +With blood, that mix'd with tears dropp'd to their feet, +And by disgustful worms was gather'd there. + +Then looking farther onwards I beheld +A throng upon the shore of a great stream: +Whereat I thus: "Sir! grant me now to know +Whom here we view, and whence impell'd they seem +So eager to pass o'er, as I discern +Through the blear light?" He thus to me in few: +"This shalt thou know, soon as our steps arrive +Beside the woeful tide of Acheron." + +Then with eyes downward cast and fill'd with shame, +Fearing my words offensive to his ear, +Till we had reach'd the river, I from speech +Abstain'd. And lo! toward us in a bark +Comes on an old man hoary white with eld, + +Crying, "Woe to you wicked spirits! hope not +Ever to see the sky again. I come +To take you to the other shore across, +Into eternal darkness, there to dwell +In fierce heat and in ice. And thou, who there +Standest, live spirit! get thee hence, and leave +These who are dead." But soon as he beheld +I left them not, "By other way," said he, +"By other haven shalt thou come to shore, +Not by this passage; thee a nimbler boat +Must carry." Then to him thus spake my guide: +"Charon! thyself torment not: so 't is will'd, +Where will and power are one: ask thou no more." + +Straightway in silence fell the shaggy cheeks +Of him the boatman o'er the livid lake, +Around whose eyes glar'd wheeling flames. Meanwhile +Those spirits, faint and naked, color chang'd, +And gnash'd their teeth, soon as the cruel words +They heard. God and their parents they blasphem'd, +The human kind, the place, the time, and seed +That did engender them and give them birth. + +Then all together sorely wailing drew +To the curs'd strand, that every man must pass +Who fears not God. Charon, demoniac form, +With eyes of burning coal, collects them all, +Beck'ning, and each, that lingers, with his oar +Strikes. As fall off the light autumnal leaves, +One still another following, till the bough +Strews all its honours on the earth beneath; + +E'en in like manner Adam's evil brood +Cast themselves one by one down from the shore, +Each at a beck, as falcon at his call. + +Thus go they over through the umber'd wave, +And ever they on the opposing bank +Be landed, on this side another throng +Still gathers. "Son," thus spake the courteous guide, +"Those, who die subject to the wrath of God, +All here together come from every clime, +And to o'erpass the river are not loth: +For so heaven's justice goads them on, that fear +Is turn'd into desire. Hence ne'er hath past +Good spirit. If of thee Charon complain, +Now mayst thou know the import of his words." + +This said, the gloomy region trembling shook +So terribly, that yet with clammy dews +Fear chills my brow. The sad earth gave a blast, +That, lightening, shot forth a vermilion flame, +Which all my senses conquer'd quite, and I +Down dropp'd, as one with sudden slumber seiz'd. + + + + +CANTO IV + +BROKE the deep slumber in my brain a crash +Of heavy thunder, that I shook myself, +As one by main force rous'd. Risen upright, +My rested eyes I mov'd around, and search'd +With fixed ken to know what place it was, +Wherein I stood. For certain on the brink +I found me of the lamentable vale, +The dread abyss, that joins a thund'rous sound +Of plaints innumerable. Dark and deep, +And thick with clouds o'erspread, mine eye in vain +Explor'd its bottom, nor could aught discern. + +"Now let us to the blind world there beneath +Descend;" the bard began all pale of look: +"I go the first, and thou shalt follow next." + +Then I his alter'd hue perceiving, thus: +"How may I speed, if thou yieldest to dread, +Who still art wont to comfort me in doubt?" + +He then: "The anguish of that race below +With pity stains my cheek, which thou for fear +Mistakest. Let us on. Our length of way +Urges to haste." Onward, this said, he mov'd; +And ent'ring led me with him on the bounds +Of the first circle, that surrounds th' abyss. +Here, as mine ear could note, no plaint was heard +Except of sighs, that made th' eternal air +Tremble, not caus'd by tortures, but from grief +Felt by those multitudes, many and vast, +Of men, women, and infants. Then to me +The gentle guide: "Inquir'st thou not what spirits +Are these, which thou beholdest? Ere thou pass +Farther, I would thou know, that these of sin +Were blameless; and if aught they merited, +It profits not, since baptism was not theirs, +The portal to thy faith. If they before +The Gospel liv'd, they serv'd not God aright; +And among such am I. For these defects, +And for no other evil, we are lost;" + +"Only so far afflicted, that we live +Desiring without hope." So grief assail'd +My heart at hearing this, for well I knew +Suspended in that Limbo many a soul +Of mighty worth. "O tell me, sire rever'd! +Tell me, my master!" I began through wish +Of full assurance in that holy faith, +Which vanquishes all error; "say, did e'er +Any, or through his own or other's merit, +Come forth from thence, whom afterward was blest?" + +Piercing the secret purport of my speech, +He answer'd: "I was new to that estate, +When I beheld a puissant one arrive +Amongst us, with victorious trophy crown'd. +He forth the shade of our first parent drew, +Abel his child, and Noah righteous man, +Of Moses lawgiver for faith approv'd, +Of patriarch Abraham, and David king, +Israel with his sire and with his sons, +Nor without Rachel whom so hard he won, +And others many more, whom he to bliss +Exalted. Before these, be thou assur'd, +No spirit of human kind was ever sav'd." + +We, while he spake, ceas'd not our onward road, +Still passing through the wood; for so I name +Those spirits thick beset. We were not far +On this side from the summit, when I kenn'd +A flame, that o'er the darken'd hemisphere +Prevailing shin'd. Yet we a little space +Were distant, not so far but I in part +Discover'd, that a tribe in honour high +That place possess'd. "O thou, who every art +And science valu'st! who are these, that boast +Such honour, separate from all the rest?" + +He answer'd: "The renown of their great names +That echoes through your world above, acquires +Favour in heaven, which holds them thus advanc'd." +Meantime a voice I heard: "Honour the bard +Sublime! his shade returns that left us late!" +No sooner ceas'd the sound, than I beheld +Four mighty spirits toward us bend their steps, +Of semblance neither sorrowful nor glad. + +When thus my master kind began: "Mark him, +Who in his right hand bears that falchion keen, +The other three preceding, as their lord. +This is that Homer, of all bards supreme: +Flaccus the next in satire's vein excelling; +The third is Naso; Lucan is the last. +Because they all that appellation own, +With which the voice singly accosted me, +Honouring they greet me thus, and well they judge." + +So I beheld united the bright school +Of him the monarch of sublimest song, +That o'er the others like an eagle soars. +When they together short discourse had held, +They turn'd to me, with salutation kind +Beck'ning me; at the which my master smil'd: +Nor was this all; but greater honour still +They gave me, for they made me of their tribe; +And I was sixth amid so learn'd a band. + +Far as the luminous beacon on we pass'd +Speaking of matters, then befitting well +To speak, now fitter left untold. At foot +Of a magnificent castle we arriv'd, +Seven times with lofty walls begirt, and round +Defended by a pleasant stream. O'er this +As o'er dry land we pass'd. Next through seven gates +I with those sages enter'd, and we came +Into a mead with lively verdure fresh. + +There dwelt a race, who slow their eyes around +Majestically mov'd, and in their port +Bore eminent authority; they spake +Seldom, but all their words were tuneful sweet. + +We to one side retir'd, into a place +Open and bright and lofty, whence each one +Stood manifest to view. Incontinent +There on the green enamel of the plain +Were shown me the great spirits, by whose sight +I am exalted in my own esteem. + +Electra there I saw accompanied +By many, among whom Hector I knew, +Anchises' pious son, and with hawk's eye +Caesar all arm'd, and by Camilla there +Penthesilea. On the other side +Old King Latinus, seated by his child +Lavinia, and that Brutus I beheld, +Who Tarquin chas'd, Lucretia, Cato's wife +Marcia, with Julia and Cornelia there; +And sole apart retir'd, the Soldan fierce. + +Then when a little more I rais'd my brow, +I spied the master of the sapient throng, +Seated amid the philosophic train. +Him all admire, all pay him rev'rence due. +There Socrates and Plato both I mark'd, +Nearest to him in rank; Democritus, +Who sets the world at chance, Diogenes, +With Heraclitus, and Empedocles, +And Anaxagoras, and Thales sage, +Zeno, and Dioscorides well read +In nature's secret lore. Orpheus I mark'd +And Linus, Tully and moral Seneca, +Euclid and Ptolemy, Hippocrates, +Galenus, Avicen, and him who made +That commentary vast, Averroes. + +Of all to speak at full were vain attempt; +For my wide theme so urges, that ofttimes +My words fall short of what bechanc'd. In two +The six associates part. Another way +My sage guide leads me, from that air serene, +Into a climate ever vex'd with storms: +And to a part I come where no light shines. + + + + +CANTO V + +FROM the first circle I descended thus +Down to the second, which, a lesser space +Embracing, so much more of grief contains +Provoking bitter moans. There, Minos stands +Grinning with ghastly feature: he, of all +Who enter, strict examining the crimes, + +Gives sentence, and dismisses them beneath, +According as he foldeth him around: +For when before him comes th' ill fated soul, +It all confesses; and that judge severe +Of sins, considering what place in hell +Suits the transgression, with his tail so oft +Himself encircles, as degrees beneath +He dooms it to descend. Before him stand +Always a num'rous throng; and in his turn +Each one to judgment passing, speaks, and hears +His fate, thence downward to his dwelling hurl'd. + +"O thou! who to this residence of woe +Approachest?" when he saw me coming, cried +Minos, relinquishing his dread employ, +"Look how thou enter here; beware in whom +Thou place thy trust; let not the entrance broad +Deceive thee to thy harm." To him my guide: +"Wherefore exclaimest? Hinder not his way +By destiny appointed; so 'tis will'd +Where will and power are one. Ask thou no more." + +Now 'gin the rueful wailings to be heard. +Now am I come where many a plaining voice +Smites on mine ear. Into a place I came +Where light was silent all. Bellowing there groan'd +A noise as of a sea in tempest torn +By warring winds. The stormy blast of hell +With restless fury drives the spirits on +Whirl'd round and dash'd amain with sore annoy. + +When they arrive before the ruinous sweep, +There shrieks are heard, there lamentations, moans, +And blasphemies 'gainst the good Power in heaven. + +I understood that to this torment sad +The carnal sinners are condemn'd, in whom +Reason by lust is sway'd. As in large troops +And multitudinous, when winter reigns, +The starlings on their wings are borne abroad; +So bears the tyrannous gust those evil souls. +On this side and on that, above, below, +It drives them: hope of rest to solace them +Is none, nor e'en of milder pang. As cranes, +Chanting their dol'rous notes, traverse the sky, +Stretch'd out in long array: so I beheld +Spirits, who came loud wailing, hurried on +By their dire doom. Then I: "Instructor! who +Are these, by the black air so scourg'd?"--"The first +'Mong those, of whom thou question'st," he replied, +"O'er many tongues was empress. She in vice +Of luxury was so shameless, that she made +Liking be lawful by promulg'd decree, +To clear the blame she had herself incurr'd. +This is Semiramis, of whom 'tis writ, +That she succeeded Ninus her espous'd; +And held the land, which now the Soldan rules. +The next in amorous fury slew herself, +And to Sicheus' ashes broke her faith: +Then follows Cleopatra, lustful queen." + +There mark'd I Helen, for whose sake so long +The time was fraught with evil; there the great +Achilles, who with love fought to the end. +Paris I saw, and Tristan; and beside +A thousand more he show'd me, and by name +Pointed them out, whom love bereav'd of life. + +When I had heard my sage instructor name +Those dames and knights of antique days, o'erpower'd +By pity, well-nigh in amaze my mind +Was lost; and I began: "Bard! willingly +I would address those two together coming, +Which seem so light before the wind." He thus: +"Note thou, when nearer they to us approach." + +"Then by that love which carries them along, +Entreat; and they will come." Soon as the wind +Sway'd them toward us, I thus fram'd my speech: +"O wearied spirits! come, and hold discourse +With us, if by none else restrain'd." As doves +By fond desire invited, on wide wings +And firm, to their sweet nest returning home, +Cleave the air, wafted by their will along; +Thus issu'd from that troop, where Dido ranks, +They through the ill air speeding; with such force +My cry prevail'd by strong affection urg'd. + +"O gracious creature and benign! who go'st +Visiting, through this element obscure, +Us, who the world with bloody stain imbru'd; +If for a friend the King of all we own'd, +Our pray'r to him should for thy peace arise, +Since thou hast pity on our evil plight. +()f whatsoe'er to hear or to discourse +It pleases thee, that will we hear, of that +Freely with thee discourse, while e'er the wind, +As now, is mute. The land, that gave me birth, +Is situate on the coast, where Po descends +To rest in ocean with his sequent streams. + +"Love, that in gentle heart is quickly learnt, +Entangled him by that fair form, from me +Ta'en in such cruel sort, as grieves me still: +Love, that denial takes from none belov'd, +Caught me with pleasing him so passing well, +That, as thou see'st, he yet deserts me not. + +"Love brought us to one death: Caina waits +The soul, who spilt our life." Such were their words; +At hearing which downward I bent my looks, +And held them there so long, that the bard cried: +"What art thou pond'ring?" I in answer thus: +"Alas! by what sweet thoughts, what fond desire +Must they at length to that ill pass have reach'd!" + +Then turning, I to them my speech address'd. +And thus began: "Francesca! your sad fate +Even to tears my grief and pity moves. +But tell me; in the time of your sweet sighs, +By what, and how love granted, that ye knew +Your yet uncertain wishes?" She replied: +"No greater grief than to remember days +Of joy, when mis'ry is at hand! That kens +Thy learn'd instructor. Yet so eagerly +If thou art bent to know the primal root, +From whence our love gat being, I will do, +As one, who weeps and tells his tale. One day +For our delight we read of Lancelot, +How him love thrall'd. Alone we were, and no +Suspicion near us. Ofttimes by that reading +Our eyes were drawn together, and the hue +Fled from our alter'd cheek. But at one point +Alone we fell. When of that smile we read, +The wished smile, rapturously kiss'd +By one so deep in love, then he, who ne'er +From me shall separate, at once my lips +All trembling kiss'd. The book and writer both +Were love's purveyors. In its leaves that day +We read no more." While thus one spirit spake, +The other wail'd so sorely, that heartstruck +I through compassion fainting, seem'd not far +From death, and like a corpse fell to the ground. + +CANTO VI + +MY sense reviving, that erewhile had droop'd +With pity for the kindred shades, whence grief +O'ercame me wholly, straight around I see +New torments, new tormented souls, which way +Soe'er I move, or turn, or bend my sight. +In the third circle I arrive, of show'rs +Ceaseless, accursed, heavy, and cold, unchang'd +For ever, both in kind and in degree. +Large hail, discolour'd water, sleety flaw +Through the dun midnight air stream'd down amain: +Stank all the land whereon that tempest fell. + +Cerberus, cruel monster, fierce and strange, +Through his wide threefold throat barks as a dog +Over the multitude immers'd beneath. +His eyes glare crimson, black his unctuous beard, +His belly large, and claw'd the hands, with which +He tears the spirits, flays them, and their limbs +Piecemeal disparts. Howling there spread, as curs, +Under the rainy deluge, with one side +The other screening, oft they roll them round, +A wretched, godless crew. When that great worm +Descried us, savage Cerberus, he op'd +His jaws, and the fangs show'd us; not a limb +Of him but trembled. Then my guide, his palms +Expanding on the ground, thence filled with earth +Rais'd them, and cast it in his ravenous maw. + +E'en as a dog, that yelling bays for food +His keeper, when the morsel comes, lets fall +His fury, bent alone with eager haste +To swallow it; so dropp'd the loathsome cheeks +Of demon Cerberus, who thund'ring stuns +The spirits, that they for deafness wish in vain. + +We, o'er the shades thrown prostrate by the brunt +Of the heavy tempest passing, set our feet +Upon their emptiness, that substance seem'd. + +They all along the earth extended lay +Save one, that sudden rais'd himself to sit, +Soon as that way he saw us pass. "O thou!" +He cried, "who through the infernal shades art led, +Own, if again thou know'st me. Thou wast fram'd +Or ere my frame was broken." I replied: +"The anguish thou endur'st perchance so takes +Thy form from my remembrance, that it seems +As if I saw thee never. But inform +Me who thou art, that in a place so sad +Art set, and in such torment, that although +Other be greater, more disgustful none +Can be imagin'd." He in answer thus: + +"Thy city heap'd with envy to the brim, +Ay that the measure overflows its bounds, +Held me in brighter days. Ye citizens +Were wont to name me Ciacco. For the sin +Of glutt'ny, damned vice, beneath this rain, +E'en as thou see'st, I with fatigue am worn; +Nor I sole spirit in this woe: all these +Have by like crime incurr'd like punishment." + +No more he said, and I my speech resum'd: +"Ciacco! thy dire affliction grieves me much, +Even to tears. But tell me, if thou know'st, +What shall at length befall the citizens +Of the divided city; whether any just one +Inhabit there: and tell me of the cause, +Whence jarring discord hath assail'd it thus?" + +He then: "After long striving they will come +To blood; and the wild party from the woods +Will chase the other with much injury forth. +Then it behoves, that this must fall, within +Three solar circles; and the other rise +By borrow'd force of one, who under shore +Now rests. It shall a long space hold aloof +Its forehead, keeping under heavy weight +The other oppress'd, indignant at the load, +And grieving sore. The just are two in number, +But they neglected. Av'rice, envy, pride, +Three fatal sparks, have set the hearts of all +On fire." Here ceas'd the lamentable sound; +And I continu'd thus: "Still would I learn +More from thee, farther parley still entreat. +Of Farinata and Tegghiaio say, +They who so well deserv'd, of Giacopo, +Arrigo, Mosca, and the rest, who bent +Their minds on working good. Oh! tell me where +They bide, and to their knowledge let me come. +For I am press'd with keen desire to hear, +If heaven's sweet cup or poisonous drug of hell +Be to their lip assign'd." He answer'd straight: +"These are yet blacker spirits. Various crimes +Have sunk them deeper in the dark abyss. +If thou so far descendest, thou mayst see them. +But to the pleasant world when thou return'st, +Of me make mention, I entreat thee, there. +No more I tell thee, answer thee no more." + +This said, his fixed eyes he turn'd askance, +A little ey'd me, then bent down his head, +And 'midst his blind companions with it fell. + +When thus my guide: "No more his bed he leaves, +Ere the last angel-trumpet blow. The Power +Adverse to these shall then in glory come, +Each one forthwith to his sad tomb repair, +Resume his fleshly vesture and his form, +And hear the eternal doom re-echoing rend +The vault." So pass'd we through that mixture foul +Of spirits and rain, with tardy steps; meanwhile +Touching, though slightly, on the life to come. +For thus I question'd: "Shall these tortures, Sir! +When the great sentence passes, be increas'd, +Or mitigated, or as now severe?" + +He then: "Consult thy knowledge; that decides +That as each thing to more perfection grows, +It feels more sensibly both good and pain. +Though ne'er to true perfection may arrive +This race accurs'd, yet nearer then than now +They shall approach it." Compassing that path +Circuitous we journeyed, and discourse +Much more than I relate between us pass'd: +Till at the point, where the steps led below, +Arriv'd, there Plutus, the great foe, we found. + + + + +CANTO VII + +"AH me! O Satan! Satan!" loud exclaim'd +Plutus, in accent hoarse of wild alarm: +And the kind sage, whom no event surpris'd, +To comfort me thus spake: "Let not thy fear +Harm thee, for power in him, be sure, is none +To hinder down this rock thy safe descent." +Then to that sworn lip turning, "Peace!" he cried, + +"Curs'd wolf! thy fury inward on thyself +Prey, and consume thee! Through the dark profound +Not without cause he passes. So 't is will'd +On high, there where the great Archangel pour'd +Heav'n's vengeance on the first adulterer proud." + +As sails full spread and bellying with the wind +Drop suddenly collaps'd, if the mast split; +So to the ground down dropp'd the cruel fiend. + +Thus we, descending to the fourth steep ledge, +Gain'd on the dismal shore, that all the woe +Hems in of all the universe. Ah me! +Almighty Justice! in what store thou heap'st +New pains, new troubles, as I here beheld! +Wherefore doth fault of ours bring us to this? + +E'en as a billow, on Charybdis rising, +Against encounter'd billow dashing breaks; +Such is the dance this wretched race must lead, +Whom more than elsewhere numerous here I found, +From one side and the other, with loud voice, +Both roll'd on weights by main forge of their breasts, +Then smote together, and each one forthwith +Roll'd them back voluble, turning again, +Exclaiming these, "Why holdest thou so fast?" +Those answering, "And why castest thou away?" +So still repeating their despiteful song, +They to the opposite point on either hand +Travers'd the horrid circle: then arriv'd, +Both turn'd them round, and through the middle space +Conflicting met again. At sight whereof +I, stung with grief, thus spake: "O say, my guide! +What race is this? Were these, whose heads are shorn, +On our left hand, all sep'rate to the church?" + +He straight replied: "In their first life these all +In mind were so distorted, that they made, +According to due measure, of their wealth, +No use. This clearly from their words collect, +Which they howl forth, at each extremity +Arriving of the circle, where their crime +Contrary' in kind disparts them. To the church +Were separate those, that with no hairy cowls +Are crown'd, both Popes and Cardinals, o'er whom +Av'rice dominion absolute maintains." + +I then: "Mid such as these some needs must be, +Whom I shall recognize, that with the blot +Of these foul sins were stain'd." He answering thus: +"Vain thought conceiv'st thou. That ignoble life, +Which made them vile before, now makes them dark, +And to all knowledge indiscernible. +Forever they shall meet in this rude shock: +These from the tomb with clenched grasp shall rise, +Those with close-shaven locks. That ill they gave, +And ill they kept, hath of the beauteous world +Depriv'd, and set them at this strife, which needs +No labour'd phrase of mine to set if off. +Now may'st thou see, my son! how brief, how vain, +The goods committed into fortune's hands, +For which the human race keep such a coil! +Not all the gold, that is beneath the moon, +Or ever hath been, of these toil-worn souls +Might purchase rest for one." I thus rejoin'd: + +"My guide! of thee this also would I learn; +This fortune, that thou speak'st of, what it is, +Whose talons grasp the blessings of the world?" + +He thus: "O beings blind! what ignorance +Besets you? Now my judgment hear and mark. +He, whose transcendent wisdom passes all, +The heavens creating, gave them ruling powers +To guide them, so that each part shines to each, +Their light in equal distribution pour'd. +By similar appointment he ordain'd +Over the world's bright images to rule. +Superintendence of a guiding hand +And general minister, which at due time +May change the empty vantages of life +From race to race, from one to other's blood, +Beyond prevention of man's wisest care: +Wherefore one nation rises into sway, +Another languishes, e'en as her will +Decrees, from us conceal'd, as in the grass +The serpent train. Against her nought avails +Your utmost wisdom. She with foresight plans, +Judges, and carries on her reign, as theirs +The other powers divine. Her changes know +Nore intermission: by necessity +She is made swift, so frequent come who claim +Succession in her favours. This is she, +So execrated e'en by those, whose debt +To her is rather praise; they wrongfully +With blame requite her, and with evil word; +But she is blessed, and for that recks not: +Amidst the other primal beings glad +Rolls on her sphere, and in her bliss exults. +Now on our way pass we, to heavier woe +Descending: for each star is falling now, +That mounted at our entrance, and forbids +Too long our tarrying." We the circle cross'd +To the next steep, arriving at a well, +That boiling pours itself down to a foss +Sluic'd from its source. Far murkier was the wave +Than sablest grain: and we in company +Of the' inky waters, journeying by their side, +Enter'd, though by a different track, beneath. +Into a lake, the Stygian nam'd, expands +The dismal stream, when it hath reach'd the foot +Of the grey wither'd cliffs. Intent I stood +To gaze, and in the marish sunk descried +A miry tribe, all naked, and with looks +Betok'ning rage. They with their hands alone +Struck not, but with the head, the breast, the feet, +Cutting each other piecemeal with their fangs. + +The good instructor spake; "Now seest thou, son! +The souls of those, whom anger overcame. +This too for certain know, that underneath +The water dwells a multitude, whose sighs +Into these bubbles make the surface heave, +As thine eye tells thee wheresoe'er it turn." +Fix'd in the slime they say: "Sad once were we +In the sweet air made gladsome by the sun, +Carrying a foul and lazy mist within: +Now in these murky settlings are we sad." +Such dolorous strain they gurgle in their throats. +But word distinct can utter none." Our route +Thus compass'd we, a segment widely stretch'd +Between the dry embankment, and the core +Of the loath'd pool, turning meanwhile our eyes +Downward on those who gulp'd its muddy lees; +Nor stopp'd, till to a tower's low base we came. + + + + +CANTO VIII + +MY theme pursuing, I relate that ere +We reach'd the lofty turret's base, our eyes +Its height ascended, where two cressets hung +We mark'd, and from afar another light +Return the signal, so remote, that scarce +The eye could catch its beam. I turning round +To the deep source of knowledge, thus inquir'd: +"Say what this means? and what that other light +In answer set? what agency doth this?" + +"There on the filthy waters," he replied, +"E'en now what next awaits us mayst thou see, +If the marsh-gender'd fog conceal it not." + +Never was arrow from the cord dismiss'd, +That ran its way so nimbly through the air, +As a small bark, that through the waves I spied +Toward us coming, under the sole sway +Of one that ferried it, who cried aloud: +"Art thou arriv'd, fell spirit?"--"Phlegyas, Phlegyas, +This time thou criest in vain," my lord replied; +"No longer shalt thou have us, but while o'er +The slimy pool we pass." As one who hears +Of some great wrong he hath sustain'd, whereat +Inly he pines; so Phlegyas inly pin'd +In his fierce ire. My guide descending stepp'd +Into the skiff, and bade me enter next +Close at his side; nor till my entrance seem'd +The vessel freighted. Soon as both embark'd, +Cutting the waves, goes on the ancient prow, +More deeply than with others it is wont. + +While we our course o'er the dead channel held. +One drench'd in mire before me came, and said; +"Who art thou, that thou comest ere thine hour?" + +I answer'd: "Though I come, I tarry not; +But who art thou, that art become so foul?" + +"One, as thou seest, who mourn:" he straight replied. + +To which I thus: "In mourning and in woe, +Curs'd spirit! tarry thou.g I know thee well, +E'en thus in filth disguis'd." Then stretch'd he forth +Hands to the bark; whereof my teacher sage +Aware, thrusting him back: "Away! down there; + +"To the' other dogs!" then, with his arms my neck +Encircling, kiss'd my cheek, and spake: "O soul +Justly disdainful! blest was she in whom +Thou was conceiv'd! He in the world was one +For arrogance noted; to his memory +No virtue lends its lustre; even so +Here is his shadow furious. There above +How many now hold themselves mighty kings +Who here like swine shall wallow in the mire, +Leaving behind them horrible dispraise!" + +I then: "Master! him fain would I behold +Whelm'd in these dregs, before we quit the lake." + +He thus: "Or ever to thy view the shore +Be offer'd, satisfied shall be that wish, +Which well deserves completion." Scarce his words +Were ended, when I saw the miry tribes +Set on him with such violence, that yet +For that render I thanks to God and praise +"To Filippo Argenti:" cried they all: +And on himself the moody Florentine +Turn'd his avenging fangs. Him here we left, +Nor speak I of him more. But on mine ear +Sudden a sound of lamentation smote, +Whereat mine eye unbarr'd I sent abroad. + +And thus the good instructor: "Now, my son! +Draws near the city, that of Dis is nam'd, +With its grave denizens, a mighty throng." + +I thus: "The minarets already, Sir! +There certes in the valley I descry, +Gleaming vermilion, as if they from fire +Had issu'd." He replied: "Eternal fire, +That inward burns, shows them with ruddy flame +Illum'd; as in this nether hell thou seest." + +We came within the fosses deep, that moat +This region comfortless. The walls appear'd +As they were fram'd of iron. We had made +Wide circuit, ere a place we reach'd, where loud +The mariner cried vehement: "Go forth! +The' entrance is here!" Upon the gates I spied +More than a thousand, who of old from heaven +Were hurl'd. With ireful gestures, "Who is this," +They cried, "that without death first felt, goes through +The regions of the dead?" My sapient guide +Made sign that he for secret parley wish'd; +Whereat their angry scorn abating, thus +They spake: "Come thou alone; and let him go +Who hath so hardily enter'd this realm. +Alone return he by his witless way; +If well he know it, let him prove. For thee, +Here shalt thou tarry, who through clime so dark +Hast been his escort." Now bethink thee, reader! +What cheer was mine at sound of those curs'd words. +I did believe I never should return. + +"O my lov'd guide! who more than seven times +Security hast render'd me, and drawn +From peril deep, whereto I stood expos'd, +Desert me not," I cried, "in this extreme. +And if our onward going be denied, +Together trace we back our steps with speed." + +My liege, who thither had conducted me, +Replied: "Fear not: for of our passage none +Hath power to disappoint us, by such high +Authority permitted. But do thou +Expect me here; meanwhile thy wearied spirit +Comfort, and feed with kindly hope, assur'd +I will not leave thee in this lower world." + +This said, departs the sire benevolent, +And quits me. Hesitating I remain +At war 'twixt will and will not in my thoughts. + +I could not hear what terms he offer'd them, +But they conferr'd not long, for all at once +To trial fled within. Clos'd were the gates +By those our adversaries on the breast +Of my liege lord: excluded he return'd +To me with tardy steps. Upon the ground +His eyes were bent, and from his brow eras'd +All confidence, while thus with sighs he spake: +"Who hath denied me these abodes of woe?" +Then thus to me: "That I am anger'd, think +No ground of terror: in this trial I +Shall vanquish, use what arts they may within +For hindrance. This their insolence, not new, +Erewhile at gate less secret they display'd, +Which still is without bolt; upon its arch +Thou saw'st the deadly scroll: and even now +On this side of its entrance, down the steep, +Passing the circles, unescorted, comes +One whose strong might can open us this land." + + + + +CANTO IX + +THE hue, which coward dread on my pale cheeks +Imprinted, when I saw my guide turn back, +Chas'd that from his which newly they had worn, +And inwardly restrain'd it. He, as one +Who listens, stood attentive: for his eye +Not far could lead him through the sable air, +And the thick-gath'ring cloud. "It yet behooves +We win this fight"--thus he began--"if not-- +Such aid to us is offer'd.--Oh, how long +Me seems it, ere the promis'd help arrive!" + +I noted, how the sequel of his words +Clok'd their beginning; for the last he spake +Agreed not with the first. But not the less +My fear was at his saying; sith I drew +To import worse perchance, than that he held, +His mutilated speech. "Doth ever any +Into this rueful concave's extreme depth +Descend, out of the first degree, whose pain +Is deprivation merely of sweet hope?" + +Thus I inquiring. "Rarely," he replied, +"It chances, that among us any makes +This journey, which I wend. Erewhile 'tis true +Once came I here beneath, conjur'd by fell +Erictho, sorceress, who compell'd the shades +Back to their bodies. No long space my flesh +Was naked of me, when within these walls +She made me enter, to draw forth a spirit +From out of Judas' circle. Lowest place +Is that of all, obscurest, and remov'd +Farthest from heav'n's all-circling orb. The road +Full well I know: thou therefore rest secure. +That lake, the noisome stench exhaling, round +The city' of grief encompasses, which now +We may not enter without rage." Yet more +He added: but I hold it not in mind, +For that mine eye toward the lofty tower +Had drawn me wholly, to its burning top. +Where in an instant I beheld uprisen +At once three hellish furies stain'd with blood: +In limb and motion feminine they seem'd; +Around them greenest hydras twisting roll'd +Their volumes; adders and cerastes crept +Instead of hair, and their fierce temples bound. + +He knowing well the miserable hags +Who tend the queen of endless woe, thus spake: + +"Mark thou each dire Erinnys. To the left +This is Megaera; on the right hand she, +Who wails, Alecto; and Tisiphone +I' th' midst." This said, in silence he remain'd +Their breast they each one clawing tore; themselves +Smote with their palms, and such shrill clamour rais'd, +That to the bard I clung, suspicion-bound. +"Hasten Medusa: so to adamant +Him shall we change;" all looking down exclaim'd. +"E'en when by Theseus' might assail'd, we took +No ill revenge." "Turn thyself round, and keep +Thy count'nance hid; for if the Gorgon dire +Be shown, and thou shouldst view it, thy return +Upwards would be for ever lost." This said, +Himself my gentle master turn'd me round, +Nor trusted he my hands, but with his own +He also hid me. Ye of intellect +Sound and entire, mark well the lore conceal'd +Under close texture of the mystic strain! + +And now there came o'er the perturbed waves +Loud-crashing, terrible, a sound that made +Either shore tremble, as if of a wind +Impetuous, from conflicting vapours sprung, +That 'gainst some forest driving all its might, +Plucks off the branches, beats them down and hurls +Afar; then onward passing proudly sweeps +Its whirlwind rage, while beasts and shepherds fly. + +Mine eyes he loos'd, and spake: "And now direct +Thy visual nerve along that ancient foam, +There, thickest where the smoke ascends." As frogs +Before their foe the serpent, through the wave +Ply swiftly all, till at the ground each one +Lies on a heap; more than a thousand spirits +Destroy'd, so saw I fleeing before one +Who pass'd with unwet feet the Stygian sound. +He, from his face removing the gross air, +Oft his left hand forth stretch'd, and seem'd alone +By that annoyance wearied. I perceiv'd +That he was sent from heav'n, and to my guide +Turn'd me, who signal made that I should stand +Quiet, and bend to him. Ah me! how full +Of noble anger seem'd he! To the gate +He came, and with his wand touch'd it, whereat +Open without impediment it flew. + +"Outcasts of heav'n! O abject race and scorn'd!" +Began he on the horrid grunsel standing, +"Whence doth this wild excess of insolence +Lodge in you? wherefore kick you 'gainst that will +Ne'er frustrate of its end, and which so oft +Hath laid on you enforcement of your pangs? +What profits at the fays to but the horn? +Your Cerberus, if ye remember, hence +Bears still, peel'd of their hair, his throat and maw." + +This said, he turn'd back o'er the filthy way, +And syllable to us spake none, but wore +The semblance of a man by other care +Beset, and keenly press'd, than thought of him +Who in his presence stands. Then we our steps +Toward that territory mov'd, secure +After the hallow'd words. We unoppos'd +There enter'd; and my mind eager to learn +What state a fortress like to that might hold, +I soon as enter'd throw mine eye around, +And see on every part wide-stretching space +Replete with bitter pain and torment ill. + +As where Rhone stagnates on the plains of Arles, +Or as at Pola, near Quarnaro's gulf, +That closes Italy and laves her bounds, +The place is all thick spread with sepulchres; +So was it here, save what in horror here +Excell'd: for 'midst the graves were scattered flames, +Wherewith intensely all throughout they burn'd, +That iron for no craft there hotter needs. + +Their lids all hung suspended, and beneath +From them forth issu'd lamentable moans, +Such as the sad and tortur'd well might raise. + +I thus: "Master! say who are these, interr'd +Within these vaults, of whom distinct we hear +The dolorous sighs?" He answer thus return'd: + +"The arch-heretics are here, accompanied +By every sect their followers; and much more, +Than thou believest, tombs are freighted: like +With like is buried; and the monuments +Are different in degrees of heat." This said, +He to the right hand turning, on we pass'd +Betwixt the afflicted and the ramparts high. + + + + +CANTO X + +NOW by a secret pathway we proceed, +Between the walls, that hem the region round, +And the tormented souls: my master first, +I close behind his steps. "Virtue supreme!" +I thus began; "who through these ample orbs +In circuit lead'st me, even as thou will'st, +Speak thou, and satisfy my wish. May those, +Who lie within these sepulchres, be seen? +Already all the lids are rais'd, and none +O'er them keeps watch." He thus in answer spake +"They shall be closed all, what-time they here +From Josaphat return'd shall come, and bring +Their bodies, which above they now have left. +The cemetery on this part obtain +With Epicurus all his followers, +Who with the body make the spirit die. +Here therefore satisfaction shall be soon +Both to the question ask'd, and to the wish, +Which thou conceal'st in silence." I replied: +"I keep not, guide belov'd! from thee my heart +Secreted, but to shun vain length of words, +A lesson erewhile taught me by thyself." + +"O Tuscan! thou who through the city of fire +Alive art passing, so discreet of speech! +Here please thee stay awhile. Thy utterance +Declares the place of thy nativity +To be that noble land, with which perchance +I too severely dealt." Sudden that sound +Forth issu'd from a vault, whereat in fear +I somewhat closer to my leader's side +Approaching, he thus spake: "What dost thou? Turn. +Lo, Farinata, there! who hath himself +Uplifted: from his girdle upwards all +Expos'd behold him." On his face was mine +Already fix'd; his breast and forehead there +Erecting, seem'd as in high scorn he held +E'en hell. Between the sepulchres to him +My guide thrust me with fearless hands and prompt, +This warning added: "See thy words be clear!" + +He, soon as there I stood at the tomb's foot, +Ey'd me a space, then in disdainful mood +Address'd me: "Say, what ancestors were thine?" + +I, willing to obey him, straight reveal'd +The whole, nor kept back aught: whence he, his brow +Somewhat uplifting, cried: "Fiercely were they +Adverse to me, my party, and the blood +From whence I sprang: twice therefore I abroad +Scatter'd them." "Though driv'n out, yet they each time +From all parts," answer'd I, "return'd; an art +Which yours have shown, they are not skill'd to learn." + +Then, peering forth from the unclosed jaw, +Rose from his side a shade, high as the chin, +Leaning, methought, upon its knees uprais'd. +It look'd around, as eager to explore +If there were other with me; but perceiving +That fond imagination quench'd, with tears +Thus spake: "If thou through this blind prison go'st. +Led by thy lofty genius and profound, +Where is my son? and wherefore not with thee?" + +I straight replied: "Not of myself I come, +By him, who there expects me, through this clime +Conducted, whom perchance Guido thy son +Had in contempt." Already had his words +And mode of punishment read me his name, +Whence I so fully answer'd. He at once +Exclaim'd, up starting, "How! said'st thou he HAD? +No longer lives he? Strikes not on his eye +The blessed daylight?" Then of some delay +I made ere my reply aware, down fell +Supine, not after forth appear'd he more. + +Meanwhile the other, great of soul, near whom +I yet was station'd, chang'd not count'nance stern, +Nor mov'd the neck, nor bent his ribbed side. +"And if," continuing the first discourse, +"They in this art," he cried, "small skill have shown, +That doth torment me more e'en than this bed. +But not yet fifty times shall be relum'd +Her aspect, who reigns here Queen of this realm, +Ere thou shalt know the full weight of that art. +So to the pleasant world mayst thou return, +As thou shalt tell me, why in all their laws, +Against my kin this people is so fell?" + +"The slaughter and great havoc," I replied, +"That colour'd Arbia's flood with crimson stain-- +To these impute, that in our hallow'd dome +Such orisons ascend." Sighing he shook +The head, then thus resum'd: "In that affray +I stood not singly, nor without just cause +Assuredly should with the rest have stirr'd; +But singly there I stood, when by consent +Of all, Florence had to the ground been raz'd, +The one who openly forbad the deed." + +"So may thy lineage find at last repose," +I thus adjur'd him, "as thou solve this knot, +Which now involves my mind. If right I hear, +Ye seem to view beforehand, that which time +Leads with him, of the present uninform'd." + +"We view, as one who hath an evil sight," +He answer'd, "plainly, objects far remote: +So much of his large spendour yet imparts +The' Almighty Ruler; but when they approach +Or actually exist, our intellect +Then wholly fails, nor of your human state +Except what others bring us know we aught. +Hence therefore mayst thou understand, that all +Our knowledge in that instant shall expire, +When on futurity the portals close." + +Then conscious of my fault, and by remorse +Smitten, I added thus: "Now shalt thou say +To him there fallen, that his offspring still +Is to the living join'd; and bid him know, +That if from answer silent I abstain'd, +'Twas that my thought was occupied intent +Upon that error, which thy help hath solv'd." + +But now my master summoning me back +I heard, and with more eager haste besought +The spirit to inform me, who with him +Partook his lot. He answer thus return'd: + +"More than a thousand with me here are laid +Within is Frederick, second of that name, +And the Lord Cardinal, and of the rest +I speak not." He, this said, from sight withdrew. +But I my steps towards the ancient bard +Reverting, ruminated on the words +Betokening me such ill. Onward he mov'd, +And thus in going question'd: "Whence the' amaze +That holds thy senses wrapt?" I satisfied +The' inquiry, and the sage enjoin'd me straight: +"Let thy safe memory store what thou hast heard +To thee importing harm; and note thou this," +With his rais'd finger bidding me take heed, + +"When thou shalt stand before her gracious beam, +Whose bright eye all surveys, she of thy life +The future tenour will to thee unfold." + +Forthwith he to the left hand turn'd his feet: +We left the wall, and tow'rds the middle space +Went by a path, that to a valley strikes; +Which e'en thus high exhal'd its noisome steam. + + + + +CANTO XI + +UPON the utmost verge of a high bank, +By craggy rocks environ'd round, we came, +Where woes beneath more cruel yet were stow'd: +And here to shun the horrible excess +Of fetid exhalation, upward cast +From the profound abyss, behind the lid +Of a great monument we stood retir'd, + +Whereon this scroll I mark'd: "I have in charge +Pope Anastasius, whom Photinus drew +From the right path.--Ere our descent behooves +We make delay, that somewhat first the sense, +To the dire breath accustom'd, afterward +Regard it not." My master thus; to whom +Answering I spake: "Some compensation find +That the time past not wholly lost." He then: +"Lo! how my thoughts e'en to thy wishes tend! +My son! within these rocks," he thus began, +"Are three close circles in gradation plac'd, +As these which now thou leav'st. Each one is full +Of spirits accurs'd; but that the sight alone +Hereafter may suffice thee, listen how +And for what cause in durance they abide. + +"Of all malicious act abhorr'd in heaven, +The end is injury; and all such end +Either by force or fraud works other's woe +But fraud, because of man peculiar evil, +To God is more displeasing; and beneath +The fraudulent are therefore doom'd to' endure +Severer pang. The violent occupy +All the first circle; and because to force +Three persons are obnoxious, in three rounds +Hach within other sep'rate is it fram'd. +To God, his neighbour, and himself, by man +Force may be offer'd; to himself I say +And his possessions, as thou soon shalt hear +At full. Death, violent death, and painful wounds +Upon his neighbour he inflicts; and wastes +By devastation, pillage, and the flames, +His substance. Slayers, and each one that smites +In malice, plund'rers, and all robbers, hence +The torment undergo of the first round +In different herds. Man can do violence +To himself and his own blessings: and for this +He in the second round must aye deplore +With unavailing penitence his crime, +Whoe'er deprives himself of life and light, +In reckless lavishment his talent wastes, +And sorrows there where he should dwell in joy. +To God may force be offer'd, in the heart +Denying and blaspheming his high power, +And nature with her kindly law contemning. +And thence the inmost round marks with its seal +Sodom and Cahors, and all such as speak +Contemptuously' of the Godhead in their hearts. + +"Fraud, that in every conscience leaves a sting, +May be by man employ'd on one, whose trust +He wins, or on another who withholds +Strict confidence. Seems as the latter way +Broke but the bond of love which Nature makes. +Whence in the second circle have their nest +Dissimulation, witchcraft, flatteries, +Theft, falsehood, simony, all who seduce +To lust, or set their honesty at pawn, +With such vile scum as these. The other way +Forgets both Nature's general love, and that +Which thereto added afterwards gives birth +To special faith. Whence in the lesser circle, +Point of the universe, dread seat of Dis, +The traitor is eternally consum'd." + +I thus: "Instructor, clearly thy discourse +Proceeds, distinguishing the hideous chasm +And its inhabitants with skill exact. +But tell me this: they of the dull, fat pool, +Whom the rain beats, or whom the tempest drives, +Or who with tongues so fierce conflicting meet, +Wherefore within the city fire-illum'd +Are not these punish'd, if God's wrath be on them? +And if it be not, wherefore in such guise +Are they condemned?" He answer thus return'd: +"Wherefore in dotage wanders thus thy mind, +Not so accustom'd? or what other thoughts +Possess it? Dwell not in thy memory +The words, wherein thy ethic page describes +Three dispositions adverse to Heav'n's will, +Incont'nence, malice, and mad brutishness, +And how incontinence the least offends +God, and least guilt incurs? If well thou note +This judgment, and remember who they are, +Without these walls to vain repentance doom'd, +Thou shalt discern why they apart are plac'd +From these fell spirits, and less wreakful pours +Justice divine on them its vengeance down." + +"O Sun! who healest all imperfect sight, +Thou so content'st me, when thou solv'st my doubt, +That ignorance not less than knowledge charms. +Yet somewhat turn thee back," I in these words +Continu'd, "where thou saidst, that usury +Offends celestial Goodness; and this knot +Perplex'd unravel." He thus made reply: +"Philosophy, to an attentive ear, +Clearly points out, not in one part alone, +How imitative nature takes her course +From the celestial mind and from its art: +And where her laws the Stagyrite unfolds, +Not many leaves scann'd o'er, observing well +Thou shalt discover, that your art on her +Obsequious follows, as the learner treads +In his instructor's step, so that your art +Deserves the name of second in descent +From God. These two, if thou recall to mind +Creation's holy book, from the beginning +Were the right source of life and excellence +To human kind. But in another path +The usurer walks; and Nature in herself +And in her follower thus he sets at nought, +Placing elsewhere his hope. But follow now +My steps on forward journey bent; for now +The Pisces play with undulating glance +Along the' horizon, and the Wain lies all +O'er the north-west; and onward there a space +Is our steep passage down the rocky height." + + + + +CANTO XII + +THE place where to descend the precipice +We came, was rough as Alp, and on its verge +Such object lay, as every eye would shun. + +As is that ruin, which Adice's stream +On this side Trento struck, should'ring the wave, +Or loos'd by earthquake or for lack of prop; +For from the mountain's summit, whence it mov'd +To the low level, so the headlong rock +Is shiver'd, that some passage it might give +To him who from above would pass; e'en such +Into the chasm was that descent: and there +At point of the disparted ridge lay stretch'd +The infamy of Crete, detested brood +Of the feign'd heifer: and at sight of us +It gnaw'd itself, as one with rage distract. + +To him my guide exclaim'd: "Perchance thou deem'st +The King of Athens here, who, in the world +Above, thy death contriv'd. Monster! avaunt! +He comes not tutor'd by thy sister's art, +But to behold your torments is he come." + +Like to a bull, that with impetuous spring +Darts, at the moment when the fatal blow +Hath struck him, but unable to proceed +Plunges on either side; so saw I plunge +The Minotaur; whereat the sage exclaim'd: +"Run to the passage! while he storms, 't is well +That thou descend." Thus down our road we took +Through those dilapidated crags, that oft +Mov'd underneath my feet, to weight like theirs +Unus'd. I pond'ring went, and thus he spake: + +"Perhaps thy thoughts are of this ruin'd steep, +Guarded by the brute violence, which I +Have vanquish'd now. Know then, that when I erst +Hither descended to the nether hell, +This rock was not yet fallen. But past doubt +(If well I mark) not long ere He arrived, +Who carried off from Dis the mighty spoil +Of the highest circle, then through all its bounds +Such trembling seiz'd the deep concave and foul, +I thought the universe was thrill'd with love, +Whereby, there are who deem, the world hath oft +Been into chaos turn'd: and in that point, +Here, and elsewhere, that old rock toppled down. +But fix thine eyes beneath: the river of blood +Approaches, in the which all those are steep'd, +Who have by violence injur'd." O blind lust! +O foolish wrath! who so dost goad us on +In the brief life, and in the eternal then +Thus miserably o'erwhelm us. I beheld +An ample foss, that in a bow was bent, +As circling all the plain; for so my guide +Had told. Between it and the rampart's base +On trail ran Centaurs, with keen arrows arm'd, +As to the chase they on the earth were wont. + +At seeing us descend they each one stood; +And issuing from the troop, three sped with bows +And missile weapons chosen first; of whom +One cried from far: "Say to what pain ye come +Condemn'd, who down this steep have journied? Speak +From whence ye stand, or else the bow I draw." + +To whom my guide: "Our answer shall be made +To Chiron, there, when nearer him we come. +Ill was thy mind, thus ever quick and rash." + +Then me he touch'd, and spake: "Nessus is this, +Who for the fair Deianira died, +And wrought himself revenge for his own fate. +He in the midst, that on his breast looks down, +Is the great Chiron who Achilles nurs'd; +That other Pholus, prone to wrath." Around +The foss these go by thousands, aiming shafts +At whatsoever spirit dares emerge +From out the blood, more than his guilt allows. + +We to those beasts, that rapid strode along, +Drew near, when Chiron took an arrow forth, +And with the notch push'd back his shaggy beard +To the cheek-bone, then his great mouth to view +Exposing, to his fellows thus exclaim'd: +"Are ye aware, that he who comes behind +Moves what he touches? The feet of the dead +Are not so wont." My trusty guide, who now +Stood near his breast, where the two natures join, +Thus made reply: "He is indeed alive, +And solitary so must needs by me +Be shown the gloomy vale, thereto induc'd +By strict necessity, not by delight. +She left her joyful harpings in the sky, +Who this new office to my care consign'd. +He is no robber, no dark spirit I. +But by that virtue, which empowers my step +To treat so wild a path, grant us, I pray, +One of thy band, whom we may trust secure, +Who to the ford may lead us, and convey +Across, him mounted on his back; for he +Is not a spirit that may walk the air." + +Then on his right breast turning, Chiron thus +To Nessus spake: "Return, and be their guide. +And if ye chance to cross another troop, +Command them keep aloof." Onward we mov'd, +The faithful escort by our side, along +The border of the crimson-seething flood, +Whence from those steep'd within loud shrieks arose. + +Some there I mark'd, as high as to their brow +Immers'd, of whom the mighty Centaur thus: +"These are the souls of tyrants, who were given +To blood and rapine. Here they wail aloud +Their merciless wrongs. Here Alexander dwells, +And Dionysius fell, who many a year +Of woe wrought for fair Sicily. That brow +Whereon the hair so jetty clust'ring hangs, +Is Azzolino; that with flaxen locks +Obizzo' of Este, in the world destroy'd +By his foul step-son." To the bard rever'd +I turned me round, and thus he spake; "Let him +Be to thee now first leader, me but next +To him in rank." Then farther on a space +The Centaur paus'd, near some, who at the throat +Were extant from the wave; and showing us +A spirit by itself apart retir'd, +Exclaim'd: "He in God's bosom smote the heart, +Which yet is honour'd on the bank of Thames." + +A race I next espied, who held the head, +And even all the bust above the stream. +'Midst these I many a face remember'd well. +Thus shallow more and more the blood became, +So that at last it but imbru'd the feet; +And there our passage lay athwart the foss. + +"As ever on this side the boiling wave +Thou seest diminishing," the Centaur said, +"So on the other, be thou well assur'd, +It lower still and lower sinks its bed, +Till in that part it reuniting join, +Where 't is the lot of tyranny to mourn. +There Heav'n's stern justice lays chastising hand +On Attila, who was the scourge of earth, +On Sextus, and on Pyrrhus, and extracts +Tears ever by the seething flood unlock'd +From the Rinieri, of Corneto this, +Pazzo the other nam'd, who fill'd the ways +With violence and war." This said, he turn'd, +And quitting us, alone repass'd the ford. + + + + +CANTO XIII + +ERE Nessus yet had reach'd the other bank, +We enter'd on a forest, where no track +Of steps had worn a way. Not verdant there +The foliage, but of dusky hue; not light +The boughs and tapering, but with knares deform'd +And matted thick: fruits there were none, but thorns +Instead, with venom fill'd. Less sharp than these, +Less intricate the brakes, wherein abide +Those animals, that hate the cultur'd fields, +Betwixt Corneto and Cecina's stream. + +Here the brute Harpies make their nest, the same +Who from the Strophades the Trojan band +Drove with dire boding of their future woe. +Broad are their pennons, of the human form +Their neck and count'nance, arm'd with talons keen +The feet, and the huge belly fledge with wings +These sit and wail on the drear mystic wood. + +The kind instructor in these words began: +"Ere farther thou proceed, know thou art now +I' th' second round, and shalt be, till thou come +Upon the horrid sand: look therefore well +Around thee, and such things thou shalt behold, +As would my speech discredit." On all sides +I heard sad plainings breathe, and none could see +From whom they might have issu'd. In amaze +Fast bound I stood. He, as it seem'd, believ'd, +That I had thought so many voices came +From some amid those thickets close conceal'd, +And thus his speech resum'd: "If thou lop off +A single twig from one of those ill plants, +The thought thou hast conceiv'd shall vanish quite." + +Thereat a little stretching forth my hand, +From a great wilding gather'd I a branch, +And straight the trunk exclaim'd: "Why pluck'st thou me?" + +Then as the dark blood trickled down its side, +These words it added: "Wherefore tear'st me thus? +Is there no touch of mercy in thy breast? +Men once were we, that now are rooted here. +Thy hand might well have spar'd us, had we been +The souls of serpents." As a brand yet green, +That burning at one end from the' other sends +A groaning sound, and hisses with the wind +That forces out its way, so burst at once, +Forth from the broken splinter words and blood. + +I, letting fall the bough, remain'd as one +Assail'd by terror, and the sage replied: +"If he, O injur'd spirit! could have believ'd +What he hath seen but in my verse describ'd, +He never against thee had stretch'd his hand. +But I, because the thing surpass'd belief, +Prompted him to this deed, which even now +Myself I rue. But tell me, who thou wast; +That, for this wrong to do thee some amends, +In the upper world (for thither to return +Is granted him) thy fame he may revive." + +"That pleasant word of thine," the trunk replied +"Hath so inveigled me, that I from speech +Cannot refrain, wherein if I indulge +A little longer, in the snare detain'd, +Count it not grievous. I it was, who held +Both keys to Frederick's heart, and turn'd the wards, +Opening and shutting, with a skill so sweet, +That besides me, into his inmost breast +Scarce any other could admittance find. +The faith I bore to my high charge was such, +It cost me the life-blood that warm'd my veins. +The harlot, who ne'er turn'd her gloating eyes +From Caesar's household, common vice and pest +Of courts, 'gainst me inflam'd the minds of all; +And to Augustus they so spread the flame, +That my glad honours chang'd to bitter woes. +My soul, disdainful and disgusted, sought +Refuge in death from scorn, and I became, +Just as I was, unjust toward myself. +By the new roots, which fix this stem, I swear, +That never faith I broke to my liege lord, +Who merited such honour; and of you, +If any to the world indeed return, +Clear he from wrong my memory, that lies +Yet prostrate under envy's cruel blow." + +First somewhat pausing, till the mournful words +Were ended, then to me the bard began: +"Lose not the time; but speak and of him ask, +If more thou wish to learn." Whence I replied: +"Question thou him again of whatsoe'er +Will, as thou think'st, content me; for no power +Have I to ask, such pity' is at my heart." + +He thus resum'd; "So may he do for thee +Freely what thou entreatest, as thou yet +Be pleas'd, imprison'd Spirit! to declare, +How in these gnarled joints the soul is tied; +And whether any ever from such frame +Be loosen'd, if thou canst, that also tell." + +Thereat the trunk breath'd hard, and the wind soon +Chang'd into sounds articulate like these; + +"Briefly ye shall be answer'd. When departs +The fierce soul from the body, by itself +Thence torn asunder, to the seventh gulf +By Minos doom'd, into the wood it falls, +No place assign'd, but wheresoever chance +Hurls it, there sprouting, as a grain of spelt, +It rises to a sapling, growing thence +A savage plant. The Harpies, on its leaves +Then feeding, cause both pain and for the pain +A vent to grief. We, as the rest, shall come +For our own spoils, yet not so that with them +We may again be clad; for what a man +Takes from himself it is not just he have. +Here we perforce shall drag them; and throughout +The dismal glade our bodies shall be hung, +Each on the wild thorn of his wretched shade." + +Attentive yet to listen to the trunk +We stood, expecting farther speech, when us +A noise surpris'd, as when a man perceives +The wild boar and the hunt approach his place +Of station'd watch, who of the beasts and boughs +Loud rustling round him hears. And lo! there came +Two naked, torn with briers, in headlong flight, +That they before them broke each fan o' th' wood. +"Haste now," the foremost cried, "now haste thee death!" + +The' other, as seem'd, impatient of delay +Exclaiming, "Lano! not so bent for speed +Thy sinews, in the lists of Toppo's field." +And then, for that perchance no longer breath +Suffic'd him, of himself and of a bush +One group he made. Behind them was the wood +Full of black female mastiffs, gaunt and fleet, +As greyhounds that have newly slipp'd the leash. +On him, who squatted down, they stuck their fangs, +And having rent him piecemeal bore away +The tortur'd limbs. My guide then seiz'd my hand, +And led me to the thicket, which in vain +Mourn'd through its bleeding wounds: "O Giacomo +Of Sant' Andrea! what avails it thee," +It cried, "that of me thou hast made thy screen? +For thy ill life what blame on me recoils?" + +When o'er it he had paus'd, my master spake: +"Say who wast thou, that at so many points +Breath'st out with blood thy lamentable speech?" + +He answer'd: "Oh, ye spirits: arriv'd in time +To spy the shameful havoc, that from me +My leaves hath sever'd thus, gather them up, +And at the foot of their sad parent-tree +Carefully lay them. In that city' I dwelt, +Who for the Baptist her first patron chang'd, +Whence he for this shall cease not with his art +To work her woe: and if there still remain'd not +On Arno's passage some faint glimpse of him, +Those citizens, who rear'd once more her walls +Upon the ashes left by Attila, +Had labour'd without profit of their toil. +I slung the fatal noose from my own roof." + + + + +CANTO XIV + +SOON as the charity of native land +Wrought in my bosom, I the scatter'd leaves +Collected, and to him restor'd, who now +Was hoarse with utt'rance. To the limit thence +We came, which from the third the second round +Divides, and where of justice is display'd +Contrivance horrible. Things then first seen +Clearlier to manifest, I tell how next +A plain we reach'd, that from its sterile bed +Each plant repell'd. The mournful wood waves round +Its garland on all sides, as round the wood +Spreads the sad foss. There, on the very edge, +Our steps we stay'd. It was an area wide +Of arid sand and thick, resembling most +The soil that erst by Cato's foot was trod. + +Vengeance of Heav'n! Oh! how shouldst thou be fear'd +By all, who read what here my eyes beheld! + +Of naked spirits many a flock I saw, +All weeping piteously, to different laws +Subjected: for on the' earth some lay supine, +Some crouching close were seated, others pac'd +Incessantly around; the latter tribe, +More numerous, those fewer who beneath +The torment lay, but louder in their grief. + +O'er all the sand fell slowly wafting down +Dilated flakes of fire, as flakes of snow +On Alpine summit, when the wind is hush'd. +As in the torrid Indian clime, the son +Of Ammon saw upon his warrior band +Descending, solid flames, that to the ground +Came down: whence he bethought him with his troop +To trample on the soil; for easier thus +The vapour was extinguish'd, while alone; +So fell the eternal fiery flood, wherewith +The marble glow'd underneath, as under stove +The viands, doubly to augment the pain. + +Unceasing was the play of wretched hands, +Now this, now that way glancing, to shake off +The heat, still falling fresh. I thus began: +"Instructor! thou who all things overcom'st, +Except the hardy demons, that rush'd forth +To stop our entrance at the gate, say who +Is yon huge spirit, that, as seems, heeds not +The burning, but lies writhen in proud scorn, +As by the sultry tempest immatur'd?" + +Straight he himself, who was aware I ask'd +My guide of him, exclaim'd: "Such as I was +When living, dead such now I am. If Jove +Weary his workman out, from whom in ire +He snatch'd the lightnings, that at my last day +Transfix'd me, if the rest be weary out +At their black smithy labouring by turns +In Mongibello, while he cries aloud; +"Help, help, good Mulciber!" as erst he cried +In the Phlegraean warfare, and the bolts +Launch he full aim'd at me with all his might, +He never should enjoy a sweet revenge." + +Then thus my guide, in accent higher rais'd +Than I before had heard him: "Capaneus! +Thou art more punish'd, in that this thy pride +Lives yet unquench'd: no torrent, save thy rage, +Were to thy fury pain proportion'd full." + +Next turning round to me with milder lip +He spake: "This of the seven kings was one, +Who girt the Theban walls with siege, and held, +As still he seems to hold, God in disdain, +And sets his high omnipotence at nought. +But, as I told him, his despiteful mood +Is ornament well suits the breast that wears it. +Follow me now; and look thou set not yet +Thy foot in the hot sand, but to the wood +Keep ever close." Silently on we pass'd +To where there gushes from the forest's bound +A little brook, whose crimson'd wave yet lifts +My hair with horror. As the rill, that runs +From Bulicame, to be portion'd out +Among the sinful women; so ran this +Down through the sand, its bottom and each bank +Stone-built, and either margin at its side, +Whereon I straight perceiv'd our passage lay. + +"Of all that I have shown thee, since that gate +We enter'd first, whose threshold is to none +Denied, nought else so worthy of regard, +As is this river, has thine eye discern'd, +O'er which the flaming volley all is quench'd." + +So spake my guide; and I him thence besought, +That having giv'n me appetite to know, +The food he too would give, that hunger crav'd. + +"In midst of ocean," forthwith he began, +"A desolate country lies, which Crete is nam'd, +Under whose monarch in old times the world +Liv'd pure and chaste. A mountain rises there, +Call'd Ida, joyous once with leaves and streams, +Deserted now like a forbidden thing. +It was the spot which Rhea, Saturn's spouse, +Chose for the secret cradle of her son; +And better to conceal him, drown'd in shouts +His infant cries. Within the mount, upright +An ancient form there stands and huge, that turns +His shoulders towards Damiata, and at Rome +As in his mirror looks. Of finest gold +His head is shap'd, pure silver are the breast +And arms; thence to the middle is of brass. +And downward all beneath well-temper'd steel, +Save the right foot of potter's clay, on which +Than on the other more erect he stands, +Each part except the gold, is rent throughout; +And from the fissure tears distil, which join'd +Penetrate to that cave. They in their course +Thus far precipitated down the rock +Form Acheron, and Styx, and Phlegethon; +Then by this straiten'd channel passing hence +Beneath, e'en to the lowest depth of all, +Form there Cocytus, of whose lake (thyself +Shall see it) I here give thee no account." + +Then I to him: "If from our world this sluice +Be thus deriv'd; wherefore to us but now +Appears it at this edge?" He straight replied: +"The place, thou know'st, is round; and though great part +Thou have already pass'd, still to the left +Descending to the nethermost, not yet +Hast thou the circuit made of the whole orb. +Wherefore if aught of new to us appear, +It needs not bring up wonder in thy looks." + +Then I again inquir'd: "Where flow the streams +Of Phlegethon and Lethe? for of one +Thou tell'st not, and the other of that shower, +Thou say'st, is form'd." He answer thus return'd: +"Doubtless thy questions all well pleas'd I hear. +Yet the red seething wave might have resolv'd +One thou proposest. Lethe thou shalt see, +But not within this hollow, in the place, +Whither to lave themselves the spirits go, +Whose blame hath been by penitence remov'd." +He added: "Time is now we quit the wood. +Look thou my steps pursue: the margins give +Safe passage, unimpeded by the flames; +For over them all vapour is extinct." + + + + +CANTO XV + +One of the solid margins bears us now +Envelop'd in the mist, that from the stream +Arising, hovers o'er, and saves from fire +Both piers and water. As the Flemings rear +Their mound, 'twixt Ghent and Bruges, to chase back +The ocean, fearing his tumultuous tide +That drives toward them, or the Paduans theirs +Along the Brenta, to defend their towns +And castles, ere the genial warmth be felt +On Chiarentana's top; such were the mounds, +So fram'd, though not in height or bulk to these +Made equal, by the master, whosoe'er +He was, that rais'd them here. We from the wood +Were not so far remov'd, that turning round +I might not have discern'd it, when we met +A troop of spirits, who came beside the pier. + +They each one ey'd us, as at eventide +One eyes another under a new moon, +And toward us sharpen'd their sight as keen, +As an old tailor at his needle's eye. + +Thus narrowly explor'd by all the tribe, +I was agniz'd of one, who by the skirt +Caught me, and cried, "What wonder have we here!" + +And I, when he to me outstretch'd his arm, +Intently fix'd my ken on his parch'd looks, +That although smirch'd with fire, they hinder'd not +But I remember'd him; and towards his face +My hand inclining, answer'd: "Sir! Brunetto! + +"And art thou here?" He thus to me: "My son! +Oh let it not displease thee, if Brunetto +Latini but a little space with thee +Turn back, and leave his fellows to proceed." + +I thus to him replied: "Much as I can, +I thereto pray thee; and if thou be willing, +That I here seat me with thee, I consent; +His leave, with whom I journey, first obtain'd." + +"O son!" said he, "whoever of this throng +One instant stops, lies then a hundred years, +No fan to ventilate him, when the fire +Smites sorest. Pass thou therefore on. I close +Will at thy garments walk, and then rejoin +My troop, who go mourning their endless doom." + +I dar'd not from the path descend to tread +On equal ground with him, but held my head +Bent down, as one who walks in reverent guise. + +"What chance or destiny," thus he began, +"Ere the last day conducts thee here below? +And who is this, that shows to thee the way?" + +"There up aloft," I answer'd, "in the life +Serene, I wander'd in a valley lost, +Before mine age had to its fullness reach'd. +But yester-morn I left it: then once more +Into that vale returning, him I met; +And by this path homeward he leads me back." + +"If thou," he answer'd, "follow but thy star, +Thou canst not miss at last a glorious haven: +Unless in fairer days my judgment err'd. +And if my fate so early had not chanc'd, +Seeing the heav'ns thus bounteous to thee, I +Had gladly giv'n thee comfort in thy work. +But that ungrateful and malignant race, +Who in old times came down from Fesole, +Ay and still smack of their rough mountain-flint, +Will for thy good deeds shew thee enmity. +Nor wonder; for amongst ill-savour'd crabs +It suits not the sweet fig-tree lay her fruit. +Old fame reports them in the world for blind, +Covetous, envious, proud. Look to it well: +Take heed thou cleanse thee of their ways. For thee +Thy fortune hath such honour in reserve, +That thou by either party shalt be crav'd +With hunger keen: but be the fresh herb far +From the goat's tooth. The herd of Fesole +May of themselves make litter, not touch the plant, +If any such yet spring on their rank bed, +In which the holy seed revives, transmitted +From those true Romans, who still there remain'd, +When it was made the nest of so much ill." + +"Were all my wish fulfill'd," I straight replied, +"Thou from the confines of man's nature yet +Hadst not been driven forth; for in my mind +Is fix'd, and now strikes full upon my heart +The dear, benign, paternal image, such +As thine was, when so lately thou didst teach me +The way for man to win eternity; +And how I priz'd the lesson, it behooves, +That, long as life endures, my tongue should speak, +What of my fate thou tell'st, that write I down: +And with another text to comment on +For her I keep it, the celestial dame, +Who will know all, if I to her arrive. +This only would I have thee clearly note: +That so my conscience have no plea against me; +Do fortune as she list, I stand prepar'd. +Not new or strange such earnest to mine ear. +Speed fortune then her wheel, as likes her best, +The clown his mattock; all things have their course." + +Thereat my sapient guide upon his right +Turn'd himself back, then look'd at me and spake: +"He listens to good purpose who takes note." + +I not the less still on my way proceed, +Discoursing with Brunetto, and inquire +Who are most known and chief among his tribe. + +"To know of some is well;" thus he replied, +"But of the rest silence may best beseem. +Time would not serve us for report so long. +In brief I tell thee, that all these were clerks, +Men of great learning and no less renown, +By one same sin polluted in the world. +With them is Priscian, and Accorso's son +Francesco herds among that wretched throng: +And, if the wish of so impure a blotch +Possess'd thee, him thou also might'st have seen, +Who by the servants' servant was transferr'd +From Arno's seat to Bacchiglione, where +His ill-strain'd nerves he left. I more would add, +But must from farther speech and onward way +Alike desist, for yonder I behold +A mist new-risen on the sandy plain. +A company, with whom I may not sort, +Approaches. I commend my TREASURE to thee, +Wherein I yet survive; my sole request." + +This said he turn'd, and seem'd as one of those, +Who o'er Verona's champain try their speed +For the green mantle, and of them he seem'd, +Not he who loses but who gains the prize. + + + + +CANTO XVI + +NOW came I where the water's din was heard, +As down it fell into the other round, +Resounding like the hum of swarming bees: +When forth together issu'd from a troop, +That pass'd beneath the fierce tormenting storm, +Three spirits, running swift. They towards us came, +And each one cried aloud, "Oh do thou stay! +Whom by the fashion of thy garb we deem +To be some inmate of our evil land." + +Ah me! what wounds I mark'd upon their limbs, +Recent and old, inflicted by the flames! +E'en the remembrance of them grieves me yet. + +Attentive to their cry my teacher paus'd, +And turn'd to me his visage, and then spake; +"Wait now! our courtesy these merit well: +And were 't not for the nature of the place, +Whence glide the fiery darts, I should have said, +That haste had better suited thee than them." + +They, when we stopp'd, resum'd their ancient wail, +And soon as they had reach'd us, all the three +Whirl'd round together in one restless wheel. +As naked champions, smear'd with slippery oil, +Are wont intent to watch their place of hold +And vantage, ere in closer strife they meet; +Thus each one, as he wheel'd, his countenance +At me directed, so that opposite +The neck mov'd ever to the twinkling feet. + +"If misery of this drear wilderness," +Thus one began, "added to our sad cheer +And destitute, do call forth scorn on us +And our entreaties, let our great renown +Incline thee to inform us who thou art, +That dost imprint with living feet unharm'd +The soil of Hell. He, in whose track thou see'st +My steps pursuing, naked though he be +And reft of all, was of more high estate +Than thou believest; grandchild of the chaste +Gualdrada, him they Guidoguerra call'd, +Who in his lifetime many a noble act +Achiev'd, both by his wisdom and his sword. +The other, next to me that beats the sand, +Is Aldobrandi, name deserving well, +In the' upper world, of honour; and myself +Who in this torment do partake with them, +Am Rusticucci, whom, past doubt, my wife +Of savage temper, more than aught beside +Hath to this evil brought." If from the fire +I had been shelter'd, down amidst them straight +I then had cast me, nor my guide, I deem, +Would have restrain'd my going; but that fear +Of the dire burning vanquish'd the desire, +Which made me eager of their wish'd embrace. + +I then began: "Not scorn, but grief much more, +Such as long time alone can cure, your doom +Fix'd deep within me, soon as this my lord +Spake words, whose tenour taught me to expect +That such a race, as ye are, was at hand. +I am a countryman of yours, who still +Affectionate have utter'd, and have heard +Your deeds and names renown'd. Leaving the gall +For the sweet fruit I go, that a sure guide +Hath promis'd to me. But behooves, that far +As to the centre first I downward tend." + +"So may long space thy spirit guide thy limbs," +He answer straight return'd; "and so thy fame +Shine bright, when thou art gone; as thou shalt tell, +If courtesy and valour, as they wont, +Dwell in our city, or have vanish'd clean? +For one amidst us late condemn'd to wail, +Borsiere, yonder walking with his peers, +Grieves us no little by the news he brings." + +"An upstart multitude and sudden gains, +Pride and excess, O Florence! have in thee +Engender'd, so that now in tears thou mourn'st!" +Thus cried I with my face uprais'd, and they +All three, who for an answer took my words, +Look'd at each other, as men look when truth +Comes to their ear. "If thou at other times," +They all at once rejoin'd, "so easily +Satisfy those, who question, happy thou, +Gifted with words, so apt to speak thy thought! +Wherefore if thou escape this darksome clime, +Returning to behold the radiant stars, +When thou with pleasure shalt retrace the past, +See that of us thou speak among mankind." + +This said, they broke the circle, and so swift +Fled, that as pinions seem'd their nimble feet. + +Not in so short a time might one have said +"Amen," as they had vanish'd. Straight my guide +Pursu'd his track. I follow'd; and small space +Had we pass'd onward, when the water's sound +Was now so near at hand, that we had scarce +Heard one another's speech for the loud din. + +E'en as the river, that holds on its course +Unmingled, from the mount of Vesulo, +On the left side of Apennine, toward +The east, which Acquacheta higher up +They call, ere it descend into the vale, +At Forli by that name no longer known, +Rebellows o'er Saint Benedict, roll'd on +From the' Alpine summit down a precipice, +Where space enough to lodge a thousand spreads; +Thus downward from a craggy steep we found, +That this dark wave resounded, roaring loud, +So that the ear its clamour soon had stunn'd. + +I had a cord that brac'd my girdle round, +Wherewith I erst had thought fast bound to take +The painted leopard. This when I had all +Unloosen'd from me (so my master bade) +I gather'd up, and stretch'd it forth to him. +Then to the right he turn'd, and from the brink +Standing few paces distant, cast it down +Into the deep abyss. "And somewhat strange," +Thus to myself I spake, "signal so strange +Betokens, which my guide with earnest eye +Thus follows." Ah! what caution must men use +With those who look not at the deed alone, +But spy into the thoughts with subtle skill! + +"Quickly shall come," he said, "what I expect, +Thine eye discover quickly, that whereof +Thy thought is dreaming." Ever to that truth, +Which but the semblance of a falsehood wears, +A man, if possible, should bar his lip; +Since, although blameless, he incurs reproach. +But silence here were vain; and by these notes +Which now I sing, reader! I swear to thee, +So may they favour find to latest times! +That through the gross and murky air I spied +A shape come swimming up, that might have quell'd +The stoutest heart with wonder, in such guise +As one returns, who hath been down to loose +An anchor grappled fast against some rock, +Or to aught else that in the salt wave lies, +Who upward springing close draws in his feet. + + + + +CANTO XVII + +"LO! the fell monster with the deadly sting! +Who passes mountains, breaks through fenced walls +And firm embattled spears, and with his filth +Taints all the world!" Thus me my guide address'd, +And beckon'd him, that he should come to shore, +Near to the stony causeway's utmost edge. + +Forthwith that image vile of fraud appear'd, +His head and upper part expos'd on land, +But laid not on the shore his bestial train. +His face the semblance of a just man's wore, +So kind and gracious was its outward cheer; +The rest was serpent all: two shaggy claws +Reach'd to the armpits, and the back and breast, +And either side, were painted o'er with nodes +And orbits. Colours variegated more +Nor Turks nor Tartars e'er on cloth of state +With interchangeable embroidery wove, +Nor spread Arachne o'er her curious loom. +As ofttimes a light skiff, moor'd to the shore, +Stands part in water, part upon the land; +Or, as where dwells the greedy German boor, +The beaver settles watching for his prey; +So on the rim, that fenc'd the sand with rock, +Sat perch'd the fiend of evil. In the void +Glancing, his tail upturn'd its venomous fork, +With sting like scorpion's arm'd. Then thus my guide: +"Now need our way must turn few steps apart, +Far as to that ill beast, who couches there." + +Thereat toward the right our downward course +We shap'd, and, better to escape the flame +And burning marle, ten paces on the verge +Proceeded. Soon as we to him arrive, +A little further on mine eye beholds +A tribe of spirits, seated on the sand +Near the wide chasm. Forthwith my master spake: +"That to the full thy knowledge may extend +Of all this round contains, go now, and mark +The mien these wear: but hold not long discourse. +Till thou returnest, I with him meantime +Will parley, that to us he may vouchsafe +The aid of his strong shoulders." Thus alone +Yet forward on the' extremity I pac'd +Of that seventh circle, where the mournful tribe +Were seated. At the eyes forth gush'd their pangs. +Against the vapours and the torrid soil +Alternately their shifting hands they plied. +Thus use the dogs in summer still to ply +Their jaws and feet by turns, when bitten sore +By gnats, or flies, or gadflies swarming round. + +Noting the visages of some, who lay +Beneath the pelting of that dolorous fire, +One of them all I knew not; but perceiv'd, +That pendent from his neck each bore a pouch +With colours and with emblems various mark'd, +On which it seem'd as if their eye did feed. + +And when amongst them looking round I came, +A yellow purse I saw with azure wrought, +That wore a lion's countenance and port. +Then still my sight pursuing its career, +Another I beheld, than blood more red. +A goose display of whiter wing than curd. +And one, who bore a fat and azure swine +Pictur'd on his white scrip, addressed me thus: +"What dost thou in this deep? Go now and know, +Since yet thou livest, that my neighbour here +Vitaliano on my left shall sit. +A Paduan with these Florentines am I. +Ofttimes they thunder in mine ears, exclaiming +'O haste that noble knight! he who the pouch +With the three beaks will bring!'" This said, he writh'd +The mouth, and loll'd the tongue out, like an ox +That licks his nostrils. I, lest longer stay +He ill might brook, who bade me stay not long, +Backward my steps from those sad spirits turn'd. + +My guide already seated on the haunch +Of the fierce animal I found; and thus +He me encourag'd. "Be thou stout; be bold. +Down such a steep flight must we now descend! +Mount thou before: for that no power the tail +May have to harm thee, I will be i' th' midst." + +As one, who hath an ague fit so near, +His nails already are turn'd blue, and he +Quivers all o'er, if he but eye the shade; +Such was my cheer at hearing of his words. +But shame soon interpos'd her threat, who makes +The servant bold in presence of his lord. + +I settled me upon those shoulders huge, +And would have said, but that the words to aid +My purpose came not, "Look thou clasp me firm!" + +But he whose succour then not first I prov'd, +Soon as I mounted, in his arms aloft, +Embracing, held me up, and thus he spake: +"Geryon! now move thee! be thy wheeling gyres +Of ample circuit, easy thy descent. +Think on th' unusual burden thou sustain'st." + +As a small vessel, back'ning out from land, +Her station quits; so thence the monster loos'd, +And when he felt himself at large, turn'd round +There where the breast had been, his forked tail. +Thus, like an eel, outstretch'd at length he steer'd, +Gath'ring the air up with retractile claws. + +Not greater was the dread when Phaeton +The reins let drop at random, whence high heaven, +Whereof signs yet appear, was wrapt in flames; +Nor when ill-fated Icarus perceiv'd, +By liquefaction of the scalded wax, +The trusted pennons loosen'd from his loins, +His sire exclaiming loud, "Ill way thou keep'st!" +Than was my dread, when round me on each part +The air I view'd, and other object none +Save the fell beast. He slowly sailing, wheels +His downward motion, unobserv'd of me, +But that the wind, arising to my face, +Breathes on me from below. Now on our right +I heard the cataract beneath us leap +With hideous crash; whence bending down to' explore, +New terror I conceiv'd at the steep plunge: + +For flames I saw, and wailings smote mine ear: +So that all trembling close I crouch'd my limbs, +And then distinguish'd, unperceiv'd before, +By the dread torments that on every side +Drew nearer, how our downward course we wound. + +As falcon, that hath long been on the wing, +But lure nor bird hath seen, while in despair +The falconer cries, "Ah me! thou stoop'st to earth!" +Wearied descends, and swiftly down the sky +In many an orbit wheels, then lighting sits +At distance from his lord in angry mood; +So Geryon lighting places us on foot +Low down at base of the deep-furrow'd rock, +And, of his burden there discharg'd, forthwith +Sprang forward, like an arrow from the string. + + + + +CANTO XVIII + +THERE is a place within the depths of hell +Call'd Malebolge, all of rock dark-stain'd +With hue ferruginous, e'en as the steep +That round it circling winds. Right in the midst +Of that abominable region, yawns +A spacious gulf profound, whereof the frame +Due time shall tell. The circle, that remains, +Throughout its round, between the gulf and base +Of the high craggy banks, successive forms +Ten trenches, in its hollow bottom sunk. + +As where to guard the walls, full many a foss +Begirds some stately castle, sure defence +Affording to the space within, so here +Were model'd these; and as like fortresses +E'en from their threshold to the brink without, +Are flank'd with bridges; from the rock's low base +Thus flinty paths advanc'd, that 'cross the moles +And dikes, struck onward far as to the gulf, +That in one bound collected cuts them off. +Such was the place, wherein we found ourselves +From Geryon's back dislodg'd. The bard to left +Held on his way, and I behind him mov'd. + +On our right hand new misery I saw, +New pains, new executioners of wrath, +That swarming peopled the first chasm. Below +Were naked sinners. Hitherward they came, +Meeting our faces from the middle point, +With us beyond but with a larger stride. +E'en thus the Romans, when the year returns +Of Jubilee, with better speed to rid +The thronging multitudes, their means devise +For such as pass the bridge; that on one side +All front toward the castle, and approach +Saint Peter's fane, on th' other towards the mount. + +Each divers way along the grisly rock, +Horn'd demons I beheld, with lashes huge, +That on their back unmercifully smote. +Ah! how they made them bound at the first stripe! + +None for the second waited nor the third. + +Meantime as on I pass'd, one met my sight +Whom soon as view'd; "Of him," cried I, "not yet +Mine eye hath had his fill." With fixed gaze +I therefore scann'd him. Straight the teacher kind +Paus'd with me, and consented I should walk +Backward a space, and the tormented spirit, +Who thought to hide him, bent his visage down. +But it avail'd him nought; for I exclaim'd: +"Thou who dost cast thy eye upon the ground, +Unless thy features do belie thee much, +Venedico art thou. But what brings thee +Into this bitter seas'ning?" He replied: +"Unwillingly I answer to thy words. +But thy clear speech, that to my mind recalls +The world I once inhabited, constrains me. +Know then 'twas I who led fair Ghisola +To do the Marquis' will, however fame +The shameful tale have bruited. Nor alone +Bologna hither sendeth me to mourn +Rather with us the place is so o'erthrong'd +That not so many tongues this day are taught, +Betwixt the Reno and Savena's stream, +To answer SIPA in their country's phrase. +And if of that securer proof thou need, +Remember but our craving thirst for gold." + +Him speaking thus, a demon with his thong +Struck, and exclaim'd, "Away! corrupter! here +Women are none for sale." Forthwith I join'd +My escort, and few paces thence we came +To where a rock forth issued from the bank. +That easily ascended, to the right +Upon its splinter turning, we depart +From those eternal barriers. When arriv'd, +Where underneath the gaping arch lets pass +The scourged souls: "Pause here," the teacher said, +"And let these others miserable, now +Strike on thy ken, faces not yet beheld, +For that together they with us have walk'd." + +From the old bridge we ey'd the pack, who came +From th' other side towards us, like the rest, +Excoriate from the lash. My gentle guide, +By me unquestion'd, thus his speech resum'd: +"Behold that lofty shade, who this way tends, +And seems too woe-begone to drop a tear. +How yet the regal aspect he retains! +Jason is he, whose skill and prowess won +The ram from Colchos. To the Lemnian isle +His passage thither led him, when those bold +And pitiless women had slain all their males. +There he with tokens and fair witching words +Hypsipyle beguil'd, a virgin young, +Who first had all the rest herself beguil'd. +Impregnated he left her there forlorn. +Such is the guilt condemns him to this pain. +Here too Medea's inj'ries are avenged. +All bear him company, who like deceit +To his have practis'd. And thus much to know +Of the first vale suffice thee, and of those +Whom its keen torments urge." Now had we come +Where, crossing the next pier, the straighten'd path +Bestrides its shoulders to another arch. + +Hence in the second chasm we heard the ghosts, +Who jibber in low melancholy sounds, +With wide-stretch'd nostrils snort, and on themselves +Smite with their palms. Upon the banks a scurf +From the foul steam condens'd, encrusting hung, +That held sharp combat with the sight and smell. + +So hollow is the depth, that from no part, +Save on the summit of the rocky span, +Could I distinguish aught. Thus far we came; +And thence I saw, within the foss below, +A crowd immers'd in ordure, that appear'd +Draff of the human body. There beneath +Searching with eye inquisitive, I mark'd +One with his head so grim'd, 't were hard to deem, +If he were clerk or layman. Loud he cried: +"Why greedily thus bendest more on me, +Than on these other filthy ones, thy ken?" + +"Because if true my mem'ry," I replied, +"I heretofore have seen thee with dry locks, +And thou Alessio art of Lucca sprung. +Therefore than all the rest I scan thee more." + +Then beating on his brain these words he spake: +"Me thus low down my flatteries have sunk, +Wherewith I ne'er enough could glut my tongue." + +My leader thus: "A little further stretch +Thy face, that thou the visage well mayst note +Of that besotted, sluttish courtezan, +Who there doth rend her with defiled nails, +Now crouching down, now risen on her feet. + +"Thais is this, the harlot, whose false lip +Answer'd her doting paramour that ask'd, +'Thankest me much!'--'Say rather wondrously,' +And seeing this here satiate be our view." + + + + +CANTO XIX + +WOE to thee, Simon Magus! woe to you, +His wretched followers! who the things of God, +Which should be wedded unto goodness, them, +Rapacious as ye are, do prostitute +For gold and silver in adultery! +Now must the trumpet sound for you, since yours +Is the third chasm. Upon the following vault +We now had mounted, where the rock impends +Directly o'er the centre of the foss. + +Wisdom Supreme! how wonderful the art, +Which thou dost manifest in heaven, in earth, +And in the evil world, how just a meed +Allotting by thy virtue unto all! + +I saw the livid stone, throughout the sides +And in its bottom full of apertures, +All equal in their width, and circular each, +Nor ample less nor larger they appear'd +Than in Saint John's fair dome of me belov'd +Those fram'd to hold the pure baptismal streams, +One of the which I brake, some few years past, +To save a whelming infant; and be this +A seal to undeceive whoever doubts +The motive of my deed. From out the mouth +Of every one, emerg'd a sinner's feet +And of the legs high upward as the calf +The rest beneath was hid. On either foot +The soles were burning, whence the flexile joints +Glanc'd with such violent motion, as had snapt +Asunder cords or twisted withs. As flame, +Feeding on unctuous matter, glides along +The surface, scarcely touching where it moves; +So here, from heel to point, glided the flames. + +"Master! say who is he, than all the rest +Glancing in fiercer agony, on whom +A ruddier flame doth prey?" I thus inquir'd. + +"If thou be willing," he replied, "that I +Carry thee down, where least the slope bank falls, +He of himself shall tell thee and his wrongs." + +I then: "As pleases thee to me is best. +Thou art my lord; and know'st that ne'er I quit +Thy will: what silence hides that knowest thou." +Thereat on the fourth pier we came, we turn'd, +And on our left descended to the depth, +A narrow strait and perforated close. +Nor from his side my leader set me down, +Till to his orifice he brought, whose limb +Quiv'ring express'd his pang. "Whoe'er thou art, +Sad spirit! thus revers'd, and as a stake +Driv'n in the soil!" I in these words began, +"If thou be able, utter forth thy voice." + +There stood I like the friar, that doth shrive +A wretch for murder doom'd, who e'en when fix'd, +Calleth him back, whence death awhile delays. + +He shouted: "Ha! already standest there? +Already standest there, O Boniface! +By many a year the writing play'd me false. +So early dost thou surfeit with the wealth, +For which thou fearedst not in guile to take +The lovely lady, and then mangle her?" + +I felt as those who, piercing not the drift +Of answer made them, stand as if expos'd +In mockery, nor know what to reply, +When Virgil thus admonish'd: "Tell him quick, +I am not he, not he, whom thou believ'st." + +And I, as was enjoin'd me, straight replied. + +That heard, the spirit all did wrench his feet, +And sighing next in woeful accent spake: +"What then of me requirest? If to know +So much imports thee, who I am, that thou +Hast therefore down the bank descended, learn +That in the mighty mantle I was rob'd, +And of a she-bear was indeed the son, +So eager to advance my whelps, that there +My having in my purse above I stow'd, +And here myself. Under my head are dragg'd +The rest, my predecessors in the guilt +Of simony. Stretch'd at their length they lie +Along an opening in the rock. 'Midst them +I also low shall fall, soon as he comes, +For whom I took thee, when so hastily +I question'd. But already longer time +Hath pass'd, since my souls kindled, and I thus +Upturn'd have stood, than is his doom to stand +Planted with fiery feet. For after him, +One yet of deeds more ugly shall arrive, +From forth the west, a shepherd without law, +Fated to cover both his form and mine. +He a new Jason shall be call'd, of whom +In Maccabees we read; and favour such +As to that priest his king indulgent show'd, +Shall be of France's monarch shown to him." + +I know not if I here too far presum'd, +But in this strain I answer'd: "Tell me now, +What treasures from St. Peter at the first +Our Lord demanded, when he put the keys +Into his charge? Surely he ask'd no more +But, Follow me! Nor Peter nor the rest +Or gold or silver of Matthias took, +When lots were cast upon the forfeit place +Of the condemned soul. Abide thou then; +Thy punishment of right is merited: +And look thou well to that ill-gotten coin, +Which against Charles thy hardihood inspir'd. +If reverence of the keys restrain'd me not, +Which thou in happier time didst hold, I yet +Severer speech might use. Your avarice +O'ercasts the world with mourning, under foot +Treading the good, and raising bad men up. +Of shepherds, like to you, th' Evangelist +Was ware, when her, who sits upon the waves, +With kings in filthy whoredom he beheld, +She who with seven heads tower'd at her birth, +And from ten horns her proof of glory drew, +Long as her spouse in virtue took delight. +Of gold and silver ye have made your god, +Diff'ring wherein from the idolater, +But he that worships one, a hundred ye? +Ah, Constantine! to how much ill gave birth, +Not thy conversion, but that plenteous dower, +Which the first wealthy Father gain'd from thee!" + +Meanwhile, as thus I sung, he, whether wrath +Or conscience smote him, violent upsprang +Spinning on either sole. I do believe +My teacher well was pleas'd, with so compos'd +A lip, he listen'd ever to the sound +Of the true words I utter'd. In both arms +He caught, and to his bosom lifting me +Upward retrac'd the way of his descent. + +Nor weary of his weight he press'd me close, +Till to the summit of the rock we came, +Our passage from the fourth to the fifth pier. +His cherish'd burden there gently he plac'd +Upon the rugged rock and steep, a path +Not easy for the clamb'ring goat to mount. + +Thence to my view another vale appear'd + + + + +CANTO XX + +AND now the verse proceeds to torments new, +Fit argument of this the twentieth strain +Of the first song, whose awful theme records +The spirits whelm'd in woe. Earnest I look'd +Into the depth, that open'd to my view, +Moisten'd with tears of anguish, and beheld +A tribe, that came along the hollow vale, +In silence weeping: such their step as walk +Quires chanting solemn litanies on earth. + +As on them more direct mine eye descends, +Each wondrously seem'd to be revers'd +At the neck-bone, so that the countenance +Was from the reins averted: and because +None might before him look, they were compell'd +To' advance with backward gait. Thus one perhaps +Hath been by force of palsy clean transpos'd, +But I ne'er saw it nor believe it so. + +Now, reader! think within thyself, so God +Fruit of thy reading give thee! how I long +Could keep my visage dry, when I beheld +Near me our form distorted in such guise, +That on the hinder parts fall'n from the face +The tears down-streaming roll'd. Against a rock +I leant and wept, so that my guide exclaim'd: +"What, and art thou too witless as the rest? +Here pity most doth show herself alive, +When she is dead. What guilt exceedeth his, +Who with Heaven's judgment in his passion strives? +Raise up thy head, raise up, and see the man, +Before whose eyes earth gap'd in Thebes, when all +Cried out, 'Amphiaraus, whither rushest? +'Why leavest thou the war?' He not the less +Fell ruining far as to Minos down, +Whose grapple none eludes. Lo! how he makes +The breast his shoulders, and who once too far +Before him wish'd to see, now backward looks, +And treads reverse his path. Tiresias note, +Who semblance chang'd, when woman he became +Of male, through every limb transform'd, and then +Once more behov'd him with his rod to strike +The two entwining serpents, ere the plumes, +That mark'd the better sex, might shoot again. + +"Aruns, with more his belly facing, comes. +On Luni's mountains 'midst the marbles white, +Where delves Carrara's hind, who wons beneath, +A cavern was his dwelling, whence the stars +And main-sea wide in boundless view he held. + +"The next, whose loosen'd tresses overspread +Her bosom, which thou seest not (for each hair +On that side grows) was Manto, she who search'd +Through many regions, and at length her seat +Fix'd in my native land, whence a short space +My words detain thy audience. When her sire +From life departed, and in servitude +The city dedicate to Bacchus mourn'd, +Long time she went a wand'rer through the world. +Aloft in Italy's delightful land +A lake there lies, at foot of that proud Alp, +That o'er the Tyrol locks Germania in, +Its name Benacus, which a thousand rills, +Methinks, and more, water between the vale +Camonica and Garda and the height +Of Apennine remote. There is a spot +At midway of that lake, where he who bears +Of Trento's flock the past'ral staff, with him +Of Brescia, and the Veronese, might each +Passing that way his benediction give. +A garrison of goodly site and strong +Peschiera stands, to awe with front oppos'd +The Bergamese and Brescian, whence the shore +More slope each way descends. There, whatsoev'er +Benacus' bosom holds not, tumbling o'er +Down falls, and winds a river flood beneath +Through the green pastures. Soon as in his course +The steam makes head, Benacus then no more +They call the name, but Mincius, till at last +Reaching Governo into Po he falls. +Not far his course hath run, when a wide flat +It finds, which overstretchmg as a marsh +It covers, pestilent in summer oft. +Hence journeying, the savage maiden saw +'Midst of the fen a territory waste +And naked of inhabitants. To shun +All human converse, here she with her slaves +Plying her arts remain'd, and liv'd, and left +Her body tenantless. Thenceforth the tribes, +Who round were scatter'd, gath'ring to that place +Assembled; for its strength was great, enclos'd +On all parts by the fen. On those dead bones +They rear'd themselves a city, for her sake, +Calling it Mantua, who first chose the spot, +Nor ask'd another omen for the name, +Wherein more numerous the people dwelt, +Ere Casalodi's madness by deceit +Was wrong'd of Pinamonte. If thou hear +Henceforth another origin assign'd +Of that my country, I forewarn thee now, +That falsehood none beguile thee of the truth." + +I answer'd: "Teacher, I conclude thy words +So certain, that all else shall be to me +As embers lacking life. But now of these, +Who here proceed, instruct me, if thou see +Any that merit more especial note. +For thereon is my mind alone intent." + +He straight replied: "That spirit, from whose cheek +The beard sweeps o'er his shoulders brown, what time +Graecia was emptied of her males, that scarce +The cradles were supplied, the seer was he +In Aulis, who with Calchas gave the sign +When first to cut the cable. Him they nam'd +Eurypilus: so sings my tragic strain, +In which majestic measure well thou know'st, +Who know'st it all. That other, round the loins +So slender of his shape, was Michael Scot, +Practis'd in ev'ry slight of magic wile. + +"Guido Bonatti see: Asdente mark, +Who now were willing, he had tended still +The thread and cordwain; and too late repents. + +"See next the wretches, who the needle left, +The shuttle and the spindle, and became +Diviners: baneful witcheries they wrought +With images and herbs. But onward now: +For now doth Cain with fork of thorns confine +On either hemisphere, touching the wave +Beneath the towers of Seville. Yesternight +The moon was round. Thou mayst remember well: +For she good service did thee in the gloom +Of the deep wood." This said, both onward mov'd. + + + + +CANTO XXI + +THUS we from bridge to bridge, with other talk, +The which my drama cares not to rehearse, +Pass'd on; and to the summit reaching, stood +To view another gap, within the round +Of Malebolge, other bootless pangs. + +Marvelous darkness shadow'd o'er the place. + +In the Venetians' arsenal as boils +Through wintry months tenacious pitch, to smear +Their unsound vessels; for th' inclement time +Sea-faring men restrains, and in that while +His bark one builds anew, another stops +The ribs of his, that hath made many a voyage; +One hammers at the prow, one at the poop; +This shapeth oars, that other cables twirls, +The mizen one repairs and main-sail rent +So not by force of fire but art divine +Boil'd here a glutinous thick mass, that round +Lim'd all the shore beneath. I that beheld, +But therein nought distinguish'd, save the surge, +Rais'd by the boiling, in one mighty swell +Heave, and by turns subsiding and fall. While there +I fix'd my ken below, "Mark! mark!" my guide +Exclaiming, drew me towards him from the place, +Wherein I stood. I turn'd myself as one, +Impatient to behold that which beheld +He needs must shun, whom sudden fear unmans, +That he his flight delays not for the view. +Behind me I discern'd a devil black, +That running, up advanc'd along the rock. +Ah! what fierce cruelty his look bespake! +In act how bitter did he seem, with wings +Buoyant outstretch'd and feet of nimblest tread! +His shoulder proudly eminent and sharp +Was with a sinner charg'd; by either haunch +He held him, the foot's sinew griping fast. + +"Ye of our bridge!" he cried, "keen-talon'd fiends! +Lo! one of Santa Zita's elders! Him +Whelm ye beneath, while I return for more. +That land hath store of such. All men are there, +Except Bonturo, barterers: of 'no' +For lucre there an 'aye' is quickly made." + +Him dashing down, o'er the rough rock he turn'd, +Nor ever after thief a mastiff loos'd +Sped with like eager haste. That other sank +And forthwith writing to the surface rose. +But those dark demons, shrouded by the bridge, +Cried "Here the hallow'd visage saves not: here +Is other swimming than in Serchio's wave. +Wherefore if thou desire we rend thee not, +Take heed thou mount not o'er the pitch." This said, +They grappled him with more than hundred hooks, +And shouted: "Cover'd thou must sport thee here; +So, if thou canst, in secret mayst thou filch." + +E'en thus the cook bestirs him, with his grooms, +To thrust the flesh into the caldron down +With flesh-hooks, that it float not on the top. + +Me then my guide bespake: "Lest they descry, +That thou art here, behind a craggy rock +Bend low and screen thee; and whate'er of force +Be offer'd me, or insult, fear thou not: +For I am well advis'd, who have been erst +In the like fray." Beyond the bridge's head +Therewith he pass'd, and reaching the sixth pier, +Behov'd him then a forehead terror-proof. + +With storm and fury, as when dogs rush forth +Upon the poor man's back, who suddenly +From whence he standeth makes his suit; so rush'd +Those from beneath the arch, and against him +Their weapons all they pointed. He aloud: +"Be none of you outrageous: ere your time +Dare seize me, come forth from amongst you one, + +"Who having heard my words, decide he then +If he shall tear these limbs." They shouted loud, +"Go, Malacoda!" Whereat one advanc'd, +The others standing firm, and as he came, +"What may this turn avail him?" he exclaim'd. + +"Believ'st thou, Malacoda! I had come +Thus far from all your skirmishing secure," +My teacher answered, "without will divine +And destiny propitious? Pass we then +For so Heaven's pleasure is, that I should lead +Another through this savage wilderness." + +Forthwith so fell his pride, that he let drop +The instrument of torture at his feet, +And to the rest exclaim'd: "We have no power +To strike him." Then to me my guide: "O thou! +Who on the bridge among the crags dost sit +Low crouching, safely now to me return." + +I rose, and towards him moved with speed: the fiends +Meantime all forward drew: me terror seiz'd +Lest they should break the compact they had made. +Thus issuing from Caprona, once I saw +Th' infantry dreading, lest his covenant +The foe should break; so close he hemm'd them round. + +I to my leader's side adher'd, mine eyes +With fixt and motionless observance bent +On their unkindly visage. They their hooks +Protruding, one the other thus bespake: +"Wilt thou I touch him on the hip?" To whom +Was answer'd: "Even so; nor miss thy aim." + +But he, who was in conf'rence with my guide, +Turn'd rapid round, and thus the demon spake: +"Stay, stay thee, Scarmiglione!" Then to us +He added: "Further footing to your step +This rock affords not, shiver'd to the base +Of the sixth arch. But would you still proceed, +Up by this cavern go: not distant far, +Another rock will yield you passage safe. +Yesterday, later by five hours than now, +Twelve hundred threescore years and six had fill'd +The circuit of their course, since here the way +Was broken. Thitherward I straight dispatch +Certain of these my scouts, who shall espy +If any on the surface bask. With them +Go ye: for ye shall find them nothing fell. +Come Alichino forth," with that he cried, +"And Calcabrina, and Cagnazzo thou! +The troop of ten let Barbariccia lead. +With Libicocco Draghinazzo haste, +Fang'd Ciriatto, Grafflacane fierce, +And Farfarello, and mad Rubicant. +Search ye around the bubbling tar. For these, +In safety lead them, where the other crag +Uninterrupted traverses the dens." + +I then: "O master! what a sight is there! +Ah! without escort, journey we alone, +Which, if thou know the way, I covet not. +Unless thy prudence fail thee, dost not mark +How they do gnarl upon us, and their scowl +Threatens us present tortures?" He replied: +"I charge thee fear not: let them, as they will, +Gnarl on: 't is but in token of their spite +Against the souls, who mourn in torment steep'd." + +To leftward o'er the pier they turn'd; but each +Had first between his teeth prest close the tongue, +Toward their leader for a signal looking, +Which he with sound obscene triumphant gave. + + + + +CANTO XXII + +IT hath been heretofore my chance to see +Horsemen with martial order shifting camp, +To onset sallying, or in muster rang'd, +Or in retreat sometimes outstretch'd for flight; +Light-armed squadrons and fleet foragers +Scouring thy plains, Arezzo! have I seen, +And clashing tournaments, and tilting jousts, +Now with the sound of trumpets, now of bells, +Tabors, or signals made from castled heights, +And with inventions multiform, our own, +Or introduc'd from foreign land; but ne'er +To such a strange recorder I beheld, +In evolution moving, horse nor foot, +Nor ship, that tack'd by sign from land or star. + +With the ten demons on our way we went; +Ah fearful company! but in the church +With saints, with gluttons at the tavern's mess. + +Still earnest on the pitch I gaz'd, to mark +All things whate'er the chasm contain'd, and those +Who burn'd within. As dolphins, that, in sign +To mariners, heave high their arched backs, +That thence forewarn'd they may advise to save +Their threaten'd vessels; so, at intervals, +To ease the pain his back some sinner show'd, +Then hid more nimbly than the lightning glance. + +E'en as the frogs, that of a wat'ry moat +Stand at the brink, with the jaws only out, +Their feet and of the trunk all else concealed, +Thus on each part the sinners stood, but soon +As Barbariccia was at hand, so they +Drew back under the wave. I saw, and yet +My heart doth stagger, one, that waited thus, +As it befalls that oft one frog remains, +While the next springs away: and Graffiacan, +Who of the fiends was nearest, grappling seiz'd +His clotted locks, and dragg'd him sprawling up, +That he appear'd to me an otter. Each +Already by their names I knew, so well +When they were chosen, I observ'd, and mark'd +How one the other call'd. "O Rubicant! +See that his hide thou with thy talons flay," +Shouted together all the cursed crew. + +Then I: "Inform thee, master! if thou may, +What wretched soul is this, on whom their hand +His foes have laid." My leader to his side +Approach'd, and whence he came inquir'd, to whom +Was answer'd thus: "Born in Navarre's domain +My mother plac'd me in a lord's retinue, +For she had borne me to a losel vile, +A spendthrift of his substance and himself. +The good king Thibault after that I serv'd, +To peculating here my thoughts were turn'd, +Whereof I give account in this dire heat." + +Straight Ciriatto, from whose mouth a tusk +Issued on either side, as from a boar, +Ript him with one of these. 'Twixt evil claws +The mouse had fall'n: but Barbariccia cried, +Seizing him with both arms: "Stand thou apart, +While I do fix him on my prong transpierc'd." +Then added, turning to my guide his face, +"Inquire of him, if more thou wish to learn, +Ere he again be rent." My leader thus: +"Then tell us of the partners in thy guilt; +Knowest thou any sprung of Latian land +Under the tar?"--"I parted," he replied, +"But now from one, who sojourn'd not far thence; +So were I under shelter now with him! +Nor hook nor talon then should scare me more."--. + +"Too long we suffer," Libicocco cried, +Then, darting forth a prong, seiz'd on his arm, +And mangled bore away the sinewy part. +Him Draghinazzo by his thighs beneath +Would next have caught, whence angrily their chief, +Turning on all sides round, with threat'ning brow +Restrain'd them. When their strife a little ceas'd, +Of him, who yet was gazing on his wound, +My teacher thus without delay inquir'd: +"Who was the spirit, from whom by evil hap +Parting, as thou has told, thou cam'st to shore?"-- + +"It was the friar Gomita," he rejoin'd, +"He of Gallura, vessel of all guile, +Who had his master's enemies in hand, +And us'd them so that they commend him well. +Money he took, and them at large dismiss'd. +So he reports: and in each other charge +Committed to his keeping, play'd the part +Of barterer to the height: with him doth herd +The chief of Logodoro, Michel Zanche. +Sardinia is a theme, whereof their tongue +Is never weary. Out! alas! behold +That other, how he grins! More would I say, +But tremble lest he mean to maul me sore." + +Their captain then to Farfarello turning, +Who roll'd his moony eyes in act to strike, +Rebuk'd him thus: "Off! cursed bird! Avaunt!"-- + +"If ye desire to see or hear," he thus +Quaking with dread resum'd, "or Tuscan spirits +Or Lombard, I will cause them to appear. +Meantime let these ill talons bate their fury, +So that no vengeance they may fear from them, +And I, remaining in this self-same place, +Will for myself but one, make sev'n appear, +When my shrill whistle shall be heard; for so +Our custom is to call each other up." + +Cagnazzo at that word deriding grinn'd, +Then wagg'd the head and spake: "Hear his device, +Mischievous as he is, to plunge him down." + +Whereto he thus, who fail'd not in rich store +Of nice-wove toils; "Mischief forsooth extreme, +Meant only to procure myself more woe!" + +No longer Alichino then refrain'd, +But thus, the rest gainsaying, him bespake: +"If thou do cast thee down, I not on foot +Will chase thee, but above the pitch will beat +My plumes. Quit we the vantage ground, and let +The bank be as a shield, that we may see +If singly thou prevail against us all." + +Now, reader, of new sport expect to hear! + +They each one turn'd his eyes to the' other shore, +He first, who was the hardest to persuade. +The spirit of Navarre chose well his time, +Planted his feet on land, and at one leap +Escaping disappointed their resolve. + +Them quick resentment stung, but him the most, +Who was the cause of failure; in pursuit +He therefore sped, exclaiming; "Thou art caught." + +But little it avail'd: terror outstripp'd +His following flight: the other plung'd beneath, +And he with upward pinion rais'd his breast: +E'en thus the water-fowl, when she perceives +The falcon near, dives instant down, while he +Enrag'd and spent retires. That mockery +In Calcabrina fury stirr'd, who flew +After him, with desire of strife inflam'd; +And, for the barterer had 'scap'd, so turn'd +His talons on his comrade. O'er the dyke +In grapple close they join'd; but the' other prov'd +A goshawk able to rend well his foe; + +And in the boiling lake both fell. The heat +Was umpire soon between them, but in vain +To lift themselves they strove, so fast were glued +Their pennons. Barbariccia, as the rest, +That chance lamenting, four in flight dispatch'd +From the' other coast, with all their weapons arm'd. +They, to their post on each side speedily +Descending, stretch'd their hooks toward the fiends, +Who flounder'd, inly burning from their scars: +And we departing left them to that broil. + + + + +CANTO XXIII + +IN silence and in solitude we went, +One first, the other following his steps, +As minor friars journeying on their road. + +The present fray had turn'd my thoughts to muse +Upon old Aesop's fable, where he told +What fate unto the mouse and frog befell. +For language hath not sounds more like in sense, +Than are these chances, if the origin +And end of each be heedfully compar'd. +And as one thought bursts from another forth, +So afterward from that another sprang, +Which added doubly to my former fear. +For thus I reason'd: "These through us have been +So foil'd, with loss and mock'ry so complete, +As needs must sting them sore. If anger then +Be to their evil will conjoin'd, more fell +They shall pursue us, than the savage hound +Snatches the leveret, panting 'twixt his jaws." + +Already I perceiv'd my hair stand all +On end with terror, and look'd eager back. + +"Teacher," I thus began, "if speedily +Thyself and me thou hide not, much I dread +Those evil talons. Even now behind +They urge us: quick imagination works +So forcibly, that I already feel them." + +He answer'd: "Were I form'd of leaded glass, +I should not sooner draw unto myself +Thy outward image, than I now imprint +That from within. This moment came thy thoughts +Presented before mine, with similar act +And count'nance similar, so that from both +I one design have fram'd. If the right coast +Incline so much, that we may thence descend +Into the other chasm, we shall escape +Secure from this imagined pursuit." + +He had not spoke his purpose to the end, +When I from far beheld them with spread wings +Approach to take us. Suddenly my guide +Caught me, ev'n as a mother that from sleep +Is by the noise arous'd, and near her sees +The climbing fires, who snatches up her babe +And flies ne'er pausing, careful more of him +Than of herself, that but a single vest +Clings round her limbs. Down from the jutting beach +Supine he cast him, to that pendent rock, +Which closes on one part the other chasm. + +Never ran water with such hurrying pace +Adown the tube to turn a landmill's wheel, +When nearest it approaches to the spokes, +As then along that edge my master ran, +Carrying me in his bosom, as a child, +Not a companion. Scarcely had his feet +Reach'd to the lowest of the bed beneath, + +When over us the steep they reach'd; but fear +In him was none; for that high Providence, +Which plac'd them ministers of the fifth foss, +Power of departing thence took from them all. + +There in the depth we saw a painted tribe, +Who pac'd with tardy steps around, and wept, +Faint in appearance and o'ercome with toil. +Caps had they on, with hoods, that fell low down +Before their eyes, in fashion like to those +Worn by the monks in Cologne. Their outside +Was overlaid with gold, dazzling to view, +But leaden all within, and of such weight, +That Frederick's compar'd to these were straw. +Oh, everlasting wearisome attire! + +We yet once more with them together turn'd +To leftward, on their dismal moan intent. +But by the weight oppress'd, so slowly came +The fainting people, that our company +Was chang'd at every movement of the step. + +Whence I my guide address'd: "See that thou find +Some spirit, whose name may by his deeds be known, +And to that end look round thee as thou go'st." + +Then one, who understood the Tuscan voice, +Cried after us aloud: "Hold in your feet, +Ye who so swiftly speed through the dusk air. +Perchance from me thou shalt obtain thy wish." + +Whereat my leader, turning, me bespake: +"Pause, and then onward at their pace proceed." + +I staid, and saw two Spirits in whose look +Impatient eagerness of mind was mark'd +To overtake me; but the load they bare +And narrow path retarded their approach. + +Soon as arriv'd, they with an eye askance +Perus'd me, but spake not: then turning each +To other thus conferring said: "This one +Seems, by the action of his throat, alive. +And, be they dead, what privilege allows +They walk unmantled by the cumbrous stole?" + +Then thus to me: "Tuscan, who visitest +The college of the mourning hypocrites, +Disdain not to instruct us who thou art." + +"By Arno's pleasant stream," I thus replied, +"In the great city I was bred and grew, +And wear the body I have ever worn. +but who are ye, from whom such mighty grief, +As now I witness, courseth down your cheeks? +What torment breaks forth in this bitter woe?" +"Our bonnets gleaming bright with orange hue," +One of them answer'd, "are so leaden gross, +That with their weight they make the balances +To crack beneath them. Joyous friars we were, +Bologna's natives, Catalano I, +He Loderingo nam'd, and by thy land +Together taken, as men used to take +A single and indifferent arbiter, +To reconcile their strifes. How there we sped, +Gardingo's vicinage can best declare." + +"O friars!" I began, "your miseries--" +But there brake off, for one had caught my eye, +Fix'd to a cross with three stakes on the ground: +He, when he saw me, writh'd himself, throughout +Distorted, ruffling with deep sighs his beard. +And Catalano, who thereof was 'ware, + +Thus spake: "That pierced spirit, whom intent +Thou view'st, was he who gave the Pharisees +Counsel, that it were fitting for one man +To suffer for the people. He doth lie +Transverse; nor any passes, but him first +Behoves make feeling trial how each weighs. +In straits like this along the foss are plac'd +The father of his consort, and the rest +Partakers in that council, seed of ill +And sorrow to the Jews." I noted then, +How Virgil gaz'd with wonder upon him, +Thus abjectly extended on the cross +In banishment eternal. To the friar +He next his words address'd: "We pray ye tell, +If so be lawful, whether on our right +Lies any opening in the rock, whereby +We both may issue hence, without constraint +On the dark angels, that compell'd they come +To lead us from this depth." He thus replied: +"Nearer than thou dost hope, there is a rock +From the next circle moving, which o'ersteps +Each vale of horror, save that here his cope +Is shatter'd. By the ruin ye may mount: +For on the side it slants, and most the height +Rises below." With head bent down awhile +My leader stood, then spake: "He warn'd us ill, +Who yonder hangs the sinners on his hook." + +To whom the friar: At Bologna erst +"I many vices of the devil heard, +Among the rest was said, 'He is a liar, +And the father of lies!'" When he had spoke, +My leader with large strides proceeded on, +Somewhat disturb'd with anger in his look. + +I therefore left the spirits heavy laden, +And following, his beloved footsteps mark'd. + + + + +CANTO XXIV + +IN the year's early nonage, when the sun +Tempers his tresses in Aquarius' urn, +And now towards equal day the nights recede, +When as the rime upon the earth puts on +Her dazzling sister's image, but not long +Her milder sway endures, then riseth up +The village hind, whom fails his wintry store, +And looking out beholds the plain around +All whiten'd, whence impatiently he smites +His thighs, and to his hut returning in, +There paces to and fro, wailing his lot, +As a discomfited and helpless man; +Then comes he forth again, and feels new hope +Spring in his bosom, finding e'en thus soon +The world hath chang'd its count'nance, grasps his crook, +And forth to pasture drives his little flock: +So me my guide dishearten'd when I saw +His troubled forehead, and so speedily +That ill was cur'd; for at the fallen bridge +Arriving, towards me with a look as sweet, +He turn'd him back, as that I first beheld +At the steep mountain's foot. Regarding well +The ruin, and some counsel first maintain'd +With his own thought, he open'd wide his arm +And took me up. As one, who, while he works, +Computes his labour's issue, that he seems +Still to foresee the' effect, so lifting me +Up to the summit of one peak, he fix'd +His eye upon another. "Grapple that," +Said he, "but first make proof, if it be such +As will sustain thee." For one capp'd with lead +This were no journey. Scarcely he, though light, +And I, though onward push'd from crag to crag, +Could mount. And if the precinct of this coast +Were not less ample than the last, for him +I know not, but my strength had surely fail'd. +But Malebolge all toward the mouth +Inclining of the nethermost abyss, +The site of every valley hence requires, +That one side upward slope, the other fall. + +At length the point of our descent we reach'd +From the last flag: soon as to that arriv'd, +So was the breath exhausted from my lungs, +I could no further, but did seat me there. + +"Now needs thy best of man;" so spake my guide: +"For not on downy plumes, nor under shade +Of canopy reposing, fame is won, +Without which whosoe'er consumes his days +Leaveth such vestige of himself on earth, +As smoke in air or foam upon the wave. +Thou therefore rise: vanish thy weariness +By the mind's effort, in each struggle form'd +To vanquish, if she suffer not the weight +Of her corporeal frame to crush her down. +A longer ladder yet remains to scale. +From these to have escap'd sufficeth not. +If well thou note me, profit by my words." + +I straightway rose, and show'd myself less spent +Than I in truth did feel me. "On," I cried, +"For I am stout and fearless." Up the rock +Our way we held, more rugged than before, +Narrower and steeper far to climb. From talk +I ceas'd not, as we journey'd, so to seem +Least faint; whereat a voice from the other foss +Did issue forth, for utt'rance suited ill. +Though on the arch that crosses there I stood, +What were the words I knew not, but who spake +Seem'd mov'd in anger. Down I stoop'd to look, +But my quick eye might reach not to the depth +For shrouding darkness; wherefore thus I spake: +"To the next circle, Teacher, bend thy steps, +And from the wall dismount we; for as hence +I hear and understand not, so I see +Beneath, and naught discern."--"I answer not," +Said he, "but by the deed. To fair request +Silent performance maketh best return." + +We from the bridge's head descended, where +To the eighth mound it joins, and then the chasm +Opening to view, I saw a crowd within +Of serpents terrible, so strange of shape +And hideous, that remembrance in my veins +Yet shrinks the vital current. Of her sands +Let Lybia vaunt no more: if Jaculus, +Pareas and Chelyder be her brood, +Cenchris and Amphisboena, plagues so dire +Or in such numbers swarming ne'er she shew'd, +Not with all Ethiopia, and whate'er +Above the Erythraean sea is spawn'd. + +Amid this dread exuberance of woe +Ran naked spirits wing'd with horrid fear, +Nor hope had they of crevice where to hide, +Or heliotrope to charm them out of view. +With serpents were their hands behind them bound, +Which through their reins infix'd the tail and head +Twisted in folds before. And lo! on one +Near to our side, darted an adder up, +And, where the neck is on the shoulders tied, +Transpierc'd him. Far more quickly than e'er pen +Wrote O or I, he kindled, burn'd, and chang'd +To ashes, all pour'd out upon the earth. +When there dissolv'd he lay, the dust again +Uproll'd spontaneous, and the self-same form +Instant resumed. So mighty sages tell, +The' Arabian Phoenix, when five hundred years +Have well nigh circled, dies, and springs forthwith +Renascent. Blade nor herb throughout his life +He tastes, but tears of frankincense alone +And odorous amomum: swaths of nard +And myrrh his funeral shroud. As one that falls, +He knows not how, by force demoniac dragg'd +To earth, or through obstruction fettering up +In chains invisible the powers of man, +Who, risen from his trance, gazeth around, +Bewilder'd with the monstrous agony +He hath endur'd, and wildly staring sighs; +So stood aghast the sinner when he rose. + +Oh! how severe God's judgment, that deals out +Such blows in stormy vengeance! Who he was +My teacher next inquir'd, and thus in few +He answer'd: "Vanni Fucci am I call'd, +Not long since rained down from Tuscany +To this dire gullet. Me the beastial life +And not the human pleas'd, mule that I was, +Who in Pistoia found my worthy den." + +I then to Virgil: "Bid him stir not hence, +And ask what crime did thrust him hither: once +A man I knew him choleric and bloody." + +The sinner heard and feign'd not, but towards me +His mind directing and his face, wherein +Was dismal shame depictur'd, thus he spake: +"It grieves me more to have been caught by thee +In this sad plight, which thou beholdest, than +When I was taken from the other life. +I have no power permitted to deny +What thou inquirest. I am doom'd thus low +To dwell, for that the sacristy by me +Was rifled of its goodly ornaments, +And with the guilt another falsely charged. +But that thou mayst not joy to see me thus, +So as thou e'er shalt 'scape this darksome realm +Open thine ears and hear what I forebode. +Reft of the Neri first Pistoia pines, +Then Florence changeth citizens and laws. +From Valdimagra, drawn by wrathful Mars, +A vapour rises, wrapt in turbid mists, +And sharp and eager driveth on the storm +With arrowy hurtling o'er Piceno's field, +Whence suddenly the cloud shall burst, and strike +Each helpless Bianco prostrate to the ground. +This have I told, that grief may rend thy heart." + + + + +CANTO XXV + +WHEN he had spoke, the sinner rais'd his hands +Pointed in mockery, and cried: "Take them, God! +I level them at thee!" From that day forth +The serpents were my friends; for round his neck +One of then rolling twisted, as it said, +"Be silent, tongue!" Another to his arms +Upgliding, tied them, riveting itself +So close, it took from them the power to move. + +Pistoia! Ah Pistoia! why dost doubt +To turn thee into ashes, cumb'ring earth +No longer, since in evil act so far +Thou hast outdone thy seed? I did not mark, +Through all the gloomy circles of the' abyss, +Spirit, that swell'd so proudly 'gainst his God, +Not him, who headlong fell from Thebes. He fled, +Nor utter'd more; and after him there came +A centaur full of fury, shouting, "Where +Where is the caitiff?" On Maremma's marsh +Swarm not the serpent tribe, as on his haunch +They swarm'd, to where the human face begins. +Behind his head upon the shoulders lay, +With open wings, a dragon breathing fire +On whomsoe'er he met. To me my guide: +"Cacus is this, who underneath the rock +Of Aventine spread oft a lake of blood. +He, from his brethren parted, here must tread +A different journey, for his fraudful theft +Of the great herd, that near him stall'd; whence found +His felon deeds their end, beneath the mace +Of stout Alcides, that perchance laid on +A hundred blows, and not the tenth was felt." + +While yet he spake, the centaur sped away: +And under us three spirits came, of whom +Nor I nor he was ware, till they exclaim'd; +"Say who are ye?" We then brake off discourse, +Intent on these alone. I knew them not; +But, as it chanceth oft, befell, that one +Had need to name another. "Where," said he, +"Doth Cianfa lurk?" I, for a sign my guide +Should stand attentive, plac'd against my lips +The finger lifted. If, O reader! now +Thou be not apt to credit what I tell, +No marvel; for myself do scarce allow +The witness of mine eyes. But as I looked +Toward them, lo! a serpent with six feet +Springs forth on one, and fastens full upon him: +His midmost grasp'd the belly, a forefoot +Seiz'd on each arm (while deep in either cheek +He flesh'd his fangs); the hinder on the thighs +Were spread, 'twixt which the tail inserted curl'd +Upon the reins behind. Ivy ne'er clasp'd +A dodder'd oak, as round the other's limbs +The hideous monster intertwin'd his own. +Then, as they both had been of burning wax, +Each melted into other, mingling hues, +That which was either now was seen no more. +Thus up the shrinking paper, ere it burns, +A brown tint glides, not turning yet to black, +And the clean white expires. The other two +Look'd on exclaiming: "Ah, how dost thou change, +Agnello! See! Thou art nor double now, + +"Nor only one." The two heads now became +One, and two figures blended in one form +Appear'd, where both were lost. Of the four lengths +Two arms were made: the belly and the chest +The thighs and legs into such members chang'd, +As never eye hath seen. Of former shape +All trace was vanish'd. Two yet neither seem'd +That image miscreate, and so pass'd on +With tardy steps. As underneath the scourge +Of the fierce dog-star, that lays bare the fields, +Shifting from brake to brake, the lizard seems +A flash of lightning, if he thwart the road, +So toward th' entrails of the other two +Approaching seem'd, an adder all on fire, +As the dark pepper-grain, livid and swart. +In that part, whence our life is nourish'd first, +One he transpierc'd; then down before him fell +Stretch'd out. The pierced spirit look'd on him +But spake not; yea stood motionless and yawn'd, +As if by sleep or fev'rous fit assail'd. +He ey'd the serpent, and the serpent him. +One from the wound, the other from the mouth +Breath'd a thick smoke, whose vap'ry columns join'd. + +Lucan in mute attention now may hear, +Nor thy disastrous fate, Sabellus! tell, +Nor shine, Nasidius! Ovid now be mute. +What if in warbling fiction he record +Cadmus and Arethusa, to a snake +Him chang'd, and her into a fountain clear, +I envy not; for never face to face +Two natures thus transmuted did he sing, +Wherein both shapes were ready to assume +The other's substance. They in mutual guise +So answer'd, that the serpent split his train +Divided to a fork, and the pierc'd spirit +Drew close his steps together, legs and thighs +Compacted, that no sign of juncture soon +Was visible: the tail disparted took +The figure which the spirit lost, its skin +Soft'ning, his indurated to a rind. +The shoulders next I mark'd, that ent'ring join'd +The monster's arm-pits, whose two shorter feet +So lengthen'd, as the other's dwindling shrunk. +The feet behind then twisting up became +That part that man conceals, which in the wretch +Was cleft in twain. While both the shadowy smoke +With a new colour veils, and generates +Th' excrescent pile on one, peeling it off +From th' other body, lo! upon his feet +One upright rose, and prone the other fell. +Not yet their glaring and malignant lamps +Were shifted, though each feature chang'd beneath. +Of him who stood erect, the mounting face +Retreated towards the temples, and what there +Superfluous matter came, shot out in ears +From the smooth cheeks, the rest, not backward dragg'd, +Of its excess did shape the nose; and swell'd +Into due size protuberant the lips. +He, on the earth who lay, meanwhile extends +His sharpen'd visage, and draws down the ears +Into the head, as doth the slug his horns. +His tongue continuous before and apt +For utt'rance, severs; and the other's fork +Closing unites. That done the smoke was laid. +The soul, transform'd into the brute, glides off, +Hissing along the vale, and after him +The other talking sputters; but soon turn'd +His new-grown shoulders on him, and in few +Thus to another spake: "Along this path +Crawling, as I have done, speed Buoso now!" + +So saw I fluctuate in successive change +Th' unsteady ballast of the seventh hold: +And here if aught my tongue have swerv'd, events +So strange may be its warrant. O'er mine eyes +Confusion hung, and on my thoughts amaze. + +Yet 'scap'd they not so covertly, but well +I mark'd Sciancato: he alone it was +Of the three first that came, who chang'd not: thou, +The other's fate, Gaville, still dost rue. + + + + +CANTO XXVI + +FLORENCE exult! for thou so mightily +Hast thriven, that o'er land and sea thy wings +Thou beatest, and thy name spreads over hell! +Among the plund'rers such the three I found +Thy citizens, whence shame to me thy son, +And no proud honour to thyself redounds. + +But if our minds, when dreaming near the dawn, +Are of the truth presageful, thou ere long +Shalt feel what Prato, (not to say the rest) +Would fain might come upon thee; and that chance +Were in good time, if it befell thee now. +Would so it were, since it must needs befall! +For as time wears me, I shall grieve the more. + +We from the depth departed; and my guide +Remounting scal'd the flinty steps, which late +We downward trac'd, and drew me up the steep. +Pursuing thus our solitary way +Among the crags and splinters of the rock, +Sped not our feet without the help of hands. + +Then sorrow seiz'd me, which e'en now revives, +As my thought turns again to what I saw, +And, more than I am wont, I rein and curb +The powers of nature in me, lest they run +Where Virtue guides not; that if aught of good +My gentle star, or something better gave me, +I envy not myself the precious boon. + +As in that season, when the sun least veils +His face that lightens all, what time the fly +Gives way to the shrill gnat, the peasant then +Upon some cliff reclin'd, beneath him sees +Fire-flies innumerous spangling o'er the vale, +Vineyard or tilth, where his day-labour lies: +With flames so numberless throughout its space +Shone the eighth chasm, apparent, when the depth +Was to my view expos'd. As he, whose wrongs +The bears aveng'd, at its departure saw +Elijah's chariot, when the steeds erect +Rais'd their steep flight for heav'n; his eyes meanwhile, +Straining pursu'd them, till the flame alone +Upsoaring like a misty speck he kenn'd; +E'en thus along the gulf moves every flame, +A sinner so enfolded close in each, +That none exhibits token of the theft. + +Upon the bridge I forward bent to look, +And grasp'd a flinty mass, or else had fall'n, +Though push'd not from the height. The guide, who mark'd +How I did gaze attentive, thus began: + +"Within these ardours are the spirits, each +Swath'd in confining fire."--"Master, thy word," +I answer'd, "hath assur'd me; yet I deem'd +Already of the truth, already wish'd +To ask thee, who is in yon fire, that comes +So parted at the summit, as it seem'd +Ascending from that funeral pile, where lay +The Theban brothers?" He replied: "Within +Ulysses there and Diomede endure +Their penal tortures, thus to vengeance now +Together hasting, as erewhile to wrath. +These in the flame with ceaseless groans deplore +The ambush of the horse, that open'd wide +A portal for that goodly seed to pass, +Which sow'd imperial Rome; nor less the guile +Lament they, whence of her Achilles 'reft +Deidamia yet in death complains. +And there is rued the stratagem, that Troy +Of her Palladium spoil'd."--"If they have power +Of utt'rance from within these sparks," said I, +"O master! think my prayer a thousand fold +In repetition urg'd, that thou vouchsafe +To pause, till here the horned flame arrive. +See, how toward it with desire I bend." + +He thus: "Thy prayer is worthy of much praise, +And I accept it therefore: but do thou +Thy tongue refrain: to question them be mine, +For I divine thy wish: and they perchance, +For they were Greeks, might shun discourse with thee." + +When there the flame had come, where time and place +Seem'd fitting to my guide, he thus began: +"O ye, who dwell two spirits in one fire! +If living I of you did merit aught, +Whate'er the measure were of that desert, +When in the world my lofty strain I pour'd, +Move ye not on, till one of you unfold +In what clime death o'ertook him self-destroy'd." + +Of the old flame forthwith the greater horn +Began to roll, murmuring, as a fire +That labours with the wind, then to and fro +Wagging the top, as a tongue uttering sounds, +Threw out its voice, and spake: "When I escap'd +From Circe, who beyond a circling year +Had held me near Caieta, by her charms, +Ere thus Aeneas yet had nam'd the shore, +Nor fondness for my son, nor reverence +Of my old father, nor return of love, +That should have crown'd Penelope with joy, +Could overcome in me the zeal I had +T' explore the world, and search the ways of life, +Man's evil and his virtue. Forth I sail'd +Into the deep illimitable main, +With but one bark, and the small faithful band +That yet cleav'd to me. As Iberia far, +Far as Morocco either shore I saw, +And the Sardinian and each isle beside +Which round that ocean bathes. Tardy with age +Were I and my companions, when we came +To the strait pass, where Hercules ordain'd +The bound'ries not to be o'erstepp'd by man. +The walls of Seville to my right I left, +On the' other hand already Ceuta past. + +"O brothers!" I began, "who to the west +Through perils without number now have reach'd, +To this the short remaining watch, that yet +Our senses have to wake, refuse not proof +Of the unpeopled world, following the track +Of Phoebus. Call to mind from whence we sprang: +Ye were not form'd to live the life of brutes +But virtue to pursue and knowledge high. +With these few words I sharpen'd for the voyage +The mind of my associates, that I then +Could scarcely have withheld them. To the dawn +Our poop we turn'd, and for the witless flight +Made our oars wings, still gaining on the left. +Each star of the' other pole night now beheld, +And ours so low, that from the ocean-floor +It rose not. Five times re-illum'd, as oft +Vanish'd the light from underneath the moon +Since the deep way we enter'd, when from far +Appear'd a mountain dim, loftiest methought +Of all I e'er beheld. Joy seiz'd us straight, +But soon to mourning changed. From the new land +A whirlwind sprung, and at her foremost side +Did strike the vessel. Thrice it whirl'd her round +With all the waves, the fourth time lifted up +The poop, and sank the prow: so fate decreed: +And over us the booming billow clos'd." + + + + +CANTO XVII + +NOW upward rose the flame, and still'd its light +To speak no more, and now pass'd on with leave +From the mild poet gain'd, when following came +Another, from whose top a sound confus'd, +Forth issuing, drew our eyes that way to look. + +As the Sicilian bull, that rightfully +His cries first echoed, who had shap'd its mould, +Did so rebellow, with the voice of him +Tormented, that the brazen monster seem'd +Pierc'd through with pain; thus while no way they found +Nor avenue immediate through the flame, +Into its language turn'd the dismal words: +But soon as they had won their passage forth, +Up from the point, which vibrating obey'd +Their motion at the tongue, these sounds we heard: +"O thou! to whom I now direct my voice! +That lately didst exclaim in Lombard phrase, + +"Depart thou, I solicit thee no more, +Though somewhat tardy I perchance arrive +Let it not irk thee here to pause awhile, +And with me parley: lo! it irks not me +And yet I burn. If but e'en now thou fall +into this blind world, from that pleasant land +Of Latium, whence I draw my sum of guilt, +Tell me if those, who in Romagna dwell, +Have peace or war. For of the mountains there +Was I, betwixt Urbino and the height, +Whence Tyber first unlocks his mighty flood." + +Leaning I listen'd yet with heedful ear, +When, as he touch'd my side, the leader thus: +"Speak thou: he is a Latian." My reply +Was ready, and I spake without delay: + +"O spirit! who art hidden here below! +Never was thy Romagna without war +In her proud tyrants' bosoms, nor is now: +But open war there left I none. The state, +Ravenna hath maintain'd this many a year, +Is steadfast. There Polenta's eagle broods, +And in his broad circumference of plume +O'ershadows Cervia. The green talons grasp +The land, that stood erewhile the proof so long, +And pil'd in bloody heap the host of France. + +"The' old mastiff of Verruchio and the young, +That tore Montagna in their wrath, still make, +Where they are wont, an augre of their fangs. + +"Lamone's city and Santerno's range +Under the lion of the snowy lair. +Inconstant partisan! that changeth sides, +Or ever summer yields to winter's frost. +And she, whose flank is wash'd of Savio's wave, +As 'twixt the level and the steep she lies, +Lives so 'twixt tyrant power and liberty. + +"Now tell us, I entreat thee, who art thou? +Be not more hard than others. In the world, +So may thy name still rear its forehead high." + +Then roar'd awhile the fire, its sharpen'd point +On either side wav'd, and thus breath'd at last: +"If I did think, my answer were to one, +Who ever could return unto the world, +This flame should rest unshaken. But since ne'er, +If true be told me, any from this depth +Has found his upward way, I answer thee, +Nor fear lest infamy record the words. + +"A man of arms at first, I cloth'd me then +In good Saint Francis' girdle, hoping so +T' have made amends. And certainly my hope +Had fail'd not, but that he, whom curses light on, +The' high priest again seduc'd me into sin. +And how and wherefore listen while I tell. +Long as this spirit mov'd the bones and pulp +My mother gave me, less my deeds bespake +The nature of the lion than the fox. +All ways of winding subtlety I knew, +And with such art conducted, that the sound +Reach'd the world's limit. Soon as to that part +Of life I found me come, when each behoves +To lower sails and gather in the lines; +That which before had pleased me then I rued, +And to repentance and confession turn'd; +Wretch that I was! and well it had bested me! +The chief of the new Pharisees meantime, +Waging his warfare near the Lateran, +Not with the Saracens or Jews (his foes +All Christians were, nor against Acre one +Had fought, nor traffic'd in the Soldan's land), +He his great charge nor sacred ministry +In himself, rev'renc'd, nor in me that cord, +Which us'd to mark with leanness whom it girded. +As in Socrate, Constantine besought +To cure his leprosy Sylvester's aid, +So me to cure the fever of his pride +This man besought: my counsel to that end +He ask'd: and I was silent: for his words +Seem'd drunken: but forthwith he thus resum'd: +'From thy heart banish fear: of all offence +I hitherto absolve thee. In return, +Teach me my purpose so to execute, +That Penestrino cumber earth no more. +Heav'n, as thou knowest, I have power to shut +And open: and the keys are therefore twain, +The which my predecessor meanly priz'd.'" + +Then, yielding to the forceful arguments, +Of silence as more perilous I deem'd, +And answer'd: "Father! since thou washest me +Clear of that guilt wherein I now must fall, +Large promise with performance scant, be sure, +Shall make thee triumph in thy lofty seat." + +"When I was number'd with the dead, then came +Saint Francis for me; but a cherub dark +He met, who cried: 'Wrong me not; he is mine, +And must below to join the wretched crew, +For the deceitful counsel which he gave. +E'er since I watch'd him, hov'ring at his hair, +No power can the impenitent absolve; +Nor to repent and will at once consist, +By contradiction absolute forbid.'" +Oh mis'ry! how I shook myself, when he +Seiz'd me, and cried, "Thou haply thought'st me not +A disputant in logic so exact." +To Minos down he bore me, and the judge +Twin'd eight times round his callous back the tail, +Which biting with excess of rage, he spake: +"This is a guilty soul, that in the fire +Must vanish. Hence perdition-doom'd I rove +A prey to rankling sorrow in this garb." + +When he had thus fulfill'd his words, the flame +In dolour parted, beating to and fro, +And writhing its sharp horn. We onward went, +I and my leader, up along the rock, +Far as another arch, that overhangs +The foss, wherein the penalty is paid +Of those, who load them with committed sin. + + + + +CANTO XXVIII + +WHO, e'en in words unfetter'd, might at full +Tell of the wounds and blood that now I saw, +Though he repeated oft the tale? No tongue +So vast a theme could equal, speech and thought +Both impotent alike. If in one band +Collected, stood the people all, who e'er +Pour'd on Apulia's happy soil their blood, +Slain by the Trojans, and in that long war +When of the rings the measur'd booty made +A pile so high, as Rome's historian writes +Who errs not, with the multitude, that felt +The grinding force of Guiscard's Norman steel, +And those the rest, whose bones are gather'd yet +At Ceperano, there where treachery +Branded th' Apulian name, or where beyond +Thy walls, O Tagliacozzo, without arms +The old Alardo conquer'd; and his limbs +One were to show transpierc'd, another his +Clean lopt away; a spectacle like this +Were but a thing of nought, to the' hideous sight +Of the ninth chasm. A rundlet, that hath lost +Its middle or side stave, gapes not so wide, +As one I mark'd, torn from the chin throughout +Down to the hinder passage: 'twixt the legs +Dangling his entrails hung, the midriff lay +Open to view, and wretched ventricle, +That turns th' englutted aliment to dross. + +Whilst eagerly I fix on him my gaze, +He ey'd me, with his hands laid his breast bare, +And cried; "Now mark how I do rip me! lo! + +"How is Mohammed mangled! before me +Walks Ali weeping, from the chin his face +Cleft to the forelock; and the others all +Whom here thou seest, while they liv'd, did sow +Scandal and schism, and therefore thus are rent. +A fiend is here behind, who with his sword +Hacks us thus cruelly, slivering again +Each of this ream, when we have compast round +The dismal way, for first our gashes close +Ere we repass before him. But say who +Art thou, that standest musing on the rock, +Haply so lingering to delay the pain +Sentenc'd upon thy crimes?"--"Him death not yet," +My guide rejoin'd, "hath overta'en, nor sin +Conducts to torment; but, that he may make +Full trial of your state, I who am dead +Must through the depths of hell, from orb to orb, +Conduct him. Trust my words, for they are true." + +More than a hundred spirits, when that they heard, +Stood in the foss to mark me, through amazed, +Forgetful of their pangs. "Thou, who perchance +Shalt shortly view the sun, this warning thou +Bear to Dolcino: bid him, if he wish not +Here soon to follow me, that with good store +Of food he arm him, lest impris'ning snows +Yield him a victim to Novara's power, +No easy conquest else." With foot uprais'd +For stepping, spake Mohammed, on the ground +Then fix'd it to depart. Another shade, +Pierc'd in the throat, his nostrils mutilate +E'en from beneath the eyebrows, and one ear +Lopt off, who with the rest through wonder stood +Gazing, before the rest advanc'd, and bar'd +His wind-pipe, that without was all o'ersmear'd +With crimson stain. "O thou!" said he, "whom sin +Condemns not, and whom erst (unless too near +Resemblance do deceive me) I aloft +Have seen on Latian ground, call thou to mind +Piero of Medicina, if again +Returning, thou behold'st the pleasant land +That from Vercelli slopes to Mercabo; + +"And there instruct the twain, whom Fano boasts +Her worthiest sons, Guido and Angelo, +That if 't is giv'n us here to scan aright +The future, they out of life's tenement +Shall be cast forth, and whelm'd under the waves +Near to Cattolica, through perfidy +Of a fell tyrant. 'Twixt the Cyprian isle +And Balearic, ne'er hath Neptune seen +An injury so foul, by pirates done +Or Argive crew of old. That one-ey'd traitor +(Whose realm there is a spirit here were fain +His eye had still lack'd sight of) them shall bring +To conf'rence with him, then so shape his end, +That they shall need not 'gainst Focara's wind +Offer up vow nor pray'r." I answering thus: + +"Declare, as thou dost wish that I above +May carry tidings of thee, who is he, +In whom that sight doth wake such sad remembrance?" + +Forthwith he laid his hand on the cheek-bone +Of one, his fellow-spirit, and his jaws +Expanding, cried: "Lo! this is he I wot of; +He speaks not for himself: the outcast this +Who overwhelm'd the doubt in Caesar's mind, +Affirming that delay to men prepar'd +Was ever harmful." Oh how terrified +Methought was Curio, from whose throat was cut +The tongue, which spake that hardy word. Then one +Maim'd of each hand, uplifted in the gloom +The bleeding stumps, that they with gory spots +Sullied his face, and cried: "'Remember thee +Of Mosca, too, I who, alas! exclaim'd, +'The deed once done there is an end,' that prov'd +A seed of sorrow to the Tuscan race." + +I added: "Ay, and death to thine own tribe." + +Whence heaping woe on woe he hurried off, +As one grief stung to madness. But I there +Still linger'd to behold the troop, and saw +Things, such as I may fear without more proof +To tell of, but that conscience makes me firm, +The boon companion, who her strong breast-plate +Buckles on him, that feels no guilt within +And bids him on and fear not. Without doubt +I saw, and yet it seems to pass before me, +A headless trunk, that even as the rest +Of the sad flock pac'd onward. By the hair +It bore the sever'd member, lantern-wise +Pendent in hand, which look'd at us and said, + +"Woe's me!" The spirit lighted thus himself, +And two there were in one, and one in two. +How that may be he knows who ordereth so. + +When at the bridge's foot direct he stood, +His arm aloft he rear'd, thrusting the head +Full in our view, that nearer we might hear +The words, which thus it utter'd: "Now behold +This grievous torment, thou, who breathing go'st +To spy the dead; behold if any else +Be terrible as this. And that on earth +Thou mayst bear tidings of me, know that I +Am Bertrand, he of Born, who gave King John +The counsel mischievous. Father and son +I set at mutual war. For Absalom +And David more did not Ahitophel, +Spurring them on maliciously to strife. +For parting those so closely knit, my brain +Parted, alas! I carry from its source, +That in this trunk inhabits. Thus the law +Of retribution fiercely works in me." + + + + +CANTO XXIX + +SO were mine eyes inebriate with view +Of the vast multitude, whom various wounds +Disfigur'd, that they long'd to stay and weep. + +But Virgil rous'd me: "What yet gazest on? +Wherefore doth fasten yet thy sight below +Among the maim'd and miserable shades? +Thou hast not shewn in any chasm beside +This weakness. Know, if thou wouldst number them +That two and twenty miles the valley winds +Its circuit, and already is the moon +Beneath our feet: the time permitted now +Is short, and more not seen remains to see." + +"If thou," I straight replied, "hadst weigh'd the cause +For which I look'd, thou hadst perchance excus'd +The tarrying still." My leader part pursu'd +His way, the while I follow'd, answering him, +And adding thus: "Within that cave I deem, +Whereon so fixedly I held my ken, +There is a spirit dwells, one of my blood, +Wailing the crime that costs him now so dear." + +Then spake my master: "Let thy soul no more +Afflict itself for him. Direct elsewhere +Its thought, and leave him. At the bridge's foot +I mark'd how he did point with menacing look +At thee, and heard him by the others nam'd +Geri of Bello. Thou so wholly then +Wert busied with his spirit, who once rul'd +The towers of Hautefort, that thou lookedst not +That way, ere he was gone."--"O guide belov'd! +His violent death yet unaveng'd," said I, +"By any, who are partners in his shame, +Made him contemptuous: therefore, as I think, +He pass'd me speechless by; and doing so +Hath made me more compassionate his fate." + +So we discours'd to where the rock first show'd +The other valley, had more light been there, +E'en to the lowest depth. Soon as we came +O'er the last cloister in the dismal rounds +Of Malebolge, and the brotherhood +Were to our view expos'd, then many a dart +Of sore lament assail'd me, headed all +With points of thrilling pity, that I clos'd +Both ears against the volley with mine hands. + +As were the torment, if each lazar-house +Of Valdichiana, in the sultry time +'Twixt July and September, with the isle +Sardinia and Maremma's pestilent fen, +Had heap'd their maladies all in one foss +Together; such was here the torment: dire +The stench, as issuing steams from fester'd limbs. + +We on the utmost shore of the long rock +Descended still to leftward. Then my sight +Was livelier to explore the depth, wherein +The minister of the most mighty Lord, +All-searching Justice, dooms to punishment +The forgers noted on her dread record. + +More rueful was it not methinks to see +The nation in Aegina droop, what time +Each living thing, e'en to the little worm, +All fell, so full of malice was the air +(And afterward, as bards of yore have told, +The ancient people were restor'd anew +From seed of emmets) than was here to see +The spirits, that languish'd through the murky vale +Up-pil'd on many a stack. Confus'd they lay, +One o'er the belly, o'er the shoulders one +Roll'd of another; sideling crawl'd a third +Along the dismal pathway. Step by step +We journey'd on, in silence looking round +And list'ning those diseas'd, who strove in vain +To lift their forms. Then two I mark'd, that sat +Propp'd 'gainst each other, as two brazen pans +Set to retain the heat. From head to foot, +A tetter bark'd them round. Nor saw I e'er +Groom currying so fast, for whom his lord +Impatient waited, or himself perchance +Tir'd with long watching, as of these each one +Plied quickly his keen nails, through furiousness +Of ne'er abated pruriency. The crust +Came drawn from underneath in flakes, like scales +Scrap'd from the bream or fish of broader mail. + +"O thou, who with thy fingers rendest off +Thy coat of proof," thus spake my guide to one, +"And sometimes makest tearing pincers of them, +Tell me if any born of Latian land +Be among these within: so may thy nails +Serve thee for everlasting to this toil." + +"Both are of Latium," weeping he replied, +"Whom tortur'd thus thou seest: but who art thou +That hast inquir'd of us?" To whom my guide: +"One that descend with this man, who yet lives, +From rock to rock, and show him hell's abyss." + +Then started they asunder, and each turn'd +Trembling toward us, with the rest, whose ear +Those words redounding struck. To me my liege +Address'd him: "Speak to them whate'er thou list." + +And I therewith began: "So may no time +Filch your remembrance from the thoughts of men +In th' upper world, but after many suns +Survive it, as ye tell me, who ye are, +And of what race ye come. Your punishment, +Unseemly and disgustful in its kind, +Deter you not from opening thus much to me." + +"Arezzo was my dwelling," answer'd one, +"And me Albero of Sienna brought +To die by fire; but that, for which I died, +Leads me not here. True is in sport I told him, +That I had learn'd to wing my flight in air. +And he admiring much, as he was void +Of wisdom, will'd me to declare to him +The secret of mine art: and only hence, +Because I made him not a Daedalus, +Prevail'd on one suppos'd his sire to burn me. +But Minos to this chasm last of the ten, +For that I practis'd alchemy on earth, +Has doom'd me. Him no subterfuge eludes." + +Then to the bard I spake: "Was ever race +Light as Sienna's? Sure not France herself +Can show a tribe so frivolous and vain." + +The other leprous spirit heard my words, +And thus return'd: "Be Stricca from this charge +Exempted, he who knew so temp'rately +To lay out fortune's gifts; and Niccolo +Who first the spice's costly luxury +Discover'd in that garden, where such seed +Roots deepest in the soil: and be that troop +Exempted, with whom Caccia of Asciano +Lavish'd his vineyards and wide-spreading woods, +And his rare wisdom Abbagliato show'd +A spectacle for all. That thou mayst know +Who seconds thee against the Siennese +Thus gladly, bend this way thy sharpen'd sight, +That well my face may answer to thy ken; +So shalt thou see I am Capocchio's ghost, +Who forg'd transmuted metals by the power +Of alchemy; and if I scan thee right, +Thus needs must well remember how I aped +Creative nature by my subtle art." + + + + +CANTO XXX + +WHAT time resentment burn'd in Juno's breast +For Semele against the Theban blood, +As more than once in dire mischance was rued, +Such fatal frenzy seiz'd on Athamas, +That he his spouse beholding with a babe +Laden on either arm, "Spread out," he cried, +"The meshes, that I take the lioness +And the young lions at the pass:" then forth +Stretch'd he his merciless talons, grasping one, +One helpless innocent, Learchus nam'd, +Whom swinging down he dash'd upon a rock, +And with her other burden self-destroy'd +The hapless mother plung'd: and when the pride +Of all-presuming Troy fell from its height, +By fortune overwhelm'd, and the old king +With his realm perish'd, then did Hecuba, +A wretch forlorn and captive, when she saw +Polyxena first slaughter'd, and her son, +Her Polydorus, on the wild sea-beach +Next met the mourner's view, then reft of sense +Did she run barking even as a dog; +Such mighty power had grief to wrench her soul. +Bet ne'er the Furies or of Thebes or Troy +With such fell cruelty were seen, their goads +Infixing in the limbs of man or beast, +As now two pale and naked ghost I saw +That gnarling wildly scamper'd, like the swine +Excluded from his stye. One reach'd Capocchio, +And in the neck-joint sticking deep his fangs, +Dragg'd him, that o'er the solid pavement rubb'd +His belly stretch'd out prone. The other shape, +He of Arezzo, there left trembling, spake; +"That sprite of air is Schicchi; in like mood +Of random mischief vent he still his spite." + +To whom I answ'ring: "Oh! as thou dost hope, +The other may not flesh its jaws on thee, +Be patient to inform us, who it is, +Ere it speed hence."--"That is the ancient soul +Of wretched Myrrha," he replied, "who burn'd +With most unholy flame for her own sire, + +"And a false shape assuming, so perform'd +The deed of sin; e'en as the other there, +That onward passes, dar'd to counterfeit +Donati's features, to feign'd testament +The seal affixing, that himself might gain, +For his own share, the lady of the herd." + +When vanish'd the two furious shades, on whom +Mine eye was held, I turn'd it back to view +The other cursed spirits. One I saw +In fashion like a lute, had but the groin +Been sever'd, where it meets the forked part. +Swoln dropsy, disproportioning the limbs +With ill-converted moisture, that the paunch +Suits not the visage, open'd wide his lips +Gasping as in the hectic man for drought, +One towards the chin, the other upward curl'd. + +"O ye, who in this world of misery, +Wherefore I know not, are exempt from pain," +Thus he began, "attentively regard +Adamo's woe. When living, full supply +Ne'er lack'd me of what most I coveted; +One drop of water now, alas! I crave. +The rills, that glitter down the grassy slopes +Of Casentino, making fresh and soft +The banks whereby they glide to Arno's stream, +Stand ever in my view; and not in vain; +For more the pictur'd semblance dries me up, +Much more than the disease, which makes the flesh +Desert these shrivel'd cheeks. So from the place, +Where I transgress'd, stern justice urging me, +Takes means to quicken more my lab'ring sighs. +There is Romena, where I falsified +The metal with the Baptist's form imprest, +For which on earth I left my body burnt. +But if I here might see the sorrowing soul +Of Guido, Alessandro, or their brother, +For Branda's limpid spring I would not change +The welcome sight. One is e'en now within, +If truly the mad spirits tell, that round +Are wand'ring. But wherein besteads me that? +My limbs are fetter'd. Were I but so light, +That I each hundred years might move one inch, +I had set forth already on this path, +Seeking him out amidst the shapeless crew, +Although eleven miles it wind, not more +Than half of one across. They brought me down +Among this tribe; induc'd by them I stamp'd +The florens with three carats of alloy." + +"Who are that abject pair," I next inquir'd, +"That closely bounding thee upon thy right +Lie smoking, like a band in winter steep'd +In the chill stream?"--"When to this gulf I dropt," +He answer'd, "here I found them; since that hour +They have not turn'd, nor ever shall, I ween, +Till time hath run his course. One is that dame +The false accuser of the Hebrew youth; +Sinon the other, that false Greek from Troy. +Sharp fever drains the reeky moistness out, +In such a cloud upsteam'd." When that he heard, +One, gall'd perchance to be so darkly nam'd, +With clench'd hand smote him on the braced paunch, +That like a drum resounded: but forthwith +Adamo smote him on the face, the blow +Returning with his arm, that seem'd as hard. + +"Though my o'erweighty limbs have ta'en from me +The power to move," said he, "I have an arm +At liberty for such employ." To whom +Was answer'd: "When thou wentest to the fire, +Thou hadst it not so ready at command, +Then readier when it coin'd th' impostor gold." + +And thus the dropsied: "Ay, now speak'st thou true. +But there thou gav'st not such true testimony, +When thou wast question'd of the truth, at Troy." + +"If I spake false, thou falsely stamp'dst the coin," +Said Sinon; "I am here but for one fault, +And thou for more than any imp beside." + +"Remember," he replied, "O perjur'd one, +The horse remember, that did teem with death, +And all the world be witness to thy guilt." + +"To thine," return'd the Greek, "witness the thirst +Whence thy tongue cracks, witness the fluid mound, +Rear'd by thy belly up before thine eyes, +A mass corrupt." To whom the coiner thus: +"Thy mouth gapes wide as ever to let pass +Its evil saying. Me if thirst assails, +Yet I am stuff'd with moisture. Thou art parch'd, +Pains rack thy head, no urging would'st thou need +To make thee lap Narcissus' mirror up." + +I was all fix'd to listen, when my guide +Admonish'd: "Now beware: a little more. +And I do quarrel with thee." I perceiv'd +How angrily he spake, and towards him turn'd +With shame so poignant, as remember'd yet +Confounds me. As a man that dreams of harm +Befall'n him, dreaming wishes it a dream, +And that which is, desires as if it were not, +Such then was I, who wanting power to speak +Wish'd to excuse myself, and all the while +Excus'd me, though unweeting that I did. + +"More grievous fault than thine has been, less shame," +My master cried, "might expiate. Therefore cast +All sorrow from thy soul; and if again +Chance bring thee, where like conference is held, +Think I am ever at thy side. To hear +Such wrangling is a joy for vulgar minds." + + + + +CANTO XXXI + +THE very tongue, whose keen reproof before +Had wounded me, that either cheek was stain'd, +Now minister'd my cure. So have I heard, +Achilles and his father's javelin caus'd +Pain first, and then the boon of health restor'd. + +Turning our back upon the vale of woe, +W cross'd th' encircled mound in silence. There +Was twilight dim, that far long the gloom +Mine eye advanc'd not: but I heard a horn +Sounded aloud. The peal it blew had made +The thunder feeble. Following its course +The adverse way, my strained eyes were bent +On that one spot. So terrible a blast +Orlando blew not, when that dismal rout +O'erthrew the host of Charlemagne, and quench'd +His saintly warfare. Thitherward not long +My head was rais'd, when many lofty towers +Methought I spied. "Master," said I, "what land +Is this?" He answer'd straight: "Too long a space +Of intervening darkness has thine eye +To traverse: thou hast therefore widely err'd +In thy imagining. Thither arriv'd +Thou well shalt see, how distance can delude +The sense. A little therefore urge thee on." + +Then tenderly he caught me by the hand; +"Yet know," said he, "ere farther we advance, +That it less strange may seem, these are not towers, +But giants. In the pit they stand immers'd, +Each from his navel downward, round the bank." + +As when a fog disperseth gradually, +Our vision traces what the mist involves +Condens'd in air; so piercing through the gross +And gloomy atmosphere, as more and more +We near'd toward the brink, mine error fled, +And fear came o'er me. As with circling round +Of turrets, Montereggion crowns his walls, +E'en thus the shore, encompassing th' abyss, +Was turreted with giants, half their length +Uprearing, horrible, whom Jove from heav'n +Yet threatens, when his mutt'ring thunder rolls. + +Of one already I descried the face, +Shoulders, and breast, and of the belly huge +Great part, and both arms down along his ribs. + +All-teeming nature, when her plastic hand +Left framing of these monsters, did display +Past doubt her wisdom, taking from mad War +Such slaves to do his bidding; and if she +Repent her not of th' elephant and whale, +Who ponders well confesses her therein +Wiser and more discreet; for when brute force +And evil will are back'd with subtlety, +Resistance none avails. His visage seem'd +In length and bulk, as doth the pine, that tops +Saint Peter's Roman fane; and th' other bones +Of like proportion, so that from above +The bank, which girdled him below, such height +Arose his stature, that three Friezelanders +Had striv'n in vain to reach but to his hair. +Full thirty ample palms was he expos'd +Downward from whence a man his garments loops. +"Raphel bai ameth sabi almi," +So shouted his fierce lips, which sweeter hymns +Became not; and my guide address'd him thus: + +"O senseless spirit! let thy horn for thee +Interpret: therewith vent thy rage, if rage +Or other passion wring thee. Search thy neck, +There shalt thou find the belt that binds it on. +Wild spirit! lo, upon thy mighty breast +Where hangs the baldrick!" Then to me he spake: +"He doth accuse himself. Nimrod is this, +Through whose ill counsel in the world no more +One tongue prevails. But pass we on, nor waste +Our words; for so each language is to him, +As his to others, understood by none." + +Then to the leftward turning sped we forth, +And at a sling's throw found another shade +Far fiercer and more huge. I cannot say +What master hand had girt him; but he held +Behind the right arm fetter'd, and before +The other with a chain, that fasten'd him +From the neck down, and five times round his form +Apparent met the wreathed links. "This proud one +Would of his strength against almighty Jove +Make trial," said my guide; "whence he is thus +Requited: Ephialtes him they call. + +"Great was his prowess, when the giants brought +Fear on the gods: those arms, which then he piled, +Now moves he never." Forthwith I return'd: +"Fain would I, if 't were possible, mine eyes +Of Briareus immeasurable gain'd +Experience next." He answer'd: "Thou shalt see +Not far from hence Antaeus, who both speaks +And is unfetter'd, who shall place us there +Where guilt is at its depth. Far onward stands +Whom thou wouldst fain behold, in chains, and made +Like to this spirit, save that in his looks +More fell he seems." By violent earthquake rock'd +Ne'er shook a tow'r, so reeling to its base, +As Ephialtes. More than ever then +I dreaded death, nor than the terror more +Had needed, if I had not seen the cords +That held him fast. We, straightway journeying on, +Came to Antaeus, who five ells complete +Without the head, forth issued from the cave. + +"O thou, who in the fortunate vale, that made +Great Scipio heir of glory, when his sword +Drove back the troop of Hannibal in flight, +Who thence of old didst carry for thy spoil +An hundred lions; and if thou hadst fought +In the high conflict on thy brethren's side, +Seems as men yet believ'd, that through thine arm +The sons of earth had conquer'd, now vouchsafe +To place us down beneath, where numbing cold +Locks up Cocytus. Force not that we crave +Or Tityus' help or Typhon's. Here is one +Can give what in this realm ye covet. Stoop +Therefore, nor scornfully distort thy lip. +He in the upper world can yet bestow +Renown on thee, for he doth live, and looks +For life yet longer, if before the time +Grace call him not unto herself." Thus spake +The teacher. He in haste forth stretch'd his hands, +And caught my guide. Alcides whilom felt +That grapple straighten'd score. Soon as my guide +Had felt it, he bespake me thus: "This way +That I may clasp thee;" then so caught me up, +That we were both one burden. As appears +The tower of Carisenda, from beneath +Where it doth lean, if chance a passing cloud +So sail across, that opposite it hangs, +Such then Antaeus seem'd, as at mine ease +I mark'd him stooping. I were fain at times +T' have pass'd another way. Yet in th' abyss, +That Lucifer with Judas low ingulfs, +Lightly he plac'd us; nor there leaning stay'd, +But rose as in a bark the stately mast. + + + + +CANTO XXXII + +COULD I command rough rhimes and hoarse, to suit +That hole of sorrow, o'er which ev'ry rock +His firm abutment rears, then might the vein +Of fancy rise full springing: but not mine +Such measures, and with falt'ring awe I touch +The mighty theme; for to describe the depth +Of all the universe, is no emprize +To jest with, and demands a tongue not us'd +To infant babbling. But let them assist +My song, the tuneful maidens, by whose aid +Amphion wall'd in Thebes, so with the truth +My speech shall best accord. Oh ill-starr'd folk, +Beyond all others wretched! who abide +In such a mansion, as scarce thought finds words +To speak of, better had ye here on earth +Been flocks or mountain goats. As down we stood +In the dark pit beneath the giants' feet, +But lower far than they, and I did gaze +Still on the lofty battlement, a voice +Bespoke me thus: "Look how thou walkest. Take +Good heed, thy soles do tread not on the heads +Of thy poor brethren." Thereupon I turn'd, +And saw before and underneath my feet +A lake, whose frozen surface liker seem'd +To glass than water. Not so thick a veil +In winter e'er hath Austrian Danube spread +O'er his still course, nor Tanais far remote +Under the chilling sky. Roll'd o'er that mass +Had Tabernich or Pietrapana fall'n, + +Not e'en its rim had creak'd. As peeps the frog +Croaking above the wave, what time in dreams +The village gleaner oft pursues her toil, +So, to where modest shame appears, thus low +Blue pinch'd and shrin'd in ice the spirits stood, +Moving their teeth in shrill note like the stork. +His face each downward held; their mouth the cold, +Their eyes express'd the dolour of their heart. + +A space I look'd around, then at my feet +Saw two so strictly join'd, that of their head +The very hairs were mingled. "Tell me ye, +Whose bosoms thus together press," said I, +"Who are ye?" At that sound their necks they bent, +And when their looks were lifted up to me, +Straightway their eyes, before all moist within, +Distill'd upon their lips, and the frost bound +The tears betwixt those orbs and held them there. +Plank unto plank hath never cramp clos'd up +So stoutly. Whence like two enraged goats +They clash'd together; them such fury seiz'd. + +And one, from whom the cold both ears had reft, +Exclaim'd, still looking downward: "Why on us +Dost speculate so long? If thou wouldst know +Who are these two, the valley, whence his wave +Bisenzio slopes, did for its master own +Their sire Alberto, and next him themselves. +They from one body issued; and throughout +Caina thou mayst search, nor find a shade +More worthy in congealment to be fix'd, +Not him, whose breast and shadow Arthur's land +At that one blow dissever'd, not Focaccia, +No not this spirit, whose o'erjutting head +Obstructs my onward view: he bore the name +Of Mascheroni: Tuscan if thou be, +Well knowest who he was: and to cut short +All further question, in my form behold +What once was Camiccione. I await +Carlino here my kinsman, whose deep guilt +Shall wash out mine." A thousand visages +Then mark'd I, which the keen and eager cold +Had shap'd into a doggish grin; whence creeps +A shiv'ring horror o'er me, at the thought +Of those frore shallows. While we journey'd on +Toward the middle, at whose point unites +All heavy substance, and I trembling went +Through that eternal chillness, I know not +If will it were or destiny, or chance, +But, passing 'midst the heads, my foot did strike +With violent blow against the face of one. + +"Wherefore dost bruise me?" weeping, he exclaim'd, +"Unless thy errand be some fresh revenge +For Montaperto, wherefore troublest me?" + +I thus: "Instructor, now await me here, +That I through him may rid me of my doubt. +Thenceforth what haste thou wilt." The teacher paus'd, +And to that shade I spake, who bitterly +Still curs'd me in his wrath. "What art thou, speak, +That railest thus on others?" He replied: +"Now who art thou, that smiting others' cheeks +Through Antenora roamest, with such force +As were past suff'rance, wert thou living still?" + +"And I am living, to thy joy perchance," +Was my reply, "if fame be dear to thee, +That with the rest I may thy name enrol." + +"The contrary of what I covet most," +Said he, "thou tender'st: hence; nor vex me more. +Ill knowest thou to flatter in this vale." + +Then seizing on his hinder scalp, I cried: +"Name thee, or not a hair shall tarry here." + +"Rend all away," he answer'd, "yet for that +I will not tell nor show thee who I am, +Though at my head thou pluck a thousand times." + +Now I had grasp'd his tresses, and stript off +More than one tuft, he barking, with his eyes +Drawn in and downward, when another cried, +"What ails thee, Bocca? Sound not loud enough +Thy chatt'ring teeth, but thou must bark outright? +What devil wrings thee?"--"Now," said I, "be dumb, +Accursed traitor! to thy shame of thee +True tidings will I bear."--"Off," he replied, +"Tell what thou list; but as thou escape from hence +To speak of him whose tongue hath been so glib, +Forget not: here he wails the Frenchman's gold. +'Him of Duera,' thou canst say, 'I mark'd, +Where the starv'd sinners pine.' If thou be ask'd +What other shade was with them, at thy side +Is Beccaria, whose red gorge distain'd +The biting axe of Florence. Farther on, +If I misdeem not, Soldanieri bides, +With Ganellon, and Tribaldello, him +Who op'd Faenza when the people slept." + +We now had left him, passing on our way, +When I beheld two spirits by the ice +Pent in one hollow, that the head of one +Was cowl unto the other; and as bread +Is raven'd up through hunger, th' uppermost +Did so apply his fangs to th' other's brain, +Where the spine joins it. Not more furiously +On Menalippus' temples Tydeus gnaw'd, +Than on that skull and on its garbage he. + +"O thou who show'st so beastly sign of hate +'Gainst him thou prey'st on, let me hear," said I +"The cause, on such condition, that if right +Warrant thy grievance, knowing who ye are, +And what the colour of his sinning was, +I may repay thee in the world above, +If that, wherewith I speak be moist so long." + + + + +CANTO XXXIII + +HIS jaws uplifting from their fell repast, +That sinner wip'd them on the hairs o' th' head, +Which he behind had mangled, then began: +"Thy will obeying, I call up afresh +Sorrow past cure, which but to think of wrings +My heart, or ere I tell on't. But if words, +That I may utter, shall prove seed to bear +Fruit of eternal infamy to him, +The traitor whom I gnaw at, thou at once +Shalt see me speak and weep. Who thou mayst be +I know not, nor how here below art come: +But Florentine thou seemest of a truth, +When I do hear thee. Know I was on earth +Count Ugolino, and th' Archbishop he +Ruggieri. Why I neighbour him so close, +Now list. That through effect of his ill thoughts +In him my trust reposing, I was ta'en +And after murder'd, need is not I tell. +What therefore thou canst not have heard, that is, +How cruel was the murder, shalt thou hear, +And know if he have wrong'd me. A small grate +Within that mew, which for my sake the name +Of famine bears, where others yet must pine, +Already through its opening sev'ral moons +Had shown me, when I slept the evil sleep, +That from the future tore the curtain off. +This one, methought, as master of the sport, +Rode forth to chase the gaunt wolf and his whelps +Unto the mountain, which forbids the sight +Of Lucca to the Pisan. With lean brachs +Inquisitive and keen, before him rang'd +Lanfranchi with Sismondi and Gualandi. +After short course the father and the sons +Seem'd tir'd and lagging, and methought I saw +The sharp tusks gore their sides. When I awoke +Before the dawn, amid their sleep I heard +My sons (for they were with me) weep and ask +For bread. Right cruel art thou, if no pang +Thou feel at thinking what my heart foretold; +And if not now, why use thy tears to flow? +Now had they waken'd; and the hour drew near +When they were wont to bring us food; the mind +Of each misgave him through his dream, and I +Heard, at its outlet underneath lock'd up +The' horrible tower: whence uttering not a word +I look'd upon the visage of my sons. +I wept not: so all stone I felt within. +They wept: and one, my little Anslem, cried: +"Thou lookest so! Father what ails thee?" Yet +I shed no tear, nor answer'd all that day +Nor the next night, until another sun +Came out upon the world. When a faint beam +Had to our doleful prison made its way, +And in four countenances I descry'd +The image of my own, on either hand +Through agony I bit, and they who thought +I did it through desire of feeding, rose +O' th' sudden, and cried, 'Father, we should grieve +Far less, if thou wouldst eat of us: thou gav'st +These weeds of miserable flesh we wear, + +'And do thou strip them off from us again.' +Then, not to make them sadder, I kept down +My spirit in stillness. That day and the next +We all were silent. Ah, obdurate earth! +Why open'dst not upon us? When we came +To the fourth day, then Geddo at my feet +Outstretch'd did fling him, crying, 'Hast no help +For me, my father!' There he died, and e'en +Plainly as thou seest me, saw I the three +Fall one by one 'twixt the fifth day and sixth: + +"Whence I betook me now grown blind to grope +Over them all, and for three days aloud +Call'd on them who were dead. Then fasting got +The mastery of grief." Thus having spoke, + +Once more upon the wretched skull his teeth +He fasten'd, like a mastiff's 'gainst the bone +Firm and unyielding. Oh thou Pisa! shame +Of all the people, who their dwelling make +In that fair region, where th' Italian voice +Is heard, since that thy neighbours are so slack +To punish, from their deep foundations rise +Capraia and Gorgona, and dam up +The mouth of Arno, that each soul in thee +May perish in the waters! What if fame +Reported that thy castles were betray'd +By Ugolino, yet no right hadst thou +To stretch his children on the rack. For them, +Brigata, Ugaccione, and the pair +Of gentle ones, of whom my song hath told, +Their tender years, thou modern Thebes! did make +Uncapable of guilt. Onward we pass'd, +Where others skarf'd in rugged folds of ice +Not on their feet were turn'd, but each revers'd. + +There very weeping suffers not to weep; +For at their eyes grief seeking passage finds +Impediment, and rolling inward turns +For increase of sharp anguish: the first tears +Hang cluster'd, and like crystal vizors show, +Under the socket brimming all the cup. + +Now though the cold had from my face dislodg'd +Each feeling, as 't were callous, yet me seem'd +Some breath of wind I felt. "Whence cometh this," +Said I, "my master? Is not here below +All vapour quench'd?"--"'Thou shalt be speedily," +He answer'd, "where thine eye shall tell thee whence +The cause descrying of this airy shower." + +Then cried out one in the chill crust who mourn'd: +"O souls so cruel! that the farthest post +Hath been assign'd you, from this face remove +The harden'd veil, that I may vent the grief +Impregnate at my heart, some little space +Ere it congeal again!" I thus replied: +"Say who thou wast, if thou wouldst have mine aid; +And if I extricate thee not, far down +As to the lowest ice may I descend!" + +"The friar Alberigo," answered he, +"Am I, who from the evil garden pluck'd +Its fruitage, and am here repaid, the date +More luscious for my fig."--"Hah!" I exclaim'd, +"Art thou too dead!"--"How in the world aloft +It fareth with my body," answer'd he, +"I am right ignorant. Such privilege +Hath Ptolomea, that ofttimes the soul +Drops hither, ere by Atropos divorc'd. +And that thou mayst wipe out more willingly +The glazed tear-drops that o'erlay mine eyes, +Know that the soul, that moment she betrays, +As I did, yields her body to a fiend +Who after moves and governs it at will, +Till all its time be rounded; headlong she +Falls to this cistern. And perchance above +Doth yet appear the body of a ghost, +Who here behind me winters. Him thou know'st, +If thou but newly art arriv'd below. +The years are many that have pass'd away, +Since to this fastness Branca Doria came." + +"Now," answer'd I, "methinks thou mockest me, +For Branca Doria never yet hath died, +But doth all natural functions of a man, +Eats, drinks, and sleeps, and putteth raiment on." + +He thus: "Not yet unto that upper foss +By th' evil talons guarded, where the pitch +Tenacious boils, had Michael Zanche reach'd, +When this one left a demon in his stead +In his own body, and of one his kin, +Who with him treachery wrought. But now put forth +Thy hand, and ope mine eyes." I op'd them not. +Ill manners were best courtesy to him. + +Ah Genoese! men perverse in every way, +With every foulness stain'd, why from the earth +Are ye not cancel'd? Such an one of yours +I with Romagna's darkest spirit found, +As for his doings even now in soul +Is in Cocytus plung'd, and yet doth seem +In body still alive upon the earth. + + + + +CANTO XXXIV + +"THE banners of Hell's Monarch do come forth +Towards us; therefore look," so spake my guide, +"If thou discern him." As, when breathes a cloud +Heavy and dense, or when the shades of night +Fall on our hemisphere, seems view'd from far +A windmill, which the blast stirs briskly round, +Such was the fabric then methought I saw, + +To shield me from the wind, forthwith I drew +Behind my guide: no covert else was there. + +Now came I (and with fear I bid my strain +Record the marvel) where the souls were all +Whelm'd underneath, transparent, as through glass +Pellucid the frail stem. Some prone were laid, +Others stood upright, this upon the soles, +That on his head, a third with face to feet +Arch'd like a bow. When to the point we came, +Whereat my guide was pleas'd that I should see +The creature eminent in beauty once, +He from before me stepp'd and made me pause. + +"Lo!" he exclaim'd, "lo Dis! and lo the place, +Where thou hast need to arm thy heart with strength." + +How frozen and how faint I then became, +Ask me not, reader! for I write it not, +Since words would fail to tell thee of my state. +I was not dead nor living. Think thyself +If quick conception work in thee at all, +How I did feel. That emperor, who sways +The realm of sorrow, at mid breast from th' ice +Stood forth; and I in stature am more like +A giant, than the giants are in his arms. +Mark now how great that whole must be, which suits +With such a part. If he were beautiful +As he is hideous now, and yet did dare +To scowl upon his Maker, well from him +May all our mis'ry flow. Oh what a sight! +How passing strange it seem'd, when I did spy +Upon his head three faces: one in front +Of hue vermilion, th' other two with this +Midway each shoulder join'd and at the crest; +The right 'twixt wan and yellow seem'd: the left +To look on, such as come from whence old Nile +Stoops to the lowlands. Under each shot forth +Two mighty wings, enormous as became +A bird so vast. Sails never such I saw +Outstretch'd on the wide sea. No plumes had they, +But were in texture like a bat, and these +He flapp'd i' th' air, that from him issued still +Three winds, wherewith Cocytus to its depth +Was frozen. At six eyes he wept: the tears +Adown three chins distill'd with bloody foam. +At every mouth his teeth a sinner champ'd +Bruis'd as with pond'rous engine, so that three +Were in this guise tormented. But far more +Than from that gnawing, was the foremost pang'd +By the fierce rending, whence ofttimes the back +Was stript of all its skin. "That upper spirit, +Who hath worse punishment," so spake my guide, +"Is Judas, he that hath his head within +And plies the feet without. Of th' other two, +Whose heads are under, from the murky jaw +Who hangs, is Brutus: lo! how he doth writhe +And speaks not! Th' other Cassius, that appears +So large of limb. But night now re-ascends, +And it is time for parting. All is seen." + +I clipp'd him round the neck, for so he bade; +And noting time and place, he, when the wings +Enough were op'd, caught fast the shaggy sides, +And down from pile to pile descending stepp'd +Between the thick fell and the jagged ice. + +Soon as he reach'd the point, whereat the thigh +Upon the swelling of the haunches turns, +My leader there with pain and struggling hard +Turn'd round his head, where his feet stood before, +And grappled at the fell, as one who mounts, +That into hell methought we turn'd again. + +"Expect that by such stairs as these," thus spake +The teacher, panting like a man forespent, +"We must depart from evil so extreme." +Then at a rocky opening issued forth, +And plac'd me on a brink to sit, next join'd +With wary step my side. I rais'd mine eyes, +Believing that I Lucifer should see +Where he was lately left, but saw him now +With legs held upward. Let the grosser sort, +Who see not what the point was I had pass'd, +Bethink them if sore toil oppress'd me then. + +"Arise," my master cried, "upon thy feet. +The way is long, and much uncouth the road; +And now within one hour and half of noon +The sun returns." It was no palace-hall +Lofty and luminous wherein we stood, +But natural dungeon where ill footing was +And scant supply of light. "Ere from th' abyss +I sep'rate," thus when risen I began, +"My guide! vouchsafe few words to set me free +From error's thralldom. Where is now the ice? +How standeth he in posture thus revers'd? +And how from eve to morn in space so brief +Hath the sun made his transit?" He in few +Thus answering spake: "Thou deemest thou art still +On th' other side the centre, where I grasp'd +Th' abhorred worm, that boreth through the world. +Thou wast on th' other side, so long as I +Descended; when I turn'd, thou didst o'erpass +That point, to which from ev'ry part is dragg'd +All heavy substance. Thou art now arriv'd +Under the hemisphere opposed to that, +Which the great continent doth overspread, +And underneath whose canopy expir'd +The Man, that was born sinless, and so liv'd. +Thy feet are planted on the smallest sphere, +Whose other aspect is Judecca. Morn +Here rises, when there evening sets: and he, +Whose shaggy pile was scal'd, yet standeth fix'd, +As at the first. On this part he fell down +From heav'n; and th' earth, here prominent before, +Through fear of him did veil her with the sea, +And to our hemisphere retir'd. Perchance +To shun him was the vacant space left here +By what of firm land on this side appears, +That sprang aloof." There is a place beneath, +From Belzebub as distant, as extends +The vaulted tomb, discover'd not by sight, +But by the sound of brooklet, that descends +This way along the hollow of a rock, +Which, as it winds with no precipitous course, +The wave hath eaten. By that hidden way +My guide and I did enter, to return +To the fair world: and heedless of repose +We climbed, he first, I following his steps, +Till on our view the beautiful lights of heav'n +Dawn'd through a circular opening in the cave: +Thus issuing we again beheld the stars. + + + + + +End of Project Gutenberg's The Divine Comedy, Complete, by Dante Alighieri + +*** END OF THIS PROJECT GUTENBERG EBOOK THE DIVINE COMEDY, COMPLETE *** + +***** This file should be named 8800.txt or 8800.zip ***** +This and all associated files of various formats will be found in: + http://www.gutenberg.org/8/8/0/8800/ + +Produced by David Widger + +Updated editions will replace the previous one--the old editions +will be renamed. + +Creating the works from public domain print editions means that no +one owns a United States copyright in these works, so the Foundation +(and you!) can copy and distribute it in the United States without +permission and without paying copyright royalties. Special rules, +set forth in the General Terms of Use part of this license, apply to +copying and distributing Project Gutenberg-tm electronic works to +protect the PROJECT GUTENBERG-tm concept and trademark. Project +Gutenberg is a registered trademark, and may not be used if you +charge for the eBooks, unless you receive specific permission. If you +do not charge anything for copies of this eBook, complying with the +rules is very easy. You may use this eBook for nearly any purpose +such as creation of derivative works, reports, performances and +research. They may be modified and printed and given away--you may do +practically ANYTHING with public domain eBooks. Redistribution is +subject to the trademark license, especially commercial +redistribution. + + + +*** START: FULL LICENSE *** + +THE FULL PROJECT GUTENBERG LICENSE +PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK + +To protect the Project Gutenberg-tm mission of promoting the free +distribution of electronic works, by using or distributing this work +(or any other work associated in any way with the phrase "Project +Gutenberg"), you agree to comply with all the terms of the Full Project +Gutenberg-tm License (available with this file or online at +http://gutenberg.org/license). + + +Section 1. General Terms of Use and Redistributing Project Gutenberg-tm +electronic works + +1.A. By reading or using any part of this Project Gutenberg-tm +electronic work, you indicate that you have read, understand, agree to +and accept all the terms of this license and intellectual property +(trademark/copyright) agreement. If you do not agree to abide by all +the terms of this agreement, you must cease using and return or destroy +all copies of Project Gutenberg-tm electronic works in your possession. +If you paid a fee for obtaining a copy of or access to a Project +Gutenberg-tm electronic work and you do not agree to be bound by the +terms of this agreement, you may obtain a refund from the person or +entity to whom you paid the fee as set forth in paragraph 1.E.8. + +1.B. "Project Gutenberg" is a registered trademark. It may only be +used on or associated in any way with an electronic work by people who +agree to be bound by the terms of this agreement. There are a few +things that you can do with most Project Gutenberg-tm electronic works +even without complying with the full terms of this agreement. See +paragraph 1.C below. There are a lot of things you can do with Project +Gutenberg-tm electronic works if you follow the terms of this agreement +and help preserve free future access to Project Gutenberg-tm electronic +works. See paragraph 1.E below. + +1.C. The Project Gutenberg Literary Archive Foundation ("the Foundation" +or PGLAF), owns a compilation copyright in the collection of Project +Gutenberg-tm electronic works. Nearly all the individual works in the +collection are in the public domain in the United States. If an +individual work is in the public domain in the United States and you are +located in the United States, we do not claim a right to prevent you from +copying, distributing, performing, displaying or creating derivative +works based on the work as long as all references to Project Gutenberg +are removed. Of course, we hope that you will support the Project +Gutenberg-tm mission of promoting free access to electronic works by +freely sharing Project Gutenberg-tm works in compliance with the terms of +this agreement for keeping the Project Gutenberg-tm name associated with +the work. You can easily comply with the terms of this agreement by +keeping this work in the same format with its attached full Project +Gutenberg-tm License when you share it without charge with others. + +1.D. The copyright laws of the place where you are located also govern +what you can do with this work. Copyright laws in most countries are in +a constant state of change. If you are outside the United States, check +the laws of your country in addition to the terms of this agreement +before downloading, copying, displaying, performing, distributing or +creating derivative works based on this work or any other Project +Gutenberg-tm work. The Foundation makes no representations concerning +the copyright status of any work in any country outside the United +States. + +1.E. Unless you have removed all references to Project Gutenberg: + +1.E.1. The following sentence, with active links to, or other immediate +access to, the full Project Gutenberg-tm License must appear prominently +whenever any copy of a Project Gutenberg-tm work (any work on which the +phrase "Project Gutenberg" appears, or with which the phrase "Project +Gutenberg" is associated) is accessed, displayed, performed, viewed, +copied or distributed: + +This eBook is for the use of anyone anywhere at no cost and with +almost no restrictions whatsoever. You may copy it, give it away or +re-use it under the terms of the Project Gutenberg License included +with this eBook or online at www.gutenberg.org + +1.E.2. If an individual Project Gutenberg-tm electronic work is derived +from the public domain (does not contain a notice indicating that it is +posted with permission of the copyright holder), the work can be copied +and distributed to anyone in the United States without paying any fees +or charges. If you are redistributing or providing access to a work +with the phrase "Project Gutenberg" associated with or appearing on the +work, you must comply either with the requirements of paragraphs 1.E.1 +through 1.E.7 or obtain permission for the use of the work and the +Project Gutenberg-tm trademark as set forth in paragraphs 1.E.8 or +1.E.9. + +1.E.3. If an individual Project Gutenberg-tm electronic work is posted +with the permission of the copyright holder, your use and distribution +must comply with both paragraphs 1.E.1 through 1.E.7 and any additional +terms imposed by the copyright holder. Additional terms will be linked +to the Project Gutenberg-tm License for all works posted with the +permission of the copyright holder found at the beginning of this work. + +1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm +License terms from this work, or any files containing a part of this +work or any other work associated with Project Gutenberg-tm. + +1.E.5. Do not copy, display, perform, distribute or redistribute this +electronic work, or any part of this electronic work, without +prominently displaying the sentence set forth in paragraph 1.E.1 with +active links or immediate access to the full terms of the Project +Gutenberg-tm License. + +1.E.6. You may convert to and distribute this work in any binary, +compressed, marked up, nonproprietary or proprietary form, including any +word processing or hypertext form. However, if you provide access to or +distribute copies of a Project Gutenberg-tm work in a format other than +"Plain Vanilla ASCII" or other format used in the official version +posted on the official Project Gutenberg-tm web site (www.gutenberg.org), +you must, at no additional cost, fee or expense to the user, provide a +copy, a means of exporting a copy, or a means of obtaining a copy upon +request, of the work in its original "Plain Vanilla ASCII" or other +form. Any alternate format must include the full Project Gutenberg-tm +License as specified in paragraph 1.E.1. + +1.E.7. Do not charge a fee for access to, viewing, displaying, +performing, copying or distributing any Project Gutenberg-tm works +unless you comply with paragraph 1.E.8 or 1.E.9. + +1.E.8. You may charge a reasonable fee for copies of or providing +access to or distributing Project Gutenberg-tm electronic works provided +that + +- You pay a royalty fee of 20% of the gross profits you derive from + the use of Project Gutenberg-tm works calculated using the method + you already use to calculate your applicable taxes. The fee is + owed to the owner of the Project Gutenberg-tm trademark, but he + has agreed to donate royalties under this paragraph to the + Project Gutenberg Literary Archive Foundation. Royalty payments + must be paid within 60 days following each date on which you + prepare (or are legally required to prepare) your periodic tax + returns. Royalty payments should be clearly marked as such and + sent to the Project Gutenberg Literary Archive Foundation at the + address specified in Section 4, "Information about donations to + the Project Gutenberg Literary Archive Foundation." + +- You provide a full refund of any money paid by a user who notifies + you in writing (or by e-mail) within 30 days of receipt that s/he + does not agree to the terms of the full Project Gutenberg-tm + License. You must require such a user to return or + destroy all copies of the works possessed in a physical medium + and discontinue all use of and all access to other copies of + Project Gutenberg-tm works. + +- You provide, in accordance with paragraph 1.F.3, a full refund of any + money paid for a work or a replacement copy, if a defect in the + electronic work is discovered and reported to you within 90 days + of receipt of the work. + +- You comply with all other terms of this agreement for free + distribution of Project Gutenberg-tm works. + +1.E.9. If you wish to charge a fee or distribute a Project Gutenberg-tm +electronic work or group of works on different terms than are set +forth in this agreement, you must obtain permission in writing from +both the Project Gutenberg Literary Archive Foundation and Michael +Hart, the owner of the Project Gutenberg-tm trademark. Contact the +Foundation as set forth in Section 3 below. + +1.F. + +1.F.1. Project Gutenberg volunteers and employees expend considerable +effort to identify, do copyright research on, transcribe and proofread +public domain works in creating the Project Gutenberg-tm +collection. Despite these efforts, Project Gutenberg-tm electronic +works, and the medium on which they may be stored, may contain +"Defects," such as, but not limited to, incomplete, inaccurate or +corrupt data, transcription errors, a copyright or other intellectual +property infringement, a defective or damaged disk or other medium, a +computer virus, or computer codes that damage or cannot be read by +your equipment. + +1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the "Right +of Replacement or Refund" described in paragraph 1.F.3, the Project +Gutenberg Literary Archive Foundation, the owner of the Project +Gutenberg-tm trademark, and any other party distributing a Project +Gutenberg-tm electronic work under this agreement, disclaim all +liability to you for damages, costs and expenses, including legal +fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT +LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE +PROVIDED IN PARAGRAPH F3. YOU AGREE THAT THE FOUNDATION, THE +TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE +LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR +INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH +DAMAGE. + +1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a +defect in this electronic work within 90 days of receiving it, you can +receive a refund of the money (if any) you paid for it by sending a +written explanation to the person you received the work from. If you +received the work on a physical medium, you must return the medium with +your written explanation. The person or entity that provided you with +the defective work may elect to provide a replacement copy in lieu of a +refund. If you received the work electronically, the person or entity +providing it to you may choose to give you a second opportunity to +receive the work electronically in lieu of a refund. If the second copy +is also defective, you may demand a refund in writing without further +opportunities to fix the problem. + +1.F.4. Except for the limited right of replacement or refund set forth +in paragraph 1.F.3, this work is provided to you 'AS-IS' WITH NO OTHER +WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR ANY PURPOSE. + +1.F.5. Some states do not allow disclaimers of certain implied +warranties or the exclusion or limitation of certain types of damages. +If any disclaimer or limitation set forth in this agreement violates the +law of the state applicable to this agreement, the agreement shall be +interpreted to make the maximum disclaimer or limitation permitted by +the applicable state law. The invalidity or unenforceability of any +provision of this agreement shall not void the remaining provisions. + +1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the +trademark owner, any agent or employee of the Foundation, anyone +providing copies of Project Gutenberg-tm electronic works in accordance +with this agreement, and any volunteers associated with the production, +promotion and distribution of Project Gutenberg-tm electronic works, +harmless from all liability, costs and expenses, including legal fees, +that arise directly or indirectly from any of the following which you do +or cause to occur: (a) distribution of this or any Project Gutenberg-tm +work, (b) alteration, modification, or additions or deletions to any +Project Gutenberg-tm work, and (c) any Defect you cause. + + +Section 2. Information about the Mission of Project Gutenberg-tm + +Project Gutenberg-tm is synonymous with the free distribution of +electronic works in formats readable by the widest variety of computers +including obsolete, old, middle-aged and new computers. It exists +because of the efforts of hundreds of volunteers and donations from +people in all walks of life. + +Volunteers and financial support to provide volunteers with the +assistance they need, are critical to reaching Project Gutenberg-tm's +goals and ensuring that the Project Gutenberg-tm collection will +remain freely available for generations to come. In 2001, the Project +Gutenberg Literary Archive Foundation was created to provide a secure +and permanent future for Project Gutenberg-tm and future generations. +To learn more about the Project Gutenberg Literary Archive Foundation +and how your efforts and donations can help, see Sections 3 and 4 +and the Foundation web page at http://www.pglaf.org. + + +Section 3. Information about the Project Gutenberg Literary Archive +Foundation + +The Project Gutenberg Literary Archive Foundation is a non profit +501(c)(3) educational corporation organized under the laws of the +state of Mississippi and granted tax exempt status by the Internal +Revenue Service. The Foundation's EIN or federal tax identification +number is 64-6221541. Its 501(c)(3) letter is posted at +http://pglaf.org/fundraising. Contributions to the Project Gutenberg +Literary Archive Foundation are tax deductible to the full extent +permitted by U.S. federal laws and your state's laws. + +The Foundation's principal office is located at 4557 Melan Dr. S. +Fairbanks, AK, 99712., but its volunteers and employees are scattered +throughout numerous locations. Its business office is located at +809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887, email +business@pglaf.org. Email contact links and up to date contact +information can be found at the Foundation's web site and official +page at http://pglaf.org + +For additional contact information: + Dr. Gregory B. Newby + Chief Executive and Director + gbnewby@pglaf.org + + +Section 4. Information about Donations to the Project Gutenberg +Literary Archive Foundation + +Project Gutenberg-tm depends upon and cannot survive without wide +spread public support and donations to carry out its mission of +increasing the number of public domain and licensed works that can be +freely distributed in machine readable form accessible by the widest +array of equipment including outdated equipment. Many small donations +($1 to $5,000) are particularly important to maintaining tax exempt +status with the IRS. + +The Foundation is committed to complying with the laws regulating +charities and charitable donations in all 50 states of the United +States. Compliance requirements are not uniform and it takes a +considerable effort, much paperwork and many fees to meet and keep up +with these requirements. We do not solicit donations in locations +where we have not received written confirmation of compliance. To +SEND DONATIONS or determine the status of compliance for any +particular state visit http://pglaf.org + +While we cannot and do not solicit contributions from states where we +have not met the solicitation requirements, we know of no prohibition +against accepting unsolicited donations from donors in such states who +approach us with offers to donate. + +International donations are gratefully accepted, but we cannot make +any statements concerning tax treatment of donations received from +outside the United States. U.S. laws alone swamp our small staff. + +Please check the Project Gutenberg Web pages for current donation +methods and addresses. Donations are accepted in a number of other +ways including checks, online payments and credit card donations. +To donate, please visit: http://pglaf.org/donate + + +Section 5. General Information About Project Gutenberg-tm electronic +works. + +Professor Michael S. Hart is the originator of the Project Gutenberg-tm +concept of a library of electronic works that could be freely shared +with anyone. For thirty years, he produced and distributed Project +Gutenberg-tm eBooks with only a loose network of volunteer support. + + +Project Gutenberg-tm eBooks are often created from several printed +editions, all of which are confirmed as Public Domain in the U.S. +unless a copyright notice is included. Thus, we do not necessarily +keep eBooks in compliance with any particular paper edition. + + +Most people start at our Web site which has the main PG search facility: + + http://www.gutenberg.org + +This Web site includes information about Project Gutenberg-tm, +including how to make donations to the Project Gutenberg Literary +Archive Foundation, how to help produce our new eBooks, and how to +subscribe to our email newsletter to hear about new eBooks. diff --git a/example/preprocess.pl b/example/preprocess.pl new file mode 100755 index 0000000..31432dd --- /dev/null +++ b/example/preprocess.pl @@ -0,0 +1,16 @@ +#!/usr/bin/env perl + +while (<>) { + next if (/^\s*$/); + next if (/^CANTO /); + + s/^/ /; s/$/ /; + + # punctuation + s/([,.!?:;\(\)"]|-+)/ $1 /g; + # lowercase + tr/A-Z/a-z/; + # single quotes are too much trouble + + print(join(" ", split) . "\n"); +} diff --git a/example/train_ngram.sh b/example/train_ngram.sh new file mode 100755 index 0000000..48b992d --- /dev/null +++ b/example/train_ngram.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +ROOT=$(cd $(dirname $0) && pwd)/.. + +TMPDIR=/tmp/train_ngram.$$ + +if [ $# -eq 3 ]; then + WORKDIR=$3 +elif [ $# -eq 2 ]; then + WORKDIR=$TMPDIR +else + echo "usage: $0 []" + exit 1 +fi + +INFILE=$1 +OUTFILE=$2 +PREFIX=$(basename $OUTFILE) + +EPOCHS=10 +VOCAB_SIZE=5000 +NGRAM_SIZE=3 + +mkdir -p $WORKDIR + +$ROOT/src/prepareNeuralLM --train_text $INFILE --ngram_size $NGRAM_SIZE --vocab_size $VOCAB_SIZE --validation_size 500 --write_words_file $WORKDIR/words --train_file $WORKDIR/train.ngrams --validation_file $WORKDIR/validation.ngrams || exit 1 + +$ROOT/src/trainNeuralNetwork --train_file $WORKDIR/train.ngrams --validation_file $WORKDIR/validation.ngrams --num_epochs $EPOCHS --words_file $WORKDIR/words --model_prefix $WORKDIR/$PREFIX --learning_rate 1 --minibatch_size 8 || exit 1 + +cp $WORKDIR/$PREFIX.$(($EPOCHS)) $OUTFILE || exit 1 + +$ROOT/src/testNeuralNetwork --test_file $WORKDIR/train.ngrams --model_file $OUTFILE || exit 1 + +$ROOT/src/testNeuralLM --test_file $WORKDIR/train.ngrams --model_file $OUTFILE --numberize 0 --ngramize 0 --add_start_stop 0 > $WORKDIR/train.ngrams.scores || exit 1 + +# $ROOT/src/testNeuralLM --test_file $INFILE --model_file $OUTFILE --numberize 1 --ngramize 1 --add_start_stop 1 > $WORKDIR/inferno.testNeuralLM.scores || exit 1 + +rm -rf $TMPDIR diff --git a/python/nplm.py b/python/nplm.py new file mode 100755 index 0000000..2564bf8 --- /dev/null +++ b/python/nplm.py @@ -0,0 +1,188 @@ +import numpy +import numpy.random +import scipy.sparse + +def diag_dot(a, b, out=None): + """Input: a and b are arrays. + Output: a column vector of the dot product of the rows of a and respective + columns of b, in other words, diag(a.dot(b)).""" + if out is None: + out = numpy.empty((a.shape[0], 1)) + numpy.einsum('ji,ij->j', a, b, out=out[:,0]) + return out + +class NeuralLM(object): + def __init__(self, ngram_size, n_vocab, input_embedding_dimension, n_hidden, output_embedding_dimension): + self.n_vocab = n_vocab + self.index_to_word = [] + self.word_to_index = {} + + self.ngram_size = ngram_size + self.input_embedding_dimension = input_embedding_dimension + self.n_hidden = n_hidden + self.output_embedding_dimension = output_embedding_dimension + + self.input_embeddings = numpy.zeros((n_vocab, input_embedding_dimension)) + self.hidden1_weights = numpy.zeros((n_hidden, (ngram_size-1)*input_embedding_dimension)) + self.hidden2_weights = numpy.zeros((output_embedding_dimension, n_hidden)) + self.output_weights = numpy.zeros((n_vocab, output_embedding_dimension)) + self.output_biases = numpy.zeros((n_vocab, 1)) + + def initialize(self, r): + def uniform(m): + m[:,:] = numpy.random.uniform(-r, r, m.shape) + uniform(self.input_embeddings) + uniform(self.hidden1_weights) + uniform(self.hidden2_weights) + uniform(self.output_weights) + uniform(self.output_biases) + + def forward_prop(self, inputs, output=None, normalize=True): + u = numpy.bmat([[self.input_embeddings.T * ui] for ui in inputs]) + h1 = numpy.maximum(0., self.hidden1_weights * u) + h2 = numpy.maximum(0., self.hidden2_weights * h1) + + if output is None: + o = self.output_weights * h2 + self.output_biases + else: + # Inefficient version: + #o = diag_dot(output.T, (self.output_weights * h2 + self.output_biases)) + #o = output.multiply(self.output_weights * h2 + self.output_biases) + + # Since output is sparse, distributing multiplication by output + # is much more efficient: + + o = diag_dot(output.T * self.output_weights, h2) + output.T * self.output_biases + return o + + def backward_prop(self, g_output): + pass + + def to_file(self, outfile): + + def write_matrix(m): + for i in xrange(m.shape[0]): + outfile.write("\t".join(map(str, m[i]))) + outfile.write("\n") + outfile.write("\n") + + def write_vector(m): + for i in xrange(m.shape[0]): + outfile.write(str(m[i])) + outfile.write("\n") + outfile.write("\n") + + outfile.write("\\config\n") + outfile.write("version 1\n") + outfile.write("ngram_size %d\n" % self.ngram_size) + outfile.write("n_vocab %d\n" % self.n_vocab) + outfile.write("input_embedding_dimension %d\n" % self.input_embedding_dimension) + outfile.write("output_embedding_dimension %d\n" % self.output_embedding_dimension) + outfile.write("n_hidden %d\n" % self.n_hidden) + outfile.write("\n") + + outfile.write("\\vocab\n") + for word in self.index_to_word: + outfile.write(word + "\n") + outfile.write("\n") + + outfile.write("\\input_embeddings\n") + write_matrix(self.input_embeddings) + + outfile.write("\\hidden_weights 1\n") + write_matrix(self.hidden1_weights) + + outfile.write("\\hidden_weights 2\n") + write_matrix(self.hidden2_weights) + + outfile.write("\\output_weights\n") + write_matrix(self.output_weights) + + outfile.write("\\output_biases\n") + write_matrix(self.output_biases) + + outfile.write("\\end\n") + + @staticmethod + def from_file(infile): + """Create a NeuralLM from a text file.""" + + # Helper functions + def read_sections(infile): + while True: + line = infile.next().strip() + if line == "\\end": + break + elif line.startswith('\\'): + yield line, read_section(infile) + + def read_section(infile): + while True: + line = infile.next().strip() + if line == "": + break + else: + yield line + + def read_matrix(lines, m, n, out=None): + if out is None: + out = numpy.zeros((m, n)) + i = 0 + for line in lines: + row = numpy.array(map(float, line.split())) + if len(row) != n: + raise Exception("wrong number of columns (expected %d, found %d)" % (n, len(row))) + if i >= m: + raise Exception("wrong number of rows (expected %d, found more)" % m) + out[i,:] = row + i += 1 + if i < m: + raise Exception("wrong number of rows (expected %d, found %d)" % (m, i)) + return out + + if isinstance(infile, str): + infile = open(infile) + + for section, lines in read_sections(infile): + if section == "\\config": + config = {} + for line in lines: + key, value = line.split() + config[key] = value + + m = NeuralLM(ngram_size=int(config['ngram_size']), + n_vocab=int(config['n_vocab']), + input_embedding_dimension=int(config['input_embedding_dimension']), + n_hidden=int(config['n_hidden']), + output_embedding_dimension=int(config['output_embedding_dimension'])) + + elif section == "\\vocab": + for line in lines: + m.index_to_word.append(line) + m.word_to_index = dict((w,i) for (i,w) in enumerate(m.index_to_word)) + + elif section == "\\input_embeddings": + read_matrix(lines, m.n_vocab, m.input_embedding_dimension, out=m.input_embeddings) + elif section == "\\hidden_weights 1": + read_matrix(lines, m.n_hidden, (m.ngram_size-1)*m.input_embedding_dimension, out=m.hidden1_weights) + elif section == "\\hidden_weights 2": + read_matrix(lines, m.output_embedding_dimension, m.n_hidden, out=m.hidden2_weights) + elif section == "\\output_weights": + read_matrix(lines, m.n_vocab, m.output_embedding_dimension, out=m.output_weights) + elif section == "\\output_biases": + read_matrix(lines, m.n_vocab, 1, out=m.output_biases) + return m + + def make_data(self, ngrams): + """Takes a list of n-grams of words (as ints), + and converts into a list of n sparse arrays.""" + rows = [[] for j in xrange(self.ngram_size)] + cols = [[] for j in xrange(self.ngram_size)] + values = [[] for j in xrange(self.ngram_size)] + for i, ngram in enumerate(ngrams): + for j, w in enumerate(ngram): + rows[j].append(w) + cols[j].append(i) + values[j].append(1) + data = [scipy.sparse.csc_matrix((values[j], (rows[j], cols[j])), shape=(self.n_vocab, len(ngrams))) for j in xrange(self.ngram_size)] + return data diff --git a/python/prepareNeuralLM.py b/python/prepareNeuralLM.py new file mode 100755 index 0000000..3c8fec9 --- /dev/null +++ b/python/prepareNeuralLM.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python + +import vocab +import collections + +start = "" +stop = "" +null = "" + +def ngrams(words, n): + for i in xrange(n-1, len(words)): + yield words[i-n+1:i+1] + +if __name__ == "__main__": + import sys + import fileinput + import argparse + + parser = argparse.ArgumentParser(description='Preprocess training data for n-gram language model.') + parser.add_argument('--train_text', metavar='file', dest='train_text', help='training text file') + parser.add_argument('--validation_text', metavar='file', dest='validation_text', help='validation text file (overrides --validation_size)') + parser.add_argument('--ngram_size', metavar='n', dest='ngram_size', type=int, default=3, help='size of n-grams') + parser.add_argument('--n_vocab', metavar='V', dest='n_vocab', type=int, help='number of word types') + parser.add_argument('--words_file', metavar='file', dest='words_file', help='make vocabulary') + parser.add_argument('--train_file', metavar='file', dest='train_file', default='-', help='make training file') + parser.add_argument('--validation_file', metavar='file', dest='validation_file', help='make training file') + parser.add_argument('--validation_size', metavar='m', dest='validation_size', type=int, default=0, help="select m lines for validation") + args = parser.parse_args() + + n = args.ngram_size + train_data = [] + validation_data = [] + + for li, line in enumerate(file(args.train_text)): + words = line.split() + words = [start] * (n-1) + words + [stop] + train_data.append(words) + + if args.validation_text: + for li, line in enumerate(file(args.validation_text)): + words = line.split() + words = [start] * (n-1) + words + [stop] + validation_data.append(words) + else: + if args.validation_size > 0: + validation_data = train_data[-args.validation_size:] + train_data[-args.validation_size:] = [] + + c = collections.Counter() + for words in train_data: + c.update(words[n-1:]) + + v = vocab.Vocab() + v.insert_word(start) + v.insert_word(stop) + v.insert_word(null) + inserted = v.from_counts(c, args.n_vocab) + if inserted == len(c): + sys.stderr.write("warning: only %d words types in training data; set --n_vocab lower to learn unknown word\n"); + + if args.words_file: + with open(args.words_file, "w") as outfile: + for w in v.words: + outfile.write("%s\n" % (w,)) + + if args.train_file == '-': + outfile = sys.stdout + else: + outfile = open(args.train_file, 'w') + for words in train_data: + for ngram in ngrams(words, n): + outfile.write(" ".join(str(v.lookup_word(w)) for w in ngram) + "\n") + if outfile is not sys.stdout: + outfile.close() + + if args.validation_file: + with open(args.validation_file, 'w') as outfile: + for words in validation_data: + for ngram in ngrams(words, n): + outfile.write(" ".join(str(v.lookup_word(w)) for w in ngram) + "\n") diff --git a/python/testNeuralLM.py b/python/testNeuralLM.py new file mode 100755 index 0000000..ed79220 --- /dev/null +++ b/python/testNeuralLM.py @@ -0,0 +1,25 @@ +import nplm + +if __name__ == "__main__": + import sys + import fileinput + import argparse + + parser = argparse.ArgumentParser(description='Score sentences using n-gram language model.') + parser.add_argument('--test_file', metavar='file', dest='test_file', help='test text file') + parser.add_argument('--model_file', metavar='file', dest='model_file', help='model file') + args = parser.parse_args() + + m = nplm.NeuralLM.from_file(args.model_file) + n = m.ngram_size + for line in fileinput.input(args.test_file): + words = line.split() + if len(words) < n: continue + unk = m.word_to_index[''] + words = [''] * (n-1) + words + [''] + words = [m.word_to_index.get(w, unk) for w in words] + ngrams = [] + for i in xrange(n-1, len(words)): + ngrams.append(words[i-n+1:i+1]) + ngrams = m.make_data(ngrams) + print m.forward_prop(ngrams[:-1], output=ngrams[-1])[:,0] diff --git a/python/vocab.py b/python/vocab.py new file mode 100755 index 0000000..658051f --- /dev/null +++ b/python/vocab.py @@ -0,0 +1,33 @@ +import heapq +import operator +import sys + +class Vocab(object): + def __init__(self, words=(), unk=""): + self.words = [] + self.word_index = {} + + self.insert_word(unk) + self.unk = self.word_index[unk] + for word in words: + self.insert_word(word) + + def from_counts(self, counts, size, unk=""): + # Keep only most frequent words + q = [(-count, word) for (word, count) in counts.iteritems()] + heapq.heapify(q) + inserted = 0 + while len(self.words) < size and len(q) > 0: + _, word = heapq.heappop(q) + inserted += 1 + if word not in self.word_index: + self.insert_word(word) + return inserted + + def insert_word(self, word): + i = len(self.words) + self.words.append(word) + self.word_index[word] = i + + def lookup_word(self, word): + return self.word_index.get(word, self.unk) diff --git a/src/Activation_function.h b/src/Activation_function.h new file mode 100644 index 0000000..eacba14 --- /dev/null +++ b/src/Activation_function.h @@ -0,0 +1,119 @@ +#ifndef ACTIVATION_FUNCTION_H +#define ACTIVATION_FUNCTION_H + +#include +#include +#include + +#include "util.h" + +namespace nplm +{ + +// is this cheating? +using Eigen::Matrix; +using Eigen::MatrixBase; + +enum activation_function_type { Tanh, HardTanh, Rectifier, Identity, InvalidFunction }; + +inline activation_function_type string_to_activation_function (const std::string &s) +{ + if (s == "identity") + return Identity; + else if (s == "rectifier") + return Rectifier; + else if (s == "tanh") + return Tanh; + else if (s == "hardtanh") + return HardTanh; + else + return InvalidFunction; +} + +inline std::string activation_function_to_string (activation_function_type f) +{ + if (f == Identity) + return "identity"; + else if (f == Rectifier) + return "rectifier"; + else if (f == Tanh) + return "tanh"; + else if (f == HardTanh) + return "hardtanh"; +} + +struct hardtanh_functor { + double operator() (double x) const { if (x < -1.) return -1.; else if (x > 1.) return 1.; else return x; } +}; + +struct dhardtanh_functor { + double operator() (double x) const { return x > -1. && x < 1. ? 1. : 0.; } +}; + +struct tanh_functor { + double operator() (double x) const { return std::tanh(x); } +}; + +struct dtanh_functor { + double operator() (double x) const { return 1-x*x; } +}; + +struct rectifier_functor { + double operator() (double x) const { return std::max(x, 0.); } +}; + +struct drectifier_functor { + double operator() (double x) const { return x > 0. ? 1. : 0.; } +}; + +class Activation_function +{ + private: + int size; + activation_function_type f; + + public: + Activation_function() : size(0), f(Rectifier) { } + + void resize(int size) { this->size = size; } + void set_activation_function(activation_function_type f) { this->f = f; } + + template + void initialize(Engine &engine, bool init_normal, double init_range) { } + + int n_inputs () const { return size; } + int n_outputs () const { return size; } + + template + void fProp(const MatrixBase &input, const MatrixBase &output) const + { + UNCONST(DerivedOut, output, my_output); + + switch (f) + { + case Identity: my_output = input; break; + case Rectifier: my_output = input.unaryExpr(rectifier_functor()); break; + case Tanh: my_output = input.unaryExpr(tanh_functor()); break; + case HardTanh: my_output = input.unaryExpr(hardtanh_functor()); break; + } + } + + template + void bProp(const MatrixBase &input, MatrixBase &output, + const MatrixBase &finput, const MatrixBase &foutput) const + { + UNCONST(DerivedGIn, output, my_output); + + switch (f) + { + case Identity: my_output = input; break; + case Rectifier: my_output = finput.array().unaryExpr(drectifier_functor()) * input.array(); break; + case Tanh: my_output = foutput.array().unaryExpr(tanh_functor()) * input.array(); break; + case HardTanh: my_output = finput.array().unaryExpr(hardtanh_functor()) * input.array(); break; + } + } +}; + +} // namespace nplm + +#endif diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..3b34fe9 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,175 @@ +### Compilation options. + +# C++ compiler. Tested with g++ and Intel icpc. +CXX=g++ +#CXX=icpc + +# Compiler options. Note that -DEIGEN_NO_DEBUG is essential for good performance! +#CFLAGS=-g +CFLAGS=-O3 -DEIGEN_NO_DEBUG -DNDEBUG + +# Architecture. Set to x86_64 or i686 to override. +ARCH:=$(shell uname -m) +# Operating system. Set to override (the only option that makes any difference is Darwin). +OS:=$(shell uname -s) + +# To build static binaries, uncomment the line below: +#STATIC=1 + +### Required libraries. You must install these prior to building. + +# Set this to the root directory of Boost (should have a subdirectory named boost): +BOOST=/usr/usc/boost/1.51.0 +#BOOST=/usr +#BOOST=/opt/local +# Where to find Boost header files +BOOST_INC=$(BOOST)/include + +# Set this to the root directory of Eigen (should have a subdirectory named Eigen): +EIGEN=../3rdparty/eigen + +### Optional libraries. + +# To disable multithreading, comment out the line below: +OMP=1 + +# To use the MKL library, uncomment the line below and set it to the MKL root: +MKL=/usr/usc/intel/12.1.1/mkl + +# For Python bindings, set the following and run 'make python/nplm.so'. +PYTHON_VERSION=2.7 +#PYTHON_ROOT=/opt/local/Library/Frameworks/Python.framework/Versions/$(PYTHON_VERSION) +PYTHON_ROOT=/home/nlg-01/chiangd/pkg64/python +CYTHON=$(PYTHON_ROOT)/bin/cython + +##### End of configurable options ##### + +# used for profiling +#USE_CHRONO=1 + +TCLAP=../3rdparty/tclap/include + +# Currently, this is needed only if USE_CHRONO is defined: +# Where to find Boost libraries +BOOST_LIB=$(BOOST)/lib +# On some systems, a suffix is appended for the multithreaded version. +BOOST_LIB_SUFFIX= +#BOOST_LIB_SUFFIX=-mt + +BOOST_CFLAGS=-I$(BOOST_INC) +BOOST_LDFLAGS= +ifdef USE_CHRONO + BOOST_CFLAGS+=-DUSE_CHRONO + BOOST_LDLIBS+=-lboost_system$(BOOST_LIB_SUFFIX) -lboost_chrono$(BOOST_LIB_SUFFIX) +endif +ifdef BOOST_LDLIBS + BOOST_LDFLAGS+=-L$(BOOST_LIB) -Wl,-rpath -Wl,$(BOOST_LIB) +endif + +ifdef OMP + ifneq (,$(findstring g++,$(CXX))) + OMP_CFLAGS=-fopenmp + OMP_LDFLAGS=-fopenmp + endif + ifneq (,$(findstring icpc,$(CXX))) + OMP_CFLAGS=-openmp + OMP_LDFLAGS=-openmp + endif +endif + +ifdef MKL + MKL_CFLAGS=-I$(MKL)/include -DEIGEN_USE_MKL_ALL + MKL_LDLIBS=-Wl,--start-group + ifeq ($(ARCH),x86_64) + MKL_LDFLAGS=-L$(MKL)/lib/intel64 -Wl,-rpath -Wl,$(MKL)/lib/intel64 + MKL_LDLIBS+=-lmkl_intel_lp64 + endif + ifeq ($(ARCH),i686) + MKL_LDFLAGS=-L$(MKL)/lib/ia32 -Wl,-rpath -Wl,$(MKL)/lib/ia32 + MKL_LDLIBS+=-lmkl_intel + endif + + ifneq (,$(findstring g++,$(CXX))) + MKL_LDLIBS+=-lmkl_gnu_thread + endif + ifneq (,$(findstring icpc,$(CXX))) + MKL_LDLIBS+=-lmkl_intel_thread + endif + + #MKL_LDLIBS=-lmkl_rt + MKL_LDLIBS+=-lmkl_core -Wl,--end-group +endif + +ifdef STATIC + LDFLAGS+=-static +endif + +ALL_CFLAGS=$(OMP_CFLAGS) $(MKL_CFLAGS) $(BOOST_CFLAGS) -I$(TCLAP) -I$(EIGEN) $(CFLAGS) +ALL_LDFLAGS=$(OMP_LDFLAGS) $(MKL_LDFLAGS) $(BOOST_LDFLAGS) $(LDFLAGS) +ALL_LDLIBS=$(MKL_LDLIBS) $(BOOST_LDLIBS) + +PYTHON_CFLAGS+=-I$(PYTHON_ROOT)/include/python$(PYTHON_VERSION) +ifeq ($(OS),Darwin) + # avoid having to link in libpython + PYTHON_LDFLAGS+=-undefined dynamic_lookup +endif + +# Some other programs + +AR=ar +RANLIB=ranlib + +# Rules + +BINS=trainNeuralNetwork testNeuralNetwork prepareNeuralLM testNeuralLM prepareNeuralTM +LIBS=neuralLM.a neuralLM.so +OBJS=util.o model.o + +all: $(BINS) $(LIBS) + +clean: + rm -f *.o shared/*.o python/*.o $(BINS) $(LIBS) python/nplm.{cpp,so} + +install: all + mkdir -p ../bin + cp $(BINS) ../bin + mkdir -p ../lib + cp $(LIBS) ../lib + +%.o: %.cpp + $(CXX) -c $(ALL_CFLAGS) $< -o $@ + +shared/%.o: %.cpp + $(CXX) -c -fPIC $(ALL_CFLAGS) $< -o $@ + +trainNeuralNetwork: trainNeuralNetwork.o $(OBJS) + $(CXX) $(ALL_LDFLAGS) $^ $(ALL_LDLIBS) -o $@ + +testNeuralNetwork: testNeuralNetwork.o $(OBJS) + $(CXX) $(ALL_LDFLAGS) $^ $(ALL_LDLIBS) -o $@ + +prepareNeuralLM: prepareNeuralLM.o $(OBJS) + $(CXX) $(ALL_LDFLAGS) $^ $(ALL_LDLIBS) -o $@ + +testNeuralLM: testNeuralLM.o $(OBJS) + $(CXX) $(ALL_LDFLAGS) $^ $(ALL_LDLIBS) -o $@ + +prepareNeuralTM: prepareNeuralTM.o $(OBJS) + $(CXX) $(ALL_LDFLAGS) $^ $(ALL_LDLIBS) -o $@ + +neuralLM.a: neuralLM.o $(OBJS) + rm -f $@ + $(AR) rv $@ $^ + $(RANLIB) $@ + +neuralLM.so: $(addprefix shared/,neuralLM.o $(OBJS)) + $(CXX) -shared $(ALL_LDFLAGS) $^ $(ALL_LDLIBS) -o $@ + +python/nplm.cpp: python/nplm.pyx + $(CYTHON) --cplus $^ + +python/nplm.o: python/nplm.cpp + $(CXX) -c -fPIC -I. $(ALL_CFLAGS) $(PYTHON_CFLAGS) $< -o $@ + +python/nplm.so: python/nplm.o $(addprefix shared/,neuralLM.o $(OBJS)) + $(CXX) -shared $(ALL_LDFLAGS) $(PYTHON_LDFLAGS) $^ $(ALL_LDLIBS) $(PYTHON_LDLIBS) -o $@ diff --git a/src/SoftmaxLoss.h b/src/SoftmaxLoss.h new file mode 100644 index 0000000..77d94ca --- /dev/null +++ b/src/SoftmaxLoss.h @@ -0,0 +1,136 @@ +#ifndef SOFTMAXLOSS_H +#define SOFTMAXLOSS_H + +#include +#include "multinomial.h" +#include "util.h" + +namespace nplm +{ + +// is this cheating? +using Eigen::Matrix; +using Eigen::MatrixBase; +using Eigen::Dynamic; + +///// Softmax layer plus log-loss function. + +enum loss_function_type { LogLoss, NCELoss, InvalidLoss }; + +inline loss_function_type string_to_loss_function (const std::string &s) +{ + if (s == "log") + return LogLoss; + else if (s == "nce") + return NCELoss; + else + return InvalidLoss; +} + +inline std::string loss_function_to_string (loss_function_type f) +{ + if (f == LogLoss) + return "log"; + else if (f == NCELoss) + return "nce"; +} + +/// Note: Outputs log-probabilities. + +struct SoftmaxLogLoss +{ + template + void fProp(const MatrixBase &input, const MatrixBase &output_words, const MatrixBase &output_const, double &loss) + { + UNCONST(DerivedO, output_const, output); + + double log_likelihood = 0.0; + + #pragma omp parallel for reduction(+:log_likelihood) + for (int train_id = 0; train_id < input.cols(); train_id++) + { + double normalization = logsum(input.col(train_id)); + output.col(train_id).array() = input.col(train_id).array() - normalization; + log_likelihood += output(output_words(train_id), train_id); + } + loss = log_likelihood; + } + + template + void bProp(const MatrixBase &output_words, const MatrixBase &output, const MatrixBase &grad_input_const) + { + UNCONST(DerivedI, grad_input_const, grad_input); + grad_input.setZero(); + #pragma omp parallel for + for (int train_id = 0; train_id < output.cols(); train_id++) + { + grad_input(output_words(train_id), train_id) += 1.; + grad_input.col(train_id) -= output.col(train_id).array().exp().matrix(); + } + } +}; + +///// Softmax layer plus NCE loss function. + +///// Note: Outputs probabilities. + +///// Note: Unlike SoftmaxLogLoss, does not compute *or* apply precomputed +///// normalizations. Currently the caller is expected to do normalization. + +template +class SoftmaxNCELoss +{ + const Multinomial &unigram; + +public: + SoftmaxNCELoss(const Multinomial &unigram) + : unigram(unigram) + { + } + + template + void fProp(const MatrixBase &scores, + const MatrixBase &minibatch_samples, + const MatrixBase &output_const, double &loss) + { + UNCONST(DerivedO, output_const, output); + double log_likelihood = 0.0; + int num_noise_samples = minibatch_samples.rows()-1; + double log_num_noise_samples = std::log(num_noise_samples); + #pragma omp parallel for reduction(+:log_likelihood) schedule(static) + for (int train_id = 0; train_id < scores.cols(); train_id++) + { + for (int sample_id = 0;sample_id < minibatch_samples.rows(); sample_id++) + { + int sample = minibatch_samples(sample_id, train_id); + // To avoid zero or infinite probabilities, + // never take exp of score without normalizing first, + // even if it's a little slower... + double score = scores(sample_id, train_id); + double score_noise = log_num_noise_samples + unigram.logprob(sample); + double z = logadd(score, score_noise); + double logprob = score - z; + double logprob_noise = score_noise - z; + output(sample_id, train_id) = std::exp(logprob); + log_likelihood += sample_id == 0 ? logprob : logprob_noise; + } + } + loss = log_likelihood; + } + + template + void bProp(const MatrixBase &probs, const MatrixBase &output_const) + { + UNCONST(DerivedI, output_const, output); + #pragma omp parallel for schedule(static) + for (int train_id = 0; train_id < probs.cols(); train_id++) + { + output.col(train_id) = -probs.col(train_id); + output(0, train_id) += 1.0; + } + } +}; + +} // namespace nplm + +#endif diff --git a/src/USCMatrix.h b/src/USCMatrix.h new file mode 100644 index 0000000..caa9553 --- /dev/null +++ b/src/USCMatrix.h @@ -0,0 +1,192 @@ +#ifndef USCMATRIX_H +#define USCMATRIX_H + +#include +#include "maybe_omp.h" +#include "util.h" + +namespace nplm +{ + +// is this cheating? +using Eigen::Matrix; +using Eigen::MatrixBase; +using Eigen::Dynamic; + +// USC = Uniform Sparse Columns. A USCMatrix is a sparse matrix in which +// each column has exactly k nonzero entries. This allows for a +// simpler and faster compressed representation. + +// A USCMatrix can be converted into CSC format fairly easily, by +// adding a third array [0, k, 2k, ..., nk]. However, the indices will +// not be unique. + +// We use: +// dense2 = dense1^T * sparse (output bProp, input fProp) +// dense1 = sparse * dense2^T (output computeGradient, input computeGradient) +// where: +// sparse is vocab_size x minibatch_size +// dense1 is vocab_size x embedding_dimension +// dense2 is embedding_dimension x minibatch_size + +template // should be EIGEN_DEFAULT_DENSE_INDEX_TYPE but int is smaller +class USCMatrix +{ + +public: + Matrix indexes; + Matrix values; + int m_rows; + + USCMatrix() : m_rows(0) { } + + template + USCMatrix(Index rows, const MatrixBase &indexes, const MatrixBase &values) + : + indexes(indexes), + values(values), + m_rows(rows) + { } + + USCMatrix(Index rows, Index nnz, Index cols) + : + indexes(Matrix(nnz, cols)), + values(Matrix(nnz, cols)), + m_rows(rows) + { + this->indexes.fill(-1); + } + + Index rows() const { return m_rows; } + Index cols() const { return indexes.cols(); } + + void resize(Index rows, Index nnz, Index cols) { + indexes.resize(nnz, cols); + values.resize(nnz, cols); + m_rows = rows; + } +}; + +// Dense matrix - sparse matrix product +// a is presumably very wide +template +void uscgemm(double alpha, const MatrixBase &a, + const USCMatrix &b, + const MatrixBase &c_const) +{ + UNCONST(DerivedC, c_const, c); + eigen_assert(a.rows() == c.rows()); + eigen_assert(a.cols() == b.rows()); + eigen_assert(b.cols() == c.cols()); + + #pragma omp parallel for + for (Index k=0; k= 0); + eigen_assert(j < a.cols()); + c.col(k) += alpha * a.col(j) * b.values(r,k); + } +} + +// sparse matrix - dense matrix product +template +void uscgemm(double alpha, + const USCMatrix &a, + const MatrixBase &b, + const MatrixBase &c_const) +{ + UNCONST(DerivedC, c_const, c); + eigen_assert(a.rows() == c.rows()); + eigen_assert(a.cols() == b.rows()); + eigen_assert(b.cols() == c.cols()); + + // This needs to be tuned for each system, unfortunately, + // and seems to vary a lot. A lot. + int i_blocks = omp_get_num_threads()*16; + + // Assume only one block in k direction. + // We don't need to explicitly block in the j direction. + #pragma omp parallel for + for (Index ib=0; ib= 0); + eigen_assert(i < c.rows()); + if (i % i_blocks == ib) + c.row(i) += alpha * a.values(r,j) * b.row(j); + } + + /* + If c.cols() is really large, then theoretically it seems like we should do: + + parallel for blocks in i direction + for blocks in j direction + pack block of a into smaller sparse matrix + for blocks in k direction + for k + for i (sparse) + for j + c(i,k) += a(i,j) * b(j,k) + + However, the copying of blocks of a doesn't seem practical for any realistic + sizes of c.cols(). + */ +} + +// Dense matrix - dense matrix product, but masked by a sparse matrix, +// that is, compute a*b only for those positions in c.indexes, and put +// them in c.values. + +// a is presumably a very tall matrix. Row-major order is preferred. +// For b, column-major is preferred. + +template +void uscgemm_masked(double alpha, + const MatrixBase &a, + const MatrixBase &b, + USCMatrix &c) +{ + eigen_assert(a.rows() == c.rows()); + eigen_assert(a.cols() == b.rows()); + eigen_assert(b.cols() == c.cols()); + + #pragma omp parallel for + for (Index k=0; k= 0); + eigen_assert(i < a.rows()); + c.values(r, k) += alpha * a.row(i) * b.col(k); + } +} + +// sparse matrix - dense vector product +template +void uscgemv(double alpha, + const USCMatrix &a, + const MatrixBase &b, + const MatrixBase &c_const) +{ + UNCONST(DerivedC, c_const, c); + eigen_assert(a.rows() == c.rows()); + eigen_assert(a.cols() == b.rows()); + eigen_assert(b.cols() == 1 && c.cols() == 1); + + for (Index j=0; j= 0); + eigen_assert(i < c.rows()); + c(i) += alpha * a.values(r,j) * b(j); + } +} + +} + +#endif diff --git a/src/graphClasses.h b/src/graphClasses.h new file mode 100644 index 0000000..da5f1af --- /dev/null +++ b/src/graphClasses.h @@ -0,0 +1,60 @@ +//creating the structure of the nn in a graph that will help in performing backpropagation and forward propagation +#pragma once + +#include +#include "neuralClasses.h" +#include + +namespace nplm +{ + +template +class Node { + public: + X * param; //what parameter is this + //vector children; + //vector parents; + Eigen::Matrix fProp_matrix; + Eigen::Matrix bProp_matrix; + int minibatch_size; + + public: + Node() : param(NULL), minibatch_size(0) { } + + Node(X *input_param, int minibatch_size) + : param(input_param), + minibatch_size(minibatch_size) + { + resize(minibatch_size); + } + + void resize(int minibatch_size) + { + this->minibatch_size = minibatch_size; + if (param->n_outputs() != -1) + { + fProp_matrix.setZero(param->n_outputs(), minibatch_size); + } + if (param->n_inputs() != -1) + { + bProp_matrix.setZero(param->n_inputs(), minibatch_size); + } + } + + void resize() { resize(minibatch_size); } + + /* + void Fprop(Matrix & input,int n_cols) + { + param->fProp(input,fProp_matrix,0,0,n_cols); + } + void Fprop(Matrix & input,int n_cols) + { + param->fProp(input,fProp_matrix,0,0,n_cols); + } + */ + //for f prop, just call the fProp node of the particular parameter. + +}; + +} // namespace nplm diff --git a/src/maybe_omp.h b/src/maybe_omp.h new file mode 100644 index 0000000..562dea6 --- /dev/null +++ b/src/maybe_omp.h @@ -0,0 +1,13 @@ +#ifndef MAYBE_OMP +#define MAYBE_OMP + +#ifdef _OPENMP + #include +#else + #define omp_get_thread_num(x) 0 + #define omp_set_num_threads(n) + #define omp_get_num_threads() 1 + #define omp_get_max_threads() 1 +#endif + +#endif diff --git a/src/model.cpp b/src/model.cpp new file mode 100644 index 0000000..3611975 --- /dev/null +++ b/src/model.cpp @@ -0,0 +1,246 @@ +#include +#include +#include + +#include "model.h" +#include "param.h" + +using namespace std; +using namespace boost; +using namespace boost::random; + +namespace nplm +{ + + void model::resize(int ngram_size, + int input_vocab_size, + int output_vocab_size, + int input_embedding_dimension, + int num_hidden, + int output_embedding_dimension) +{ + input_layer.resize(input_vocab_size, input_embedding_dimension, ngram_size-1); + first_hidden_linear.resize(num_hidden, input_embedding_dimension*(ngram_size-1)); + first_hidden_activation.resize(num_hidden); + second_hidden_linear.resize(output_embedding_dimension, num_hidden); + second_hidden_activation.resize(output_embedding_dimension); + output_layer.resize(output_vocab_size, output_embedding_dimension); + this->ngram_size = ngram_size; + this->input_vocab_size = input_vocab_size; + this->output_vocab_size = output_vocab_size; + this->input_embedding_dimension = input_embedding_dimension; + this->num_hidden = num_hidden; + this->output_embedding_dimension = output_embedding_dimension; + premultiplied = false; +} + +void model::initialize(mt19937 &init_engine, bool init_normal, double init_range, double init_bias) +{ + input_layer.initialize(init_engine, init_normal, init_range); + output_layer.initialize(init_engine, init_normal, init_range, init_bias); + first_hidden_linear.initialize(init_engine, init_normal, init_range); + second_hidden_linear.initialize(init_engine, init_normal, init_range); +} + +void model::premultiply() +{ + // Since input and first_hidden_linear are both linear, + // we can multiply them into a single linear layer *if* we are not training + int context_size = ngram_size-1; + Matrix U = first_hidden_linear.U; + first_hidden_linear.U.resize(num_hidden, input_vocab_size * context_size); + for (int i=0; itranspose(); + input_layer.W->resize(1,1); // try to save some memory + premultiplied = true; +} + +void model::readConfig(ifstream &config_file) +{ + string line; + vector fields; + int ngram_size, vocab_size, input_embedding_dimension, num_hidden, output_embedding_dimension; + activation_function_type activation_function = this->activation_function; + while (getline(config_file, line) && line != "") + { + splitBySpace(line, fields); + if (fields[0] == "ngram_size") + ngram_size = lexical_cast(fields[1]); + else if (fields[0] == "vocab_size") + input_vocab_size = output_vocab_size = lexical_cast(fields[1]); + else if (fields[0] == "input_vocab_size") + input_vocab_size = lexical_cast(fields[1]); + else if (fields[0] == "output_vocab_size") + output_vocab_size = lexical_cast(fields[1]); + else if (fields[0] == "input_embedding_dimension") + input_embedding_dimension = lexical_cast(fields[1]); + else if (fields[0] == "num_hidden") + num_hidden = lexical_cast(fields[1]); + else if (fields[0] == "output_embedding_dimension") + output_embedding_dimension = lexical_cast(fields[1]); + else if (fields[0] == "activation_function") + activation_function = string_to_activation_function(fields[1]); + else if (fields[0] == "version") + { + int version = lexical_cast(fields[1]); + if (version != 1) + { + cerr << "error: file format mismatch (expected 1, found " << version << ")" << endl; + exit(1); + } + } + else + cerr << "warning: unrecognized field in config: " << fields[0] << endl; + } + resize(ngram_size, + input_vocab_size, + output_vocab_size, + input_embedding_dimension, + num_hidden, + output_embedding_dimension); + set_activation_function(activation_function); +} + +void model::readConfig(const string &filename) +{ + ifstream config_file(filename.c_str()); + if (!config_file) + { + cerr << "error: could not open config file " << filename << endl; + exit(1); + } + readConfig(config_file); + config_file.close(); +} + +void model::read(const string &filename) +{ + vector input_words; + vector output_words; + read(filename, input_words, output_words); +} + +void model::read(const string &filename, vector &input_words, vector &output_words) +{ + ifstream file(filename.c_str()); + if (!file) throw runtime_error("Could not open file " + filename); + + param myParam; + string line; + + while (getline(file, line)) + { + if (line == "\\config") + { + readConfig(file); + } + + else if (line == "\\vocab") + { + input_words.clear(); + readWordsFile(file, input_words); + output_words = input_words; + } + + else if (line == "\\input_vocab") + { + input_words.clear(); + readWordsFile(file, input_words); + } + + else if (line == "\\output_vocab") + { + output_words.clear(); + readWordsFile(file, output_words); + } + + else if (line == "\\input_embeddings") + input_layer.read(file); + else if (line == "\\hidden_weights 1") + first_hidden_linear.read(file); + else if (line == "\\hidden_weights 2") + second_hidden_linear.read(file); + else if (line == "\\output_weights") + output_layer.read_weights(file); + else if (line == "\\output_biases") + output_layer.read_biases(file); + else if (line == "\\end") + break; + else if (line == "") + continue; + else + { + cerr << "warning: unrecognized section: " << line << endl; + // skip over section + while (getline(file, line) && line != "") { } + } + } + file.close(); +} + + void model::write(const string &filename, const vector &input_words, const vector &output_words) +{ + write(filename, &input_words, &output_words); +} + +void model::write(const string &filename) +{ + write(filename, NULL, NULL); +} + + void model::write(const string &filename, const vector *input_pwords, const vector *output_pwords) +{ + ofstream file(filename.c_str()); + if (!file) throw runtime_error("Could not open file " + filename); + + file << "\\config" << endl; + file << "version 1" << endl; + file << "ngram_size " << ngram_size << endl; + file << "input_vocab_size " << input_vocab_size << endl; + file << "output_vocab_size " << output_vocab_size << endl; + file << "input_embedding_dimension " << input_embedding_dimension << endl; + file << "num_hidden " << num_hidden << endl; + file << "output_embedding_dimension " << output_embedding_dimension << endl; + file << "activation_function " << activation_function_to_string(activation_function) << endl; + file << endl; + + if (input_pwords) + { + file << "\\input_vocab" << endl; + writeWordsFile(*input_pwords, file); + file << endl; + } + + if (output_pwords) + { + file << "\\output_vocab" << endl; + writeWordsFile(*output_pwords, file); + file << endl; + } + + file << "\\input_embeddings" << endl; + input_layer.write(file); + file << endl; + + file << "\\hidden_weights 1" << endl; + first_hidden_linear.write(file); + file << endl; + + file << "\\hidden_weights 2" << endl; + second_hidden_linear.write(file); + file << endl; + + file << "\\output_weights" << endl; + output_layer.write_weights(file); + file << endl; + + file << "\\output_biases" << endl; + output_layer.write_biases(file); + file << endl; + + file << "\\end" << endl; + file.close(); +} + + +} // namespace nplm diff --git a/src/model.h b/src/model.h new file mode 100644 index 0000000..271b22f --- /dev/null +++ b/src/model.h @@ -0,0 +1,105 @@ +#ifndef MODEL_H +#define MODEL_H + +#include +#include +#include +#include + +#include "neuralClasses.h" +#include "Activation_function.h" + +namespace nplm +{ + +class model { +public: + Input_word_embeddings input_layer; + Linear_layer first_hidden_linear; + Activation_function first_hidden_activation; + Linear_layer second_hidden_linear; + Activation_function second_hidden_activation; + Output_word_embeddings output_layer; + Matrix output_embedding_matrix, + input_embedding_matrix, + input_and_output_embedding_matrix; + + activation_function_type activation_function; + int ngram_size, input_vocab_size, output_vocab_size, input_embedding_dimension, num_hidden, output_embedding_dimension; + bool premultiplied; + + model(int ngram_size, + int input_vocab_size, + int output_vocab_size, + int input_embedding_dimension, + int num_hidden, + int output_embedding_dimension, + bool share_embeddings) + { + if (share_embeddings){ + input_and_output_embedding_matrix = Matrix(); + input_layer.set_W(&input_and_output_embedding_matrix); + output_layer.set_W(&input_and_output_embedding_matrix); + } + else { + input_embedding_matrix = Matrix(); + output_embedding_matrix = Matrix(); + input_layer.set_W(&input_embedding_matrix); + output_layer.set_W(&output_embedding_matrix); + } + resize(ngram_size, + input_vocab_size, + output_vocab_size, + input_embedding_dimension, + num_hidden, + output_embedding_dimension); + } + model() : ngram_size(1), + premultiplied(false), + activation_function(Rectifier), + output_embedding_matrix(Matrix()), + input_embedding_matrix(Matrix()) + { + output_layer.set_W(&output_embedding_matrix); + input_layer.set_W(&input_embedding_matrix); + } + + void resize(int ngram_size, + int input_vocab_size, + int output_vocab_size, + int input_embedding_dimension, + int num_hidden, + int output_embedding_dimension); + + void initialize(boost::random::mt19937 &init_engine, + bool init_normal, + double init_range, + double init_bias); + void set_activation_function(activation_function_type f) + { + activation_function = f; + first_hidden_activation.set_activation_function(f); + second_hidden_activation.set_activation_function(f); + } + + void premultiply(); + + // Since the vocabulary is not essential to the model, + // we need a version with and without a vocabulary. + // If the number of "extra" data structures like this grows, + // a better solution is needed + + void read(const std::string &filename); + void read(const std::string &filename, std::vector &input_words, std::vector &output_words); + void write(const std::string &filename, const std::vector &input_words, const std::vector &output_words); + void write(const std::string &filename); + + private: + void readConfig(std::ifstream &config_file); + void readConfig(const std::string &filename); + void write(const std::string &filename, const std::vector *input_pwords, const std::vector *output_pwords); +}; + +} //namespace nplm + +#endif diff --git a/src/multinomial.h b/src/multinomial.h new file mode 100644 index 0000000..1314fcb --- /dev/null +++ b/src/multinomial.h @@ -0,0 +1,135 @@ +#ifndef MULTINOMIAL_H +#define MULTINOMIAL_H + +#include +#include +#include +#include + +#include +#include + +namespace nplm +{ + +template +class multinomial { + std::vector J; + std::vector q; + boost::random::uniform_int_distribution unif_int; + boost::random::uniform_real_distribution<> unif_real; + std::vector m_prob, m_logprob; + +public: + multinomial() : unif_real(0.0, 1.0) { } + multinomial(const std::vector &counts) : unif_real(0.0, 1.0) { estimate(counts); } + + void estimate(const std::vector& counts) + { + int k = counts.size(); + Count n = 0; + m_prob.clear(); + m_prob.resize(k, 0.0); + m_logprob.clear(); + m_logprob.resize(k, 0.0); + for (int i=0; i(counts[i]) / n; + m_logprob[i] = std::log(m_prob[i]); + } + setup(m_prob); + } + + double prob(int i) const { return m_prob[i]; } + double logprob(int i) const { return m_logprob[i]; } + + template + int sample(Engine &eng) const + { + int m = unif_int(eng); + double p = unif_real(eng); + int s; + if (q[m] > p) + s = m; + else + s = J[m]; + assert (s >= 0); + return s; + } + +private: + void setup(const std::vector& probs) + { + int k = probs.size(); + + unif_int = boost::random::uniform_int_distribution(0, k-1); + J.resize(k, -1); + q.resize(k, 0); + + // "small" outcomes (prob < 1/k) + std::set S; + std::set::iterator s_it; + // "large" outcomes (prob >= 1/k) + std::set L; + std::set::iterator l_it; + const double tol = 1e-3; + + for (int i=0; i 0 && L.size() > 0) + { + // choose an arbitrary element s from S and l from L + s_it = S.begin(); + int s = *s_it; + l_it = L.begin(); + int l = *l_it; + + // pair up s and (part of) l as its alias + J[s] = l; + S.erase(s_it); + //q[l] = q[l] - (1.0 - q[s]); + q[l] = q[l] + q[s] - 1.0; // more stable? + + // move l from L to S if necessary + if (q[l] < 1.0) + { + S.insert(l); + L.erase(l_it); + } + } + + // any remaining elements must have q/n close to 1, so we leave them alone + for (s_it = S.begin(); s_it != S.end(); ++s_it) { + //assert (fabs(q[*s_it] - 1) < tol); + if (std::fabs(q[*s_it] - 1) > tol) + { + std::cerr << "warning: multinomial: probability differs from one by " << std::fabs(q[*s_it]-1) << std::endl; + } + q[*s_it] = 1.0; + } + for (l_it = L.begin(); l_it != L.end(); ++l_it) { + if (std::fabs(q[*l_it] - 1) > tol) + { + std::cerr << "warning: multinomial: probability differs from one by " << std::fabs(q[*l_it]-1) << std::endl; + } + } + } + +}; + +} // namespace nplm + +#endif diff --git a/src/neuralClasses.h b/src/neuralClasses.h new file mode 100644 index 0000000..afd91f1 --- /dev/null +++ b/src/neuralClasses.h @@ -0,0 +1,520 @@ +#pragma once +#include +#include +#include +#include +#include +#include + +#include +#include +#include "maybe_omp.h" + +#include "util.h" +#include "graphClasses.h" +#include "USCMatrix.h" + +// classes for various kinds of layers +#include "SoftmaxLoss.h" +#include "Activation_function.h" + +//#define EIGEN_DONT_PARALLELIZE +//#define EIGEN_DEFAULT_TO_ROW_MAJOR + +namespace nplm +{ + +// is this cheating? +using Eigen::Matrix; +using Eigen::MatrixBase; +using Eigen::Dynamic; + +typedef boost::unordered_map int_map; + +class Linear_layer +{ + private: + Matrix U; + Matrix U_gradient; + Matrix U_velocity; + Matrix U_running_gradient; + + friend class model; + + public: + Linear_layer() { } + Linear_layer(int rows, int cols) { resize(rows, cols); } + + void resize(int rows, int cols) + { + U.setZero(rows, cols); + U_gradient.setZero(rows, cols); + U_running_gradient.setZero(rows, cols); + U_velocity.setZero(rows, cols); + } + + void read(std::ifstream &U_file) { readMatrix(U_file, U); } + void write(std::ofstream &U_file) { writeMatrix(U, U_file); } + + template + void initialize(Engine &engine, bool init_normal, double init_range) + { + initMatrix(engine, U, init_normal, init_range); + } + + int n_inputs () const { return U.cols(); } + int n_outputs () const { return U.rows(); } + + template + void fProp(const MatrixBase &input, const MatrixBase &output) const + { + UNCONST(DerivedOut, output, my_output); + my_output.leftCols(input.cols()).noalias() = U*input; + } + + // Sparse input + template + void fProp(const USCMatrix &input, const MatrixBase &output_const) const + { + UNCONST(DerivedOut, output_const, output); + output.setZero(); + uscgemm(1.0, U, input, output.leftCols(input.cols())); + } + + template + void bProp(const MatrixBase &input, MatrixBase &output) const + { + UNCONST(DerivedGIn, output, my_output); + my_output.noalias() = U.transpose()*input; + } + + template + void computeGradient(const MatrixBase &bProp_input, + const MatrixBase &fProp_input, + double learning_rate, double momentum, double L2_reg) + { + U_gradient.noalias() = bProp_input*fProp_input.transpose(); + + // This used to be multithreaded, but there was no measureable difference + if (L2_reg > 0.0) + { + U_gradient *= 1 - 2*L2_reg; + } + if (momentum > 0.0) + { + U_velocity = momentum*U_velocity + U_gradient; + U += learning_rate * U_velocity; + } + else + { + U += learning_rate * U_gradient; + } + } + + template + void computeGradientAdagrad(const MatrixBase &bProp_input, + const MatrixBase &fProp_input, + double learning_rate, double momentum, double L2_reg) + { + U_gradient.noalias() = bProp_input*fProp_input.transpose(); + + if (L2_reg != 0) + { + U_gradient *= 1 - 2*L2_reg; + } + + // ignore momentum? + + U_running_gradient.array() += U_gradient.array().square(); + U.array() += learning_rate * U_gradient.array() / U_running_gradient.array().sqrt(); + } + + template + void computeGradientCheck(const MatrixBase &bProp_input, + const MatrixBase &fProp_input, + const MatrixBase &gradient) const + { + UNCONST(DerivedGW, gradient, my_gradient); + my_gradient.noalias() = bProp_input*fProp_input.transpose(); + } +}; + +class Output_word_embeddings +{ + private: + // row-major is better for uscgemm + //Matrix W; + // Having W be a pointer to a matrix allows ease of sharing + // input and output word embeddings + Matrix *W; + std::vector W_data; + Matrix b; + Matrix W_running_gradient; + Matrix W_gradient; + Matrix b_running_gradient; + Matrix b_gradient; + + public: + Output_word_embeddings() { } + Output_word_embeddings(int rows, int cols) { resize(rows, cols); } + + void resize(int rows, int cols) + { + W->setZero(rows, cols); + b.setZero(rows); + } + void set_W(Matrix *input_W) { + W = input_W; + } + void read_weights(std::ifstream &W_file) { readMatrix(W_file, *W); } + void write_weights(std::ofstream &W_file) { writeMatrix(*W, W_file); } + void read_biases(std::ifstream &b_file) { readMatrix(b_file, b); } + void write_biases(std::ofstream &b_file) { writeMatrix(b, b_file); } + + template + void initialize(Engine &engine, bool init_normal, double init_range, double init_bias) + { + initMatrix(engine, *W, init_normal, init_range); + b.fill(init_bias); + } + + int n_inputs () const { return W->cols(); } + int n_outputs () const { return W->rows(); } + + template + void fProp(const MatrixBase &input, + const MatrixBase &output) const + { + UNCONST(DerivedOut, output, my_output); + my_output = ((*W) * input).colwise() + b; + } + + // Sparse output version + template + void fProp(const MatrixBase &input, + const MatrixBase &samples, + const MatrixBase &output) const + { + UNCONST(DerivedOutV, output, my_output); + #pragma omp parallel for + for (int instance_id = 0; instance_id < samples.cols(); instance_id++) + for (int sample_id = 0; sample_id < samples.rows(); sample_id++) + my_output(sample_id, instance_id) = b(samples(sample_id, instance_id)); + USCMatrix sparse_output(W->rows(), samples, my_output); + uscgemm_masked(1.0, *W, input, sparse_output); + my_output = sparse_output.values; // too bad, so much copying + } + + // Return single element of output matrix + template + double fProp(const MatrixBase &input, + int word, + int instance) const + { + return W->row(word).dot(input.col(instance)) + b(word); + } + + // Dense versions (for log-likelihood loss) + + template + void bProp(const MatrixBase &input_bProp_matrix, + const MatrixBase &bProp_matrix) const + { + // W is vocab_size x output_embedding_dimension + // input_bProp_matrix is vocab_size x minibatch_size + // bProp_matrix is output_embedding_dimension x minibatch_size + UNCONST(DerivedGIn, bProp_matrix, my_bProp_matrix); + my_bProp_matrix.leftCols(input_bProp_matrix.cols()).noalias() = + W->transpose() * input_bProp_matrix; + } + + template + void computeGradient(const MatrixBase &predicted_embeddings, + const MatrixBase &bProp_input, + double learning_rate, + double momentum) //not sure if we want to use momentum here + { + // W is vocab_size x output_embedding_dimension + // b is vocab_size x 1 + // predicted_embeddings is output_embedding_dimension x minibatch_size + // bProp_input is vocab_size x minibatch_size + + W->noalias() += learning_rate * bProp_input * predicted_embeddings.transpose(); + b += learning_rate * bProp_input.rowwise().sum(); + } + + // Sparse versions + + template + void bProp(const MatrixBase &samples, + const MatrixBase &weights, + const MatrixBase &bProp_matrix) const + { + UNCONST(DerivedGIn, bProp_matrix, my_bProp_matrix); + my_bProp_matrix.setZero(); + uscgemm(1.0, + W->transpose(), + USCMatrix(W->rows(), samples, weights), + my_bProp_matrix.leftCols(samples.cols())); // narrow bProp_matrix for possible short minibatch + } + + template + void computeGradient(const MatrixBase &predicted_embeddings, + const MatrixBase &samples, + const MatrixBase &weights, + double learning_rate, double momentum) //not sure if we want to use momentum here + { + USCMatrix gradient_output(W->rows(), samples, weights); + uscgemm(learning_rate, + gradient_output, + predicted_embeddings.leftCols(gradient_output.cols()).transpose(), + *W); // narrow predicted_embeddings for possible short minibatch + uscgemv(learning_rate, + gradient_output, + Matrix::Ones(gradient_output.cols()), + b); + } + + template + void computeGradientAdagrad(const MatrixBase &predicted_embeddings, + const MatrixBase &samples, + const MatrixBase &weights, + double learning_rate, double momentum) //not sure if we want to use momentum here + { + W_gradient.setZero(W->rows(), W->cols()); + b_gradient.setZero(b.size()); + if (W_running_gradient.rows() != W->rows() || W_running_gradient.cols() != W->cols()) + W_running_gradient.setZero(W->rows(), W->cols()); + if (b_running_gradient.size() != b.size()) + b_running_gradient.setZero(b.size()); + + USCMatrix gradient_output(W->rows(), samples, weights); + uscgemm(learning_rate, + gradient_output, + predicted_embeddings.leftCols(samples.cols()).transpose(), + W_gradient); + uscgemv(learning_rate, gradient_output, + Matrix::Ones(weights.cols()), + b_gradient); + + int_map update_map; //stores all the parameters that have been updated + for (int sample_id=0; sample_id update_items; + for (int_map::iterator it = update_map.begin(); it != update_map.end(); ++it) + update_items.push_back(it->first); + int num_items = update_items.size(); + + #pragma omp parallel for + for (int item_id=0; item_idrow(update_item).array() += learning_rate * W_gradient.row(update_item).array() / W_running_gradient.row(update_item).array().sqrt(); + b(update_item) += learning_rate * b_gradient(update_item) / sqrt(b_running_gradient(update_item)); + } + } + + template + void computeGradientCheck(const MatrixBase &predicted_embeddings, + const MatrixBase &samples, + const MatrixBase &weights, + const MatrixBase &gradient_W, + const MatrixBase &gradient_b) const + { + UNCONST(DerivedGW, gradient_W, my_gradient_W); + UNCONST(DerivedGb, gradient_b, my_gradient_b); + my_gradient_W.setZero(); + my_gradient_b.setZero(); + USCMatrix gradient_output(W->rows(), samples, weights); + uscgemm(1.0, + gradient_output, + predicted_embeddings.leftCols(samples.cols()).transpose(), + my_gradient_W); + uscgemv(1.0, gradient_output, + Matrix::Ones(weights.cols()), my_gradient_b); + } +}; + +class Input_word_embeddings +{ + private: + Matrix *W; + int context_size, vocab_size; + Matrix W_running_gradient; + Matrix W_gradient; + + friend class model; + + public: + Input_word_embeddings() : context_size(0), vocab_size(0) { } + Input_word_embeddings(int rows, int cols, int context) { resize(rows, cols, context); } + + void set_W(Matrix *input_W) { + W = input_W; + } + + void resize(int rows, int cols, int context) + { + context_size = context; + vocab_size = rows; + W->setZero(rows, cols); + } + + void read(std::ifstream &W_file) { readMatrix(W_file, *W); } + void write(std::ofstream &W_file) { writeMatrix(*W, W_file); } + + template + void initialize(Engine &engine, bool init_normal, double init_range) + { + initMatrix(engine, + *W, + init_normal, + init_range); + } + + int n_inputs() const { return -1; } + int n_outputs() const { return W->cols() * context_size; } + + // set output_id's embedding to the weighted average of all embeddings + template + void average(const Dist &dist, int output_id) + { + W->row(output_id).setZero(); + for (int i=0; i < W->rows(); i++) + if (i != output_id) + W->row(output_id) += dist.prob(i) * W->row(i); + } + + template + void fProp(const MatrixBase &input, + const MatrixBase &output) const + { + int embedding_dimension = W->cols(); + + // W is vocab_size x embedding_dimension + // input is ngram_size*vocab_size x minibatch_size + // output is ngram_size*embedding_dimension x minibatch_size + + /* + // Dense version: + for (int ngram=0; ngramtranspose(), + USCMatrix(W->rows(),input.middleRows(ngram, 1),Matrix::Ones(input.cols())), + my_output.block(ngram*embedding_dimension, 0, embedding_dimension, input.cols())); + } + } + + // When model is premultiplied, this layer doesn't get used, + // but this method is used to get the input into a sparse matrix. + // Hopefully this can get eliminated someday + template + void munge(const MatrixBase &input, USCMatrix &output) const + { + output.resize(vocab_size*context_size, context_size, input.cols()); + for (int i=0; i < context_size; i++) + output.indexes.row(i).array() = input.row(i).array() + i*vocab_size; + output.values.fill(1.0); + } + + template + void computeGradient(const MatrixBase &bProp_input, + const MatrixBase &input_words, + double learning_rate, double momentum, double L2_reg) + { + int embedding_dimension = W->cols(); + + // W is vocab_size x embedding_dimension + // input is ngram_size*vocab_size x minibatch_size + // bProp_input is ngram_size*embedding_dimension x minibatch_size + + /* + // Dense version: + for (int ngram=0; ngram(W->rows(), input_words.middleRows(ngram, 1), Matrix::Ones(input_words.cols())), + bProp_input.block(ngram*embedding_dimension,0,embedding_dimension,input_words.cols()).transpose(), + *W); + } + } + + template + void computeGradientAdagrad(const MatrixBase &bProp_input, + const MatrixBase &input_words, + double learning_rate, double momentum, double L2_reg) + { + int embedding_dimension = W->cols(); + + W_gradient.setZero(W->rows(), W->cols()); + if (W_running_gradient.rows() != W->rows() || W_running_gradient.cols() != W->cols()) + W_running_gradient.setZero(W->rows(), W->cols()); + + for (int ngram=0; ngram(W->rows(),input_words.middleRows(ngram, 1),Matrix::Ones(input_words.cols())), + bProp_input.block(ngram*embedding_dimension, 0, embedding_dimension, input_words.cols()).transpose(), + W_gradient); + } + + int_map update_map; //stores all the parameters that have been updated + + for (int train_id=0; train_id update_items; + for (int_map::iterator it = update_map.begin(); it != update_map.end(); ++it) + { + update_items.push_back(it->first); + } + int num_items = update_items.size(); + + #pragma omp parallel for + for (int item_id=0; item_idrow(update_item).array() += learning_rate * W_gradient.row(update_item).array() / W_running_gradient.row(update_item).array().sqrt(); + } + } + + template + void computeGradientCheck(const MatrixBase &bProp_input, + const MatrixBase &input_words, + int x, int minibatch_size, + const MatrixBase &gradient) const //not sure if we want to use momentum here + { + UNCONST(DerivedGW, gradient, my_gradient); + int embedding_dimension = W->cols(); + my_gradient.setZero(); + for (int ngram=0; ngram(W->rows(),input_words.middleRows(ngram, 1),Matrix::Ones(input_words.cols())), + bProp_input.block(ngram*embedding_dimension, 0, embedding_dimension, input_words.cols()).transpose(), + my_gradient); + } +}; + +} // namespace nplm diff --git a/src/neuralLM.cpp b/src/neuralLM.cpp new file mode 100644 index 0000000..19d84e8 --- /dev/null +++ b/src/neuralLM.cpp @@ -0,0 +1 @@ +#include "neuralLM.h" diff --git a/src/neuralLM.h b/src/neuralLM.h new file mode 100644 index 0000000..0c54bfd --- /dev/null +++ b/src/neuralLM.h @@ -0,0 +1,350 @@ +#ifndef NEURALLM_H +#define NEURALLM_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "param.h" +#include "util.h" +#include "model.h" +#include "propagator.h" +#include "neuralClasses.h" +#include "vocabulary.h" + +namespace nplm +{ + +class neuralLM +{ + bool normalization; + char map_digits; + + vocabulary input_vocab, output_vocab; + model nn; + propagator prop; + + int ngram_size; + int width; + + double weight; + +private: + std::size_t cache_size; + Eigen::Matrix cache_keys; + std::vector cache_values; + int cache_lookups, cache_hits; + + Eigen::Matrix ngram; // buffer for lookup_ngram + int start, null; + +public: + neuralLM() + : ngram_size(1), + normalization(false), + weight(1.), + map_digits(0), + width(1), + prop(nn, 1), + cache_size(0) + { + } + + void set_normalization(bool value) { normalization = value; } + void set_log_base(double value) { weight = 1./std::log(value); } + void set_map_digits(char value) { map_digits = value; } + + // This must be called if the underlying model is resized. + void resize() { + ngram_size = nn.ngram_size; + ngram.setZero(ngram_size); + if (cache_size) + { + cache_keys.resize(ngram_size, cache_size); + cache_keys.fill(-1); + } + prop.resize(); + } + + void set_width(int width) + { + this->width = width; + prop.resize(width); + } + + void set_input_vocabulary(const vocabulary &vocab) + { + this->input_vocab = vocab; + start = input_vocab.lookup_word(""); + null = input_vocab.lookup_word(""); + } + + void set_output_vocabulary(const vocabulary &vocab) + { + this->output_vocab = vocab; + } + + const vocabulary &get_vocabulary() const { return this->input_vocab; } + + int lookup_input_word(const std::string &word) const + { + if (map_digits) + for (int i=0; i + double lookup_ngram(const Eigen::MatrixBase &ngram) + { + assert (ngram.rows() == ngram_size); + assert (ngram.cols() == 1); + + std::size_t hash; + if (cache_size) + { + // First look in cache + hash = Eigen::hash_value(ngram) % cache_size; // defined in util.h + cache_lookups++; + if (cache_keys.col(hash) == ngram) + { + cache_hits++; + return cache_values[hash]; + } + } + + // Make sure that we're single threaded. Multithreading doesn't help, + // and in some cases can hurt quite a lot + int save_threads = omp_get_max_threads(); + omp_set_num_threads(1); + int save_eigen_threads = Eigen::nbThreads(); + Eigen::setNbThreads(1); + #ifdef __INTEL_MKL__ + int save_mkl_threads = mkl_get_max_threads(); + mkl_set_num_threads(1); + #endif + + prop.fProp(ngram.col(0)); + + int output = ngram(ngram_size-1, 0); + double log_prob; + + start_timer(3); + if (normalization) + { + Eigen::Matrix scores(output_vocab.size()); + prop.output_layer_node.param->fProp(prop.second_hidden_activation_node.fProp_matrix, scores); + double logz = logsum(scores.col(0)); + log_prob = weight * (scores(output, 0) - logz); + } + else + { + log_prob = weight * prop.output_layer_node.param->fProp(prop.second_hidden_activation_node.fProp_matrix, output, 0); + } + stop_timer(3); + + if (cache_size) + { + // Update cache + cache_keys.col(hash) = ngram; + cache_values[hash] = log_prob; + } + + #ifdef __INTEL_MKL__ + mkl_set_num_threads(save_mkl_threads); + #endif + Eigen::setNbThreads(save_eigen_threads); + omp_set_num_threads(save_threads); + + return log_prob; + } + + // Look up many n-grams in parallel. + template + void lookup_ngram(const Eigen::MatrixBase &ngram, const Eigen::MatrixBase &log_probs_const) + { + UNCONST(DerivedB, log_probs_const, log_probs); + assert (ngram.rows() == ngram_size); + assert (ngram.cols() <= width); + + prop.fProp(ngram); + + if (normalization) + { + Eigen::Matrix scores(output_vocab.size(), ngram.cols()); + prop.output_layer_node.param->fProp(prop.second_hidden_activation_node.fProp_matrix, scores); + + // And softmax and loss + Matrix output_probs(nn.output_vocab_size, ngram.cols()); + double minibatch_log_likelihood; + SoftmaxLogLoss().fProp(scores.leftCols(ngram.cols()), ngram.row(nn.ngram_size-1), output_probs, minibatch_log_likelihood); + for (int j=0; jfProp(prop.second_hidden_activation_node.fProp_matrix, output, j); + } + } + } + + double lookup_ngram(const int *ngram_a, int n) + { + for (int i=0; i &ngram_v) + { + return lookup_ngram(ngram_v.data(), ngram_v.size()); + } + + int get_order() const { return ngram_size; } + + void read(const std::string &filename) + { + std::vector input_words; + std::vector output_words; + nn.read(filename, input_words, output_words); + set_input_vocabulary(vocabulary(input_words)); + set_output_vocabulary(vocabulary(output_words)); + resize(); + // this is faster but takes more memory + //nn.premultiply(); + } + + void set_cache(std::size_t cache_size) + { + this->cache_size = cache_size; + cache_keys.resize(ngram_size, cache_size); + cache_keys.fill(-1); // clears cache + cache_values.resize(cache_size); + cache_lookups = cache_hits = 0; + } + + double cache_hit_rate() + { + return static_cast(cache_hits)/cache_lookups; + } + +}; + +template +void addStartStop(std::vector &input, std::vector &output, int ngram_size, const T &start, const T &stop) +{ + output.clear(); + output.resize(input.size()+ngram_size); + for (int i=0; i +void makeNgrams(const std::vector &input, std::vector > &output, int ngram_size) +{ + output.clear(); + for (int j=ngram_size-1; j ngram(input.begin() + (j-ngram_size+1), input.begin() + j+1); + output.push_back(ngram); + } +} + +inline void preprocessWords(const std::vector &words, std::vector< std::vector > &ngrams, + int ngram_size, const vocabulary &vocab, + bool numberize, bool add_start_stop, bool ngramize) +{ + int start = vocab.lookup_word(""); + int stop = vocab.lookup_word(""); + + // convert words to ints + std::vector nums; + if (numberize) { + for (int j=0; j(words[j])); + } + } + + // convert sequence to n-grams + ngrams.clear(); + if (ngramize) { + std::vector snums; + if (add_start_stop) { + addStartStop(nums, snums, ngram_size, start, stop); + } else { + snums = nums; + } + makeNgrams(snums, ngrams, ngram_size); + } + else { + if (nums.size() != ngram_size) + { + std::cerr << "error: wrong number of fields in line" << std::endl; + std::exit(1); + } + ngrams.push_back(nums); + } +} + +} // namespace nplm + +#endif diff --git a/src/param.h b/src/param.h new file mode 100644 index 0000000..b303514 --- /dev/null +++ b/src/param.h @@ -0,0 +1,58 @@ +#pragma once + +#include + +namespace nplm +{ + +struct param +{ + std::string train_file; + std::string validation_file; + std::string test_file; + + std::string model_file; + + std::string unigram_probs_file; + std::string words_file; + std::string input_words_file; + std::string output_words_file; + std::string model_prefix; + + int ngram_size; + int vocab_size; + int input_vocab_size; + int output_vocab_size; + int num_hidden; + int embedding_dimension; + int input_embedding_dimension; + int output_embedding_dimension; + std::string activation_function; + std::string loss_function; + + int minibatch_size; + int validation_minibatch_size; + int num_epochs; + double learning_rate; + + bool init_normal; + double init_range; + + int num_noise_samples; + + bool use_momentum; + double initial_momentum; + double final_momentum; + + double L2_reg; + + bool normalization; + double normalization_init; + + int num_threads; + + bool share_embeddings; + +}; + +} // namespace nplm diff --git a/src/prepareNeuralLM.cpp b/src/prepareNeuralLM.cpp new file mode 100644 index 0000000..94482d0 --- /dev/null +++ b/src/prepareNeuralLM.cpp @@ -0,0 +1,246 @@ +#include +#include +#include +#include +#include +#include + +#include "neuralLM.h" +#include "util.h" + +using namespace std; +using namespace TCLAP; +using namespace boost; +using namespace nplm; + +void writeNgrams(const vector > &data, + int ngram_size, const vocabulary &vocab, + bool numberize, bool add_start_stop, bool ngramize, + const string &filename) +{ + ofstream file(filename.c_str()); + if (!file) + { + cerr << "error: could not open " << filename << endl; + exit(1); + } + + vector > ngrams; + for (int i=0; i arg_ngramize("", "ngramize", "If true, convert lines to ngrams. Default: true.", false, true, "bool", cmd); + ValueArg arg_numberize("", "numberize", "If true, convert words to numbers. Default: true.", false, true, "bool", cmd); + ValueArg arg_add_start_stop("", "add_start_stop", "If true, prepend and append . Default: true.", false, true, "bool", cmd); + + ValueArg arg_vocab_size("", "vocab_size", "Vocabulary size.", false, -1, "int", cmd); + ValueArg arg_words_file("", "words_file", "File specifying words that should be included in vocabulary; all other words will be replaced by .", false, "", "string", cmd); + ValueArg arg_ngram_size("", "ngram_size", "Size of n-grams.", true, -1, "int", cmd); + ValueArg arg_write_words_file("", "write_words_file", "Output vocabulary.", false, "", "string", cmd); + ValueArg arg_validation_size("", "validation_size", "How many lines from training data to hold out for validation. Default: 0.", false, 0, "int", cmd); + ValueArg arg_validation_file("", "validation_file", "Output validation data (numberized n-grams).", false, "", "string", cmd); + ValueArg arg_validation_text("", "validation_text", "Input validation data (tokenized). Overrides --validation_size. Default: none.", false, "", "string", cmd); + ValueArg arg_train_file("", "train_file", "Output training data (numberized n-grams).", false, "", "string", cmd); + ValueArg arg_train_text("", "train_text", "Input training data (tokenized).", true, "", "string", cmd); + + cmd.parse(argc, argv); + + train_text = arg_train_text.getValue(); + train_file = arg_train_file.getValue(); + validation_text = arg_validation_text.getValue(); + validation_file = arg_validation_file.getValue(); + validation_size = arg_validation_size.getValue(); + write_words_file = arg_write_words_file.getValue(); + ngram_size = arg_ngram_size.getValue(); + vocab_size = arg_vocab_size.getValue(); + words_file = arg_words_file.getValue(); + numberize = arg_numberize.getValue(); + ngramize = arg_ngramize.getValue(); + add_start_stop = arg_add_start_stop.getValue(); + + // check command line arguments + + // Notes: + // - either --words_file or --vocab_size is required. + // - if --words_file is set, + // - if --vocab_size is not set, it is inferred from the length of the file + // - if --vocab_size is set, it is an error if the vocab file has a different number of lines + // - if --numberize 0 is set and --words_file f is not set, then the output model file will not have a vocabulary, and a warning should be printed. + + // Notes: + // - if --ngramize 0 is set, then + // - if --ngram_size is not set, it is inferred from the training file (different from current) + // - if --ngram_size is set, it is an error if the training file has a different n-gram size + // - if neither --validation_file or --validation_size is set, validation will not be performed. + // - if --numberize 0 is set, then --validation_size cannot be used. + + cerr << "Command line: " << endl; + cerr << boost::algorithm::join(vector(argv, argv+argc), " ") << endl; + + const string sep(" Value: "); + cerr << arg_train_text.getDescription() << sep << arg_train_text.getValue() << endl; + cerr << arg_train_file.getDescription() << sep << arg_train_file.getValue() << endl; + cerr << arg_validation_text.getDescription() << sep << arg_validation_text.getValue() << endl; + cerr << arg_validation_file.getDescription() << sep << arg_validation_file.getValue() << endl; + cerr << arg_validation_size.getDescription() << sep << arg_validation_size.getValue() << endl; + cerr << arg_write_words_file.getDescription() << sep << arg_write_words_file.getValue() << endl; + cerr << arg_ngram_size.getDescription() << sep << arg_ngram_size.getValue() << endl; + cerr << arg_vocab_size.getDescription() << sep << arg_vocab_size.getValue() << endl; + cerr << arg_words_file.getDescription() << sep << arg_words_file.getValue() << endl; + cerr << arg_numberize.getDescription() << sep << arg_numberize.getValue() << endl; + cerr << arg_ngramize.getDescription() << sep << arg_ngramize.getValue() << endl; + cerr << arg_add_start_stop.getDescription() << sep << arg_add_start_stop.getValue() << endl; + } + catch (TCLAP::ArgException &e) + { + cerr << "error: " << e.error() << " for arg " << e.argId() << endl; + exit(1); + } + + // VLF: why is this true? + // DC: it's because the vocabulary has to be constructed from the training data only. + // If the vocabulary is preset, we can't create the validation data. + // - if --numberize 0 is set, then --validation_size cannot be used. + // if (!numberize && (validation_size > 0)) { + // cerr << "Warning: without setting --numberize to 1, --validation_size cannot be used." << endl; + // } + + // Read in training data and validation data + vector > train_data; + readSentFile(train_text, train_data); + for (int i=0; i 0) { + if (ngram_size != train_data[i].size()) { + cerr << "Error: size of training ngrams does not match specified value of --ngram_size!" << endl; + } + } + // else if --ngram_size has not been specified, set it now + else { + ngram_size=train_data[i].size(); + } + } + } + + vector > validation_data; + if (validation_text != "") { + readSentFile(validation_text, validation_data); + for (int i=0; i 0) { + if (ngram_size != validation_data[i].size()) { + cerr << "Error: size of validation ngrams does not match specified value of --ngram_size!" << endl; + } + } + // else if --ngram_size has not been specified, set it now + else { + ngram_size=validation_data[i].size(); + } + } + } + } + else if (validation_size > 0) + { + // Create validation data + if (validation_size > train_data.size()) + { + cerr << "error: requested validation size is greater than training data size" << endl; + exit(1); + } + validation_data.insert(validation_data.end(), train_data.end()-validation_size, train_data.end()); + train_data.resize(train_data.size() - validation_size); + } + + // Construct vocabulary + vocabulary vocab; + int start, stop; + + // read vocabulary from file + if (words_file != "") { + vector words; + readWordsFile(words_file,words); + for(vector::iterator it = words.begin(); it != words.end(); ++it) { + vocab.insert_word(*it); + } + + // was vocab_size set? if so, verify that it does not conflict with size of vocabulary read from file + if (vocab_size > 0) { + if (vocab.size() != vocab_size) { + cerr << "Error: size of vocabulary file " << vocab.size() << " != --vocab_size " << vocab_size << endl; + } + } + // else, set it to the size of vocabulary read from file + else { + vocab_size = vocab.size(); + } + + } + + // construct vocabulary to contain top most frequent words; all other words replaced by + else { + vocab.insert_word(""); + vocab.insert_word(""); + vocab.insert_word(""); + + // warn user that if --numberize is not set, there will be no vocabulary! + if (!numberize) { + cerr << "Warning: with --numberize 0 and --words_file == "", there will be no vocabulary!" << endl; + } + unordered_map count; + for (int i=0; i +#include +#include +#include +#include +#include + +using namespace std; +using namespace TCLAP; + +#include "neuralLM.h" // for vocabulary +#include "util.h" + +using namespace boost; +using namespace nplm; + +void writeNgrams(const vector > &input_data, const vector > &output_data, int ngram_size, const vocabulary &input_vocab, const vocabulary &output_vocab, bool numberize, bool ngramize, const string &filename) +{ + ofstream file(filename.c_str()); + if (!file) + { + cerr << "error: could not open " << filename << endl; + exit(1); + } + + // check that input and output data have the same number of sentences + if (input_data.size() != output_data.size()) { + cerr << "Error: input and output data files have different number of lines" << endl; + exit(1); + } + + // for each input and output line + int lines=input_data.size(); + if (numberize) { + for (int i=0; i > input_ngrams; + vector input_nums; + for (int j=0; j > output_ngrams; + vector output_nums; + for (int j=0; j > input_ngrams; + vector input_words; + for (int j=0; j"); + // if word is unknown + if (input_vocab.lookup_word(input_data[i][j]) == unk) { + input_words.push_back(""); + } + // if word is known + else { + input_words.push_back(input_data[i][j]); + } + } + makeNgrams(input_words, input_ngrams, ngram_size-1); + + vector > output_ngrams; + vector output_words; + for (int j=0; j"); + // if word is unknown + if (output_vocab.lookup_word(output_data[i][j]) == unk) { + output_words.push_back(""); + } + // if word is known + else { + output_words.push_back(output_data[i][j]); + } + } + makeNgrams(output_words, output_ngrams, 1); + + // print out cross product of input and output ngrams + for (int j=0; j < input_ngrams.size(); j++) { + for (int k=0; k < output_ngrams.size(); k++) { + int j_prime; + for (j_prime=0; j_prime < input_ngrams[j].size()-1; j_prime++) { + file << input_ngrams[j][j_prime] << " "; + } + file << input_ngrams[j][j_prime]; + int k_prime; + for (k_prime=0; k_prime < output_ngrams[k].size(); k_prime++) { + file << " " << output_ngrams[k][k_prime]; + } + file << endl; + } + } + } + } + file.close(); +} + +int main(int argc, char *argv[]) +{ + int ngram_size, input_vocab_size, output_vocab_size, validation_size; + bool add_start_stop, numberize, ngramize; + string input_train_text, output_train_text, train_file, input_validation_text, output_validation_text, validation_file, write_input_words_file, write_output_words_file, input_words_file, output_words_file; + + try + { + CmdLine cmd("Prepares training data for training a language model.", ' ', "0.1"); + + // The options are printed in reverse order + + ValueArg arg_ngramize("", "ngramize", "If true, convert lines to ngrams. Default: true.", false, true, "bool", cmd); + ValueArg arg_numberize("", "numberize", "If true, convert words to numbers. Default: true.", false, true, "bool", cmd); + ValueArg arg_add_start_stop("", "add_start_stop", "If true, prepend (ngram_size-1) start symbols and postpend 1 stop symbol. Default: true.", false, true, "bool", cmd); + ValueArg arg_input_vocab_size("", "input_vocab_size", "Vocabulary size.", false, -1, "int", cmd); + ValueArg arg_output_vocab_size("", "output_vocab_size", "Vocabulary size.", false, -1, "int", cmd); + ValueArg arg_input_words_file("", "input_words_file", "File specifying words that should be included in vocabulary; all other words will be replaced by .", false, "", "string", cmd); + ValueArg arg_output_words_file("", "output_words_file", "File specifying words that should be included in vocabulary; all other words will be replaced by .", false, "", "string", cmd); + ValueArg arg_ngram_size("", "ngram_size", "Size of n-grams.", true, -1, "int", cmd); + ValueArg arg_write_input_words_file("", "write_input_words_file", "Output vocabulary.", false, "", "string", cmd); + ValueArg arg_write_output_words_file("", "write_output_words_file", "Output vocabulary.", false, "", "string", cmd); + ValueArg arg_validation_size("", "validation_size", "How many lines from training data to hold out for validation. Default: 0.", false, 0, "int", cmd); + ValueArg arg_validation_file("", "validation_file", "Output validation data (numberized n-grams).", false, "", "string", cmd); + ValueArg arg_input_validation_text("", "input_validation_text", "Input validation data (tokenized). Overrides --validation_size. Default: none.", false, "", "string", cmd); + ValueArg arg_output_validation_text("", "output_validation_text", "Input validation data (tokenized). Overrides --validation_size. Default: none.", false, "", "string", cmd); + ValueArg arg_train_file("", "train_file", "Output training data (numberized n-grams).", false, "", "string", cmd); + ValueArg arg_input_train_text("", "input_train_text", "Input training data (tokenized).", true, "", "string", cmd); + ValueArg arg_output_train_text("", "output_train_text", "Input training data (tokenized).", true, "", "string", cmd); + + cmd.parse(argc, argv); + + input_train_text = arg_input_train_text.getValue(); + output_train_text = arg_output_train_text.getValue(); + train_file = arg_train_file.getValue(); + validation_file = arg_validation_file.getValue(); + input_validation_text = arg_input_validation_text.getValue(); + output_validation_text = arg_output_validation_text.getValue(); + input_validation_text = arg_input_validation_text.getValue(); + output_validation_text = arg_output_validation_text.getValue(); + validation_size = arg_validation_size.getValue(); + write_input_words_file = arg_write_input_words_file.getValue(); + write_output_words_file = arg_write_output_words_file.getValue(); + ngram_size = arg_ngram_size.getValue(); + input_vocab_size = arg_input_vocab_size.getValue(); + output_vocab_size = arg_output_vocab_size.getValue(); + input_words_file = arg_input_words_file.getValue(); + output_words_file = arg_output_words_file.getValue(); + numberize = arg_numberize.getValue(); + ngramize = arg_ngramize.getValue(); + add_start_stop = arg_add_start_stop.getValue(); + + // check command line arguments + + // Notes: + // - either --words_file or --vocab_size is required. + // - if --words_file is set, + // - if --vocab_size is not set, it is inferred from the length of the file + // - if --vocab_size is set, it is an error if the vocab file has a different number of lines + // - if --numberize 0 is set and --use_vocab f is not set, then the output model file will not have a vocabulary, and a warning should be printed. + if ((input_words_file == "") && (input_vocab_size == -1)) { + cerr << "Error: either --input_words_file or --input_vocab_size is required." << endl; + exit(1); + } + if ((output_words_file == "") && (output_vocab_size == -1)) { + cerr << "Error: either --output_words_file or --output_vocab_size is required." << endl; + exit(1); + } + + // Notes: + // - if --ngramize 0 is set, then + // - if --ngram_size is not set, it is inferred from the training file (different from current) + // - if --ngram_size is set, it is an error if the training file has a different n-gram size + // - if neither --validation_file or --validation_size is set, validation will not be performed. + // - if --numberize 0 is set, then --validation_size cannot be used. + + cerr << "Command line: " << endl; + cerr << boost::algorithm::join(vector(argv, argv+argc), " ") << endl; + + const string sep(" Value: "); + cerr << arg_input_train_text.getDescription() << sep << arg_input_train_text.getValue() << endl; + cerr << arg_output_train_text.getDescription() << sep << arg_output_train_text.getValue() << endl; + cerr << arg_train_file.getDescription() << sep << arg_train_file.getValue() << endl; + cerr << arg_input_validation_text.getDescription() << sep << arg_input_validation_text.getValue() << endl; + cerr << arg_output_validation_text.getDescription() << sep << arg_output_validation_text.getValue() << endl; + cerr << arg_validation_file.getDescription() << sep << arg_validation_file.getValue() << endl; + cerr << arg_validation_size.getDescription() << sep << arg_validation_size.getValue() << endl; + cerr << arg_write_input_words_file.getDescription() << sep << arg_write_input_words_file.getValue() << endl; + cerr << arg_write_output_words_file.getDescription() << sep << arg_write_output_words_file.getValue() << endl; + cerr << arg_ngram_size.getDescription() << sep << arg_ngram_size.getValue() << endl; + cerr << arg_input_vocab_size.getDescription() << sep << arg_input_vocab_size.getValue() << endl; + cerr << arg_output_vocab_size.getDescription() << sep << arg_output_vocab_size.getValue() << endl; + cerr << arg_input_words_file.getDescription() << sep << arg_input_words_file.getValue() << endl; + cerr << arg_output_words_file.getDescription() << sep << arg_output_words_file.getValue() << endl; + cerr << arg_numberize.getDescription() << sep << arg_numberize.getValue() << endl; + cerr << arg_ngramize.getDescription() << sep << arg_ngramize.getValue() << endl; + cerr << arg_add_start_stop.getDescription() << sep << arg_add_start_stop.getValue() << endl; + } + catch (TCLAP::ArgException &e) + { + cerr << "error: " << e.error() << " for arg " << e.argId() << endl; + exit(1); + } + + // Read in input training data and validation data + vector > input_train_data; + readSentFile(input_train_text, input_train_data); + if (add_start_stop) { + for (int i=0; i input_train_data_start_stop; + addStartStop(input_train_data[i], input_train_data_start_stop, ngram_size, "", ""); + input_train_data[i]=input_train_data_start_stop; + } + } + + vector > input_validation_data; + if (input_validation_text != "") { + readSentFile(input_validation_text, input_validation_data); + if (add_start_stop) { + for (int i=0; i input_validation_data_start_stop; + addStartStop(input_validation_data[i], input_validation_data_start_stop, ngram_size, "", ""); + input_validation_data[i]=input_validation_data_start_stop; + } + } + } + else if (validation_size > 0) + { + if (validation_size > input_train_data.size()) + { + cerr << "error: requested input_validation size is greater than training data size" << endl; + exit(1); + } + input_validation_data.insert(input_validation_data.end(), input_train_data.end()-validation_size, input_train_data.end()); + input_train_data.resize(input_train_data.size() - validation_size); + } + + // Read in output training data and validation data + vector > output_train_data; + readSentFile(output_train_text, output_train_data); + if (add_start_stop) { + for (int i=0; i output_train_data_start_stop; + addStartStop(output_train_data[i], output_train_data_start_stop, 1, "", ""); + output_train_data[i]=output_train_data_start_stop; + } + } + + vector > output_validation_data; + if (output_validation_text != "") { + readSentFile(output_validation_text, output_validation_data); + if (add_start_stop) { + for (int i=0; i output_validation_data_start_stop; + addStartStop(output_validation_data[i], output_validation_data_start_stop, 1, "", ""); + output_validation_data[i]=output_validation_data_start_stop; + } + } + } + else if (validation_size > 0) + { + if (validation_size > output_train_data.size()) + { + cerr << "error: requested output_validation size is greater than training data size" << endl; + exit(1); + } + output_validation_data.insert(output_validation_data.end(), output_train_data.end()-validation_size, output_train_data.end()); + output_train_data.resize(output_train_data.size() - validation_size); + } + + // Construct input vocabulary + vocabulary input_vocab; + int input_start = input_vocab.insert_word(""); + int input_stop = input_vocab.insert_word(""); + input_vocab.insert_word(""); + + // read input vocabulary from file + if (input_words_file != "") { + vector words; + readWordsFile(input_words_file,words); + for(vector::iterator it = words.begin(); it != words.end(); ++it) { + input_vocab.insert_word(*it); + } + // was input_vocab_size set? if so, verify that it does not conflict with size of vocabulary read from file + if (input_vocab_size > 0) { + if (input_vocab.size() != input_vocab_size) { + cerr << "Error: size of input_vocabulary file " << input_vocab.size() << " != --input_vocab_size " << input_vocab_size << endl; + } + } + // else, set it to the size of vocabulary read from file + else { + input_vocab_size = input_vocab.size(); + } + } + + // or construct input vocabulary to contain top most frequent words; all other words replaced by + else { + unordered_map count; + for (int i=0; i"); + int output_stop = output_vocab.insert_word(""); + output_vocab.insert_word(""); + + // read output vocabulary from file + if (output_words_file != "") { + vector words; + readWordsFile(output_words_file,words); + for(vector::iterator it = words.begin(); it != words.end(); ++it) { + output_vocab.insert_word(*it); + } + // was output_vocab_size set? if so, verify that it does not conflict with size of vocabulary read from file + if (output_vocab_size > 0) { + if (output_vocab.size() != output_vocab_size) { + cerr << "Error: size of output_vocabulary file " << output_vocab.size() << " != --output_vocab_size " << output_vocab_size << endl; + } + } + // else, set it to the size of vocabulary read from file + else { + output_vocab_size = output_vocab.size(); + } + } + + // or construct output vocabulary to contain top most frequent words; all other words replaced by + else { + unordered_map count; + for (int i=0; i input_layer_node; + Node first_hidden_linear_node; + Node first_hidden_activation_node; + Node second_hidden_linear_node; + Node second_hidden_activation_node; + Node output_layer_node; + +public: + propagator () : minibatch_size(0), pnn(0) { } + + propagator (model &nn, int minibatch_size) + : + pnn(&nn), + input_layer_node(&nn.input_layer, minibatch_size), + first_hidden_linear_node(&nn.first_hidden_linear, minibatch_size), + first_hidden_activation_node(&nn.first_hidden_activation, minibatch_size), + second_hidden_linear_node(&nn.second_hidden_linear, minibatch_size), + second_hidden_activation_node(&nn.second_hidden_activation, minibatch_size), + output_layer_node(&nn.output_layer, minibatch_size), + minibatch_size(minibatch_size) + { + } + + // This must be called if the underlying model is resized. + void resize(int minibatch_size) { + this->minibatch_size = minibatch_size; + input_layer_node.resize(minibatch_size); + first_hidden_linear_node.resize(minibatch_size); + first_hidden_activation_node.resize(minibatch_size); + second_hidden_linear_node.resize(minibatch_size); + second_hidden_activation_node.resize(minibatch_size); + output_layer_node.resize(minibatch_size); + } + + void resize() { resize(minibatch_size); } + + template + void fProp(const MatrixBase &data) + { + if (!pnn->premultiplied) + { + start_timer(0); + input_layer_node.param->fProp(data, input_layer_node.fProp_matrix); + stop_timer(0); + + start_timer(1); + first_hidden_linear_node.param->fProp(input_layer_node.fProp_matrix, + first_hidden_linear_node.fProp_matrix); + } + else + { + int n_inputs = first_hidden_linear_node.param->n_inputs(); + USCMatrix sparse_data; + input_layer_node.param->munge(data, sparse_data); + + start_timer(1); + first_hidden_linear_node.param->fProp(sparse_data, + first_hidden_linear_node.fProp_matrix); + } + first_hidden_activation_node.param->fProp(first_hidden_linear_node.fProp_matrix, + first_hidden_activation_node.fProp_matrix); + stop_timer(1); + + + start_timer(2); + second_hidden_linear_node.param->fProp(first_hidden_activation_node.fProp_matrix, + second_hidden_linear_node.fProp_matrix); + second_hidden_activation_node.param->fProp(second_hidden_linear_node.fProp_matrix, + second_hidden_activation_node.fProp_matrix); + stop_timer(2); + + // The propagation stops here because the last layer is very expensive. + } + + // Dense version (for standard log-likelihood) + template + void bProp(const MatrixBase &data, + const MatrixBase &output, + double learning_rate, double momentum, double L2_reg) + { + // Output embedding layer + + start_timer(7); + output_layer_node.param->bProp(output, + output_layer_node.bProp_matrix); + stop_timer(7); + + start_timer(8); + output_layer_node.param->computeGradient(second_hidden_activation_node.fProp_matrix, + output, + learning_rate, momentum); + stop_timer(8); + + bPropRest(data, learning_rate, momentum, L2_reg); + } + + // Sparse version (for NCE log-likelihood) + template + void bProp(const MatrixBase &data, + const MatrixBase &samples, const MatrixBase &weights, + double learning_rate, double momentum, double L2_reg) + { + + // Output embedding layer + + start_timer(7); + output_layer_node.param->bProp(samples, weights, + output_layer_node.bProp_matrix); + stop_timer(7); + + + start_timer(8); + output_layer_node.param->computeGradient(second_hidden_activation_node.fProp_matrix, + samples, weights, + learning_rate, momentum); + stop_timer(8); + + bPropRest(data, learning_rate, momentum, L2_reg); + } + +private: + template + void bPropRest(const MatrixBase &data, + double learning_rate, double momentum, double L2_reg) + { + // Second hidden layer + + start_timer(9); + second_hidden_activation_node.param->bProp(output_layer_node.bProp_matrix, + second_hidden_activation_node.bProp_matrix, + second_hidden_linear_node.fProp_matrix, + second_hidden_activation_node.fProp_matrix); + + second_hidden_linear_node.param->bProp(second_hidden_activation_node.bProp_matrix, + second_hidden_linear_node.bProp_matrix); + stop_timer(9); + + start_timer(10); + second_hidden_linear_node.param->computeGradient(second_hidden_activation_node.bProp_matrix, + first_hidden_activation_node.fProp_matrix, + learning_rate, momentum, L2_reg); + stop_timer(10); + + // First hidden layer + + start_timer(11); + first_hidden_activation_node.param->bProp(second_hidden_linear_node.bProp_matrix, + first_hidden_activation_node.bProp_matrix, + first_hidden_linear_node.fProp_matrix, + first_hidden_activation_node.fProp_matrix); + + first_hidden_linear_node.param->bProp(first_hidden_activation_node.bProp_matrix, + first_hidden_linear_node.bProp_matrix); + stop_timer(11); + + start_timer(12); + first_hidden_linear_node.param->computeGradient(first_hidden_activation_node.bProp_matrix, + input_layer_node.fProp_matrix, + learning_rate, momentum, L2_reg); + stop_timer(12); + + // Input word embeddings + + start_timer(13); + input_layer_node.param->computeGradient(first_hidden_linear_node.bProp_matrix, + data, + learning_rate, momentum, L2_reg); + stop_timer(13); + + } +}; + +} // namespace nplm + +#endif diff --git a/src/python/nplm.pxd b/src/python/nplm.pxd new file mode 100644 index 0000000..5cbead7 --- /dev/null +++ b/src/python/nplm.pxd @@ -0,0 +1,23 @@ +from libcpp.string cimport string +from libcpp.vector cimport vector + +cdef extern from "neuralLM.h": + cdef cppclass c_neuralLM "nplm::neuralLM": + c_neuralLM() + void set_normalization(bint) + void set_map_digits(char) + void set_log_base(double) + void read(string filename) except + + int get_order() + int lookup_word(string) + float lookup_ngram(vector[int]) + float lookup_ngram(int *, int) + void set_cache(int) + double cache_hit_rate() + +cdef class NeuralLM: + cdef c_neuralLM *thisptr + cdef int c_lookup_word(self, char *s) + cdef float c_lookup_ngram(self, int *words, int n) + cdef readonly int order + diff --git a/src/python/nplm.pyx b/src/python/nplm.pyx new file mode 100644 index 0000000..290d56c --- /dev/null +++ b/src/python/nplm.pyx @@ -0,0 +1,38 @@ +# distutils: language = c++ + +cdef class NeuralLM: + def __cinit__(self, normalization=False, map_digits=None, cache_size=0): + self.thisptr = new c_neuralLM() + self.thisptr.set_normalization(normalization) + self.thisptr.set_log_base(10.) + if type(map_digits) is str and len(map_digits) == 1: + self.thisptr.set_map_digits(map_digits) + if cache_size: + self.thisptr.set_cache(cache_size) + + def read(self, filename): + self.thisptr.read(filename) + self.order = self.thisptr.get_order() + + def get_order(self): + return self.thisptr.get_order() + + def lookup_word(self, s): + return self.thisptr.lookup_word(s) + + def lookup_ngram(self, words): + if len(words) == 0: + raise ValueError("ngram is empty") + return self.thisptr.lookup_ngram(words) + + def cache_hit_rate(self): + return self.thisptr.cache_hit_rate() + + # low-level interface that can be called by other Cython modules + cdef int c_lookup_word(self, char *s): + cdef string ss + ss.assign(s) + return self.thisptr.lookup_word(ss) + + cdef float c_lookup_ngram(self, int *words, int n): + return self.thisptr.lookup_ngram(words, n) diff --git a/src/shared/.gitignore b/src/shared/.gitignore new file mode 100755 index 0000000..e69de29 diff --git a/src/testNeuralLM.cpp b/src/testNeuralLM.cpp new file mode 100644 index 0000000..9ab3766 --- /dev/null +++ b/src/testNeuralLM.cpp @@ -0,0 +1,164 @@ +#include +#include + +#include +#include + +#include +#include + +#include "param.h" + +#include "neuralLM.h" + +using namespace std; +using namespace boost; +using namespace TCLAP; +using namespace Eigen; + +using namespace nplm; + +int main (int argc, char *argv[]) +{ + param myParam; + bool normalization; + bool numberize, ngramize, add_start_stop; + + try { + // program options // + CmdLine cmd("Tests a two-layer neural probabilistic language model.", ' ' , "0.1"); + + ValueArg num_threads("", "num_threads", "Number of threads. Default: maximum.", false, 0, "int", cmd); + ValueArg minibatch_size("", "minibatch_size", "Minibatch size. Default: none.", false, 0, "int", cmd); + + ValueArg arg_ngramize("", "ngramize", "If true, convert lines to ngrams. Default: true.", false, true, "bool", cmd); + ValueArg arg_numberize("", "numberize", "If true, convert words to numbers. Default: true.", false, true, "bool", cmd); + ValueArg arg_add_start_stop("", "add_start_stop", "If true, prepend and append . Default: true.", false, true, "bool", cmd); + + ValueArg arg_normalization("", "normalization", "Normalize probabilities. 1 = yes, 0 = no. Default: 0.", false, 0, "bool", cmd); + + ValueArg arg_test_file("", "test_file", "Test file (one tokenized sentence per line).", true, "", "string", cmd); + + ValueArg arg_model_file("", "model_file", "Language model file.", true, "", "string", cmd); + + cmd.parse(argc, argv); + + myParam.model_file = arg_model_file.getValue(); + myParam.test_file = arg_test_file.getValue(); + + normalization = arg_normalization.getValue(); + numberize = arg_numberize.getValue(); + ngramize = arg_ngramize.getValue(); + add_start_stop = arg_add_start_stop.getValue(); + + myParam.minibatch_size = minibatch_size.getValue(); + myParam.num_threads = num_threads.getValue(); + + cerr << "Command line: " << endl; + cerr << boost::algorithm::join(vector(argv, argv+argc), " ") << endl; + + const string sep(" Value: "); + cerr << arg_test_file.getDescription() << sep << arg_test_file.getValue() << endl; + cerr << arg_model_file.getDescription() << sep << arg_model_file.getValue() << endl; + + cerr << arg_normalization.getDescription() << sep << arg_normalization.getValue() << endl; + cerr << arg_ngramize.getDescription() << sep << arg_ngramize.getValue() << endl; + cerr << arg_add_start_stop.getDescription() << sep << arg_add_start_stop.getValue() << endl; + + cerr << minibatch_size.getDescription() << sep << minibatch_size.getValue() << endl; + cerr << num_threads.getDescription() << sep << num_threads.getValue() << endl; + } + catch (TCLAP::ArgException &e) + { + cerr << "error: " << e.error() << " for arg " << e.argId() << endl; + exit(1); + } + + myParam.num_threads = setup_threads(myParam.num_threads); + + ///// Create language model + + neuralLM lm; + lm.read(myParam.model_file); + lm.set_normalization(normalization); + lm.set_log_base(10); + lm.set_cache(1048576); + int ngram_size = lm.get_order(); + int minibatch_size = myParam.minibatch_size; + if (minibatch_size) + lm.set_width(minibatch_size); + + ///// Read test data + + double log_likelihood = 0.0; + + ifstream test_file(myParam.test_file.c_str()); + if (!test_file) + { + cerr << "error: could not open " << myParam.test_file << endl; + exit(1); + } + string line; + + vector start; + vector > ngrams; + + while (getline(test_file, line)) + { + vector words; + splitBySpace(line, words); + + vector > sent_ngrams; + preprocessWords(words, sent_ngrams, ngram_size, lm.get_vocabulary(), numberize, add_start_stop, ngramize); + + start.push_back(ngrams.size()); + copy(sent_ngrams.begin(), sent_ngrams.end(), back_inserter(ngrams)); + } + start.push_back(ngrams.size()); + + if (minibatch_size == 0) + { + // Score one n-gram at a time. This is how the LM would be queried from a decoder. + for (int sent_id=0; sent_id log_probs(ngrams.size()); + + Matrix minibatch(ngram_size, minibatch_size); + minibatch.setZero(); + for (int test_id = 0; test_id < ngrams.size(); test_id += minibatch_size) + { + int current_minibatch_size = minibatch_size > (ngrams[test_id+j].data(), ngram_size); + lm.lookup_ngram(minibatch.leftCols(current_minibatch_size), log_probs.middleCols(test_id, current_minibatch_size)); + } + + for (int sent_id=0; sent_id +#include +#include +#include + +#include "model.h" +#include "propagator.h" +#include "neuralClasses.h" +#include "param.h" +#include "util.h" + +using namespace std; +using namespace boost; +using namespace TCLAP; +using namespace Eigen; + +using namespace nplm; + +int main (int argc, char *argv[]) +{ + param myParam; + + try { + // program options // + CmdLine cmd("Tests a two-layer neural probabilistic language model.", ' ' , "0.1"); + + ValueArg num_threads("", "num_threads", "Number of threads. Default: maximum.", false, 0, "int", cmd); + ValueArg minibatch_size("", "minibatch_size", "Minibatch size. Default: 64.", false, 64, "int", cmd); + + ValueArg arg_test_file("", "test_file", "Test file (one numberized example per line).", true, "", "string", cmd); + + ValueArg arg_model_file("", "model_file", "Model file.", true, "", "string", cmd); + + cmd.parse(argc, argv); + + myParam.model_file = arg_model_file.getValue(); + myParam.test_file = arg_test_file.getValue(); + + myParam.num_threads = num_threads.getValue(); + myParam.minibatch_size = minibatch_size.getValue(); + + cerr << "Command line: " << endl; + cerr << boost::algorithm::join(vector(argv, argv+argc), " ") << endl; + + const string sep(" Value: "); + cerr << arg_model_file.getDescription() << sep << arg_model_file.getValue() << endl; + cerr << arg_test_file.getDescription() << sep << arg_test_file.getValue() << endl; + + cerr << num_threads.getDescription() << sep << num_threads.getValue() << endl; + } + catch (TCLAP::ArgException &e) + { + cerr << "error: " << e.error() << " for arg " << e.argId() << endl; + exit(1); + } + + myParam.num_threads = setup_threads(myParam.num_threads); + + ///// Create network and propagator + + model nn; + nn.read(myParam.model_file); + myParam.ngram_size = nn.ngram_size; + propagator prop(nn, myParam.minibatch_size); + + ///// Set param values according to what was read in from model file + + myParam.ngram_size = nn.ngram_size; + myParam.input_vocab_size = nn.input_vocab_size; + myParam.output_vocab_size = nn.output_vocab_size; + myParam.num_hidden = nn.num_hidden; + myParam.input_embedding_dimension = nn.input_embedding_dimension; + myParam.output_embedding_dimension = nn.output_embedding_dimension; + + ///// Read test data + + vector test_data_flat; + readDataFile(myParam.test_file, myParam.ngram_size, test_data_flat); + int test_data_size = test_data_flat.size() / myParam.ngram_size; + cerr << "Number of test instances: " << test_data_size << endl; + + Map< Matrix > test_data(test_data_flat.data(), myParam.ngram_size, test_data_size); + + ///// Score test data + + int num_batches = (test_data_size-1)/myParam.minibatch_size + 1; + cerr<<"Number of test minibatches: "< scores(nn.output_vocab_size, myParam.minibatch_size); + Matrix output_probs(nn.output_vocab_size, myParam.minibatch_size); + + for (int batch = 0; batch < num_batches; batch++) + { + int minibatch_start_index = myParam.minibatch_size * batch; + int current_minibatch_size = min(myParam.minibatch_size, + test_data_size - minibatch_start_index); + Matrix minibatch = test_data.middleCols(minibatch_start_index, current_minibatch_size); + + prop.fProp(minibatch.topRows(myParam.ngram_size-1)); + + // Do full forward prop through output word embedding layer + prop.output_layer_node.param->fProp(prop.second_hidden_activation_node.fProp_matrix, scores); + + // And softmax and loss + double minibatch_log_likelihood; + SoftmaxLogLoss().fProp(scores.leftCols(current_minibatch_size), + minibatch.row(myParam.ngram_size-1), + output_probs, + minibatch_log_likelihood); + log_likelihood += minibatch_log_likelihood; + + /*for (int i=0; i +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include "maybe_omp.h" +#include + +#include "model.h" +#include "propagator.h" +#include "param.h" +#include "neuralClasses.h" +#include "graphClasses.h" +#include "util.h" +#include "multinomial.h" +//#include "gradientCheck.h" + +//#define EIGEN_DONT_PARALLELIZE + +using namespace std; +using namespace TCLAP; +using namespace Eigen; +using namespace boost; +using namespace boost::random; + +using namespace nplm; + +typedef unordered_map, double> vector_map; + +typedef long long int data_size_t; // training data can easily exceed 2G instances + +int main(int argc, char** argv) +{ + param myParam; + try { + // program options // + CmdLine cmd("Trains a two-layer neural probabilistic language model.", ' ' , "0.1"); + + // The options are printed in reverse order + + ValueArg unigram_probs_file("", "unigram_probs_file", "Unigram model (deprecated and ignored)." , false, "", "string", cmd); + + ValueArg num_threads("", "num_threads", "Number of threads. Default: maximum.", false, 0, "int", cmd); + + ValueArg final_momentum("", "final_momentum", "Final value of momentum. Default: 0.9.", false, 0.9, "double", cmd); + ValueArg initial_momentum("", "initial_momentum", "Initial value of momentum. Default: 0.9.", false, 0.9, "double", cmd); + ValueArg use_momentum("", "use_momentum", "Use momentum (hidden layer weights only). 1 = yes, 0 = no. Default: 0.", false, 0, "bool", cmd); + + ValueArg normalization_init("", "normalization_init", "Initial normalization parameter. Default: 0.", false, 0.0, "double", cmd); + ValueArg normalization("", "normalization", "Learn individual normalization factors during training. 1 = yes, 0 = no. Default: 0.", false, 0, "bool", cmd); + + ValueArg num_noise_samples("", "num_noise_samples", "Number of noise samples for noise-contrastive estimation. Default: 25.", false, 25, "int", cmd); + + ValueArg L2_reg("", "L2_reg", "L2 regularization strength (hidden layer weights only). Default: 0.", false, 0.0, "double", cmd); + + ValueArg learning_rate("", "learning_rate", "Learning rate for stochastic gradient ascent. Default: 0.01.", false, 0.01, "double", cmd); + + ValueArg validation_minibatch_size("", "validation_minibatch_size", "Minibatch size for validation. Default: 64.", false, 64, "int", cmd); + ValueArg minibatch_size("", "minibatch_size", "Minibatch size (for training). Default: 64.", false, 64, "int", cmd); + + ValueArg num_epochs("", "num_epochs", "Number of epochs. Default: 10.", false, 10, "int", cmd); + + ValueArg init_range("", "init_range", "Maximum (of uniform) or standard deviation (of normal) for initialization. Default: 0.01", false, 0.01, "double", cmd); + ValueArg init_normal("", "init_normal", "Initialize parameters from a normal distribution. 1 = normal, 0 = uniform. Default: 0.", false, 0, "bool", cmd); + + ValueArg loss_function("", "loss_function", "Loss function (log, nce). Default: nce.", false, "nce", "string", cmd); + ValueArg activation_function("", "activation_function", "Activation function (identity, rectifier, tanh, hardtanh). Default: rectifier.", false, "rectifier", "string", cmd); + ValueArg num_hidden("", "num_hidden", "Number of hidden nodes. Default: 100.", false, 100, "int", cmd); + + ValueArg share_embeddings("", "share_embeddings", "Share input and output embeddings. 1 = yes, 0 = no. Default: 0.", false, 0, "bool", cmd); + ValueArg output_embedding_dimension("", "output_embedding_dimension", "Number of output embedding dimensions. Default: 50.", false, 50, "int", cmd); + ValueArg input_embedding_dimension("", "input_embedding_dimension", "Number of input embedding dimensions. Default: 50.", false, 50, "int", cmd); + ValueArg embedding_dimension("", "embedding_dimension", "Number of input and output embedding dimensions. Default: none.", false, -1, "int", cmd); + + ValueArg vocab_size("", "vocab_size", "Vocabulary size. Default: auto.", false, 0, "int", cmd); + ValueArg input_vocab_size("", "input_vocab_size", "Vocabulary size. Default: auto.", false, 0, "int", cmd); + ValueArg output_vocab_size("", "output_vocab_size", "Vocabulary size. Default: auto.", false, 0, "int", cmd); + ValueArg ngram_size("", "ngram_size", "Size of n-grams. Default: auto.", false, 0, "int", cmd); + + ValueArg model_prefix("", "model_prefix", "Prefix for output model files." , false, "", "string", cmd); + ValueArg words_file("", "words_file", "Vocabulary." , false, "", "string", cmd); + ValueArg input_words_file("", "input_words_file", "Vocabulary." , false, "", "string", cmd); + ValueArg output_words_file("", "output_words_file", "Vocabulary." , false, "", "string", cmd); + ValueArg validation_file("", "validation_file", "Validation data (one numberized example per line)." , false, "", "string", cmd); + ValueArg train_file("", "train_file", "Training data (one numberized example per line)." , true, "", "string", cmd); + + cmd.parse(argc, argv); + + // define program parameters // + myParam.train_file = train_file.getValue(); + myParam.validation_file = validation_file.getValue(); + myParam.input_words_file = input_words_file.getValue(); + myParam.output_words_file = output_words_file.getValue(); + if (words_file.getValue() != "") + myParam.input_words_file = myParam.output_words_file = words_file.getValue(); + + myParam.model_prefix = model_prefix.getValue(); + + myParam.ngram_size = ngram_size.getValue(); + myParam.vocab_size = vocab_size.getValue(); + myParam.input_vocab_size = input_vocab_size.getValue(); + myParam.output_vocab_size = output_vocab_size.getValue(); + if (vocab_size.getValue() >= 0) + myParam.input_vocab_size = myParam.output_vocab_size = vocab_size.getValue(); + + myParam.num_hidden = num_hidden.getValue(); + myParam.activation_function = activation_function.getValue(); + myParam.loss_function = loss_function.getValue(); + + myParam.num_threads = num_threads.getValue(); + + myParam.num_noise_samples = num_noise_samples.getValue(); + + myParam.input_embedding_dimension = input_embedding_dimension.getValue(); + myParam.output_embedding_dimension = output_embedding_dimension.getValue(); + if (embedding_dimension.getValue() >= 0) + myParam.input_embedding_dimension = myParam.output_embedding_dimension = embedding_dimension.getValue(); + + myParam.minibatch_size = minibatch_size.getValue(); + myParam.validation_minibatch_size = validation_minibatch_size.getValue(); + myParam.num_epochs= num_epochs.getValue(); + myParam.learning_rate = learning_rate.getValue(); + myParam.use_momentum = use_momentum.getValue(); + myParam.share_embeddings = share_embeddings.getValue(); + myParam.normalization = normalization.getValue(); + myParam.initial_momentum = initial_momentum.getValue(); + myParam.final_momentum = final_momentum.getValue(); + myParam.L2_reg = L2_reg.getValue(); + myParam.init_normal= init_normal.getValue(); + myParam.init_range = init_range.getValue(); + myParam.normalization_init = normalization_init.getValue(); + + cerr << "Command line: " << endl; + cerr << boost::algorithm::join(vector(argv, argv+argc), " ") << endl; + + const string sep(" Value: "); + cerr << train_file.getDescription() << sep << train_file.getValue() << endl; + cerr << validation_file.getDescription() << sep << validation_file.getValue() << endl; + cerr << input_words_file.getDescription() << sep << input_words_file.getValue() << endl; + cerr << output_words_file.getDescription() << sep << output_words_file.getValue() << endl; + cerr << model_prefix.getDescription() << sep << model_prefix.getValue() << endl; + + cerr << ngram_size.getDescription() << sep << ngram_size.getValue() << endl; + cerr << input_vocab_size.getDescription() << sep << input_vocab_size.getValue() << endl; + cerr << output_vocab_size.getDescription() << sep << output_vocab_size.getValue() << endl; + + if (embedding_dimension.getValue() >= 0) + { + cerr << embedding_dimension.getDescription() << sep << embedding_dimension.getValue() << endl; + } + else + { + cerr << input_embedding_dimension.getDescription() << sep << input_embedding_dimension.getValue() << endl; + cerr << output_embedding_dimension.getDescription() << sep << output_embedding_dimension.getValue() << endl; + } + cerr << share_embeddings.getDescription() << sep << share_embeddings.getValue() << endl; + if (share_embeddings.getValue() && input_embedding_dimension.getValue() != output_embedding_dimension.getValue()) + { + cerr << "error: sharing input and output embeddings requires that input and output embeddings have same dimension" << endl; + exit(1); + } + + cerr << num_hidden.getDescription() << sep << num_hidden.getValue() << endl; + + if (string_to_activation_function(activation_function.getValue()) == InvalidFunction) + { + cerr << "error: invalid activation function: " << activation_function.getValue() << endl; + exit(1); + } + cerr << activation_function.getDescription() << sep << activation_function.getValue() << endl; + + if (string_to_loss_function(loss_function.getValue()) == InvalidLoss) + { + cerr << "error: invalid loss function: " << loss_function.getValue() << endl; + exit(1); + } + cerr << loss_function.getDescription() << sep << loss_function.getValue() << endl; + + cerr << init_normal.getDescription() << sep << init_normal.getValue() << endl; + cerr << init_range.getDescription() << sep << init_range.getValue() << endl; + + cerr << num_epochs.getDescription() << sep << num_epochs.getValue() << endl; + cerr << minibatch_size.getDescription() << sep << minibatch_size.getValue() << endl; + if (myParam.validation_file != "") + cerr << validation_minibatch_size.getDescription() << sep << validation_minibatch_size.getValue() << endl; + cerr << learning_rate.getDescription() << sep << learning_rate.getValue() << endl; + cerr << L2_reg.getDescription() << sep << L2_reg.getValue() << endl; + + cerr << num_noise_samples.getDescription() << sep << num_noise_samples.getValue() << endl; + + cerr << normalization.getDescription() << sep << normalization.getValue() << endl; + if (myParam.normalization) + cerr << normalization_init.getDescription() << sep << normalization_init.getValue() << endl; + + cerr << use_momentum.getDescription() << sep << use_momentum.getValue() << endl; + if (myParam.use_momentum) + { + cerr << initial_momentum.getDescription() << sep << initial_momentum.getValue() << endl; + cerr << final_momentum.getDescription() << sep << final_momentum.getValue() << endl; + } + + cerr << num_threads.getDescription() << sep << num_threads.getValue() << endl; + + if (unigram_probs_file.getValue() != "") + { + cerr << "Note: --unigram_probs_file is deprecated and ignored." << endl; + } + } + catch (TCLAP::ArgException &e) + { + cerr << "error: " << e.error() << " for arg " << e.argId() << endl; + exit(1); + } + + myParam.num_threads = setup_threads(myParam.num_threads); + int save_threads; + + //unsigned seed = std::time(0); + unsigned seed = 1234; //for testing only + mt19937 rng(seed); + + /////////////////////////READING IN THE TRAINING AND VALIDATION DATA/////////////////// + ///////////////////////////////////////////////////////////////////////////////////// + + // Read training data + vector training_data_flat; + readDataFile(myParam.train_file, myParam.ngram_size, training_data_flat, myParam.minibatch_size); + data_size_t training_data_size = training_data_flat.size() / myParam.ngram_size; + cerr << "Number of training instances: "<< training_data_size << endl; + + Map< Matrix > training_data(training_data_flat.data(), myParam.ngram_size, training_data_size); + + // If neither --input_vocab_size nor --input_words_file is given, set input_vocab_size to the maximum word index + if (myParam.input_vocab_size == 0 and myParam.input_words_file == "") + { + myParam.input_vocab_size = training_data.topRows(myParam.ngram_size-1).maxCoeff()+1; + } + + // If neither --output_vocab_size nor --output_words_file is given, set output_vocab_size to the maximum word index + if (myParam.output_vocab_size == 0 and myParam.words_file == "") + { + myParam.output_vocab_size = training_data.row(myParam.ngram_size-1).maxCoeff()+1; + } + + // Randomly shuffle training data to improve learning + for (data_size_t i=training_data_size-1; i>0; i--) + { + data_size_t j = uniform_int_distribution(0, i-1)(rng); + training_data.col(i).swap(training_data.col(j)); + } + + // Read validation data + vector validation_data_flat; + int validation_data_size = 0; + + if (myParam.validation_file != "") + { + readDataFile(myParam.validation_file, myParam.ngram_size, validation_data_flat); + validation_data_size = validation_data_flat.size() / myParam.ngram_size; + cerr << "Number of validation instances: " << validation_data_size << endl; + } + + Map< Matrix > validation_data(validation_data_flat.data(), myParam.ngram_size, validation_data_size); + + ///// Read in vocabulary file. We don't actually use it; it just gets reproduced in the output file + + vector input_words; + if (myParam.input_words_file != "") + { + readWordsFile(myParam.input_words_file, input_words); + if (myParam.input_vocab_size == 0) + myParam.input_vocab_size = input_words.size(); + } + + vector output_words; + if (myParam.output_words_file != "") + { + readWordsFile(myParam.output_words_file, output_words); + if (myParam.output_vocab_size == 0) + myParam.output_vocab_size = output_words.size(); + } + + ///// Construct unigram model and sampler that will be used for NCE + + vector unigram_counts(myParam.output_vocab_size); + for (data_size_t train_id=0; train_id < training_data_size; train_id++) + { + int output_word = training_data(myParam.ngram_size-1, train_id); + unigram_counts[output_word] += 1; + } + multinomial unigram (unigram_counts); + + ///// Create and initialize the neural network and associated propagators. + + model nn(myParam.ngram_size, + myParam.input_vocab_size, + myParam.output_vocab_size, + myParam.input_embedding_dimension, + myParam.num_hidden, + myParam.output_embedding_dimension, + myParam.share_embeddings); + + nn.initialize(rng, myParam.init_normal, myParam.init_range, -log(myParam.output_vocab_size)); + nn.set_activation_function(string_to_activation_function(myParam.activation_function)); + loss_function_type loss_function = string_to_loss_function(myParam.loss_function); + + propagator prop(nn, myParam.minibatch_size); + propagator prop_validation(nn, myParam.validation_minibatch_size); + SoftmaxNCELoss > softmax_loss(unigram); + // normalization parameters + vector_map c_h, c_h_running_gradient; + + ///////////////////////TRAINING THE NEURAL NETWORK//////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////// + + data_size_t num_batches = (training_data_size-1)/myParam.minibatch_size + 1; + cerr<<"Number of training minibatches: "< 0) + { + num_validation_batches = (validation_data_size-1)/myParam.validation_minibatch_size+1; + cerr<<"Number of validation minibatches: "< context = training_data.block(0,i,ngram_size-1,1); + if (c_h.find(context) == c_h.end()) + { + c_h[context] = -myParam.normalization_init; + } + } + } + + for (int epoch=0; epoch minibatch_weights(num_samples, minibatch_size); + Matrix minibatch_samples(num_samples, minibatch_size); + Matrix scores(num_samples, minibatch_size); + Matrix probs(num_samples, minibatch_size); + + for(data_size_t batch=0;batch 0 && batch % 10000 == 0) + { + cerr << batch <<"..."; + } + + data_size_t minibatch_start_index = minibatch_size * batch; + int current_minibatch_size = min(static_cast(minibatch_size), training_data_size - minibatch_start_index); + Matrix minibatch = training_data.middleCols(minibatch_start_index, current_minibatch_size); + + double adjusted_learning_rate = current_learning_rate/current_minibatch_size; + //cerr<<"Adjusted learning rate: "<fProp(prop.second_hidden_activation_node.fProp_matrix, + minibatch_samples, scores); + stop_timer(4); + + // Apply normalization parameters + if (myParam.normalization) + { + for (int train_id = 0;train_id < current_minibatch_size;train_id++) + { + Matrix context = minibatch.block(0, train_id, ngram_size-1, 1); + scores.col(train_id).array() += c_h[context]; + } + } + + double minibatch_log_likelihood; + start_timer(5); + softmax_loss.fProp(scores.leftCols(current_minibatch_size), + minibatch_samples, + probs, minibatch_log_likelihood); + stop_timer(5); + log_likelihood += minibatch_log_likelihood; + + ///// Backward propagation + + start_timer(6); + softmax_loss.bProp(probs, minibatch_weights); + stop_timer(6); + + // Update the normalization parameters + + if (myParam.normalization) + { + for (int train_id = 0;train_id < current_minibatch_size;train_id++) + { + Matrix context = minibatch.block(0, train_id, ngram_size-1, 1); + c_h[context] += adjusted_learning_rate * minibatch_weights.col(train_id).sum(); + } + } + + // Be careful of short minibatch + prop.bProp(minibatch.topRows(ngram_size-1), + minibatch_samples.leftCols(current_minibatch_size), + minibatch_weights.leftCols(current_minibatch_size), + adjusted_learning_rate, current_momentum, myParam.L2_reg); + } + else if (loss_function == LogLoss) + { + ///// Standard log-likelihood + start_timer(4); + prop.output_layer_node.param->fProp(prop.second_hidden_activation_node.fProp_matrix, scores); + stop_timer(4); + + double minibatch_log_likelihood; + start_timer(5); + SoftmaxLogLoss().fProp(scores.leftCols(current_minibatch_size), + minibatch.row(ngram_size-1), + probs, + minibatch_log_likelihood); + stop_timer(5); + log_likelihood += minibatch_log_likelihood; + + ///// Backward propagation + + start_timer(6); + SoftmaxLogLoss().bProp(minibatch.row(ngram_size-1).leftCols(current_minibatch_size), + probs.leftCols(current_minibatch_size), + minibatch_weights); + stop_timer(6); + + prop.bProp(minibatch.topRows(ngram_size-1).leftCols(current_minibatch_size), + minibatch_weights, + adjusted_learning_rate, current_momentum, myParam.L2_reg); + } + } + cerr << "done." << endl; + + if (loss_function == LogLoss) + { + cerr << "Training log-likelihood: " << log_likelihood << endl; + cerr << " perplexity: "<< exp(-log_likelihood/training_data_size) << endl; + } + else if (loss_function == NCELoss) + cerr << "Training NCE log-likelihood: " << log_likelihood << endl; + + current_momentum += momentum_delta; + + #ifdef USE_CHRONO + cerr << "Propagation times:"; + for (int i=0; i(epoch+1), input_words, output_words); + else + nn.write(myParam.model_prefix + "." + lexical_cast(epoch+1)); + } + + if (epoch % 1 == 0 && validation_data_size > 0) + { + //////COMPUTING VALIDATION SET PERPLEXITY/////////////////////// + //////////////////////////////////////////////////////////////// + + double log_likelihood = 0.0; + + Matrix scores(output_vocab_size, validation_minibatch_size); + Matrix output_probs(output_vocab_size, validation_minibatch_size); + Matrix minibatch(ngram_size, validation_minibatch_size); + + for (int validation_batch =0;validation_batch < num_validation_batches;validation_batch++) + { + int validation_minibatch_start_index = validation_minibatch_size * validation_batch; + int current_minibatch_size = min(validation_minibatch_size, + validation_data_size - validation_minibatch_start_index); + minibatch.leftCols(current_minibatch_size) = validation_data.middleCols(validation_minibatch_start_index, + current_minibatch_size); + prop_validation.fProp(minibatch.topRows(ngram_size-1)); + + // Do full forward prop through output word embedding layer + start_timer(4); + prop_validation.output_layer_node.param->fProp(prop_validation.second_hidden_activation_node.fProp_matrix, scores); + stop_timer(4); + + // And softmax and loss. Be careful of short minibatch + double minibatch_log_likelihood; + start_timer(5); + SoftmaxLogLoss().fProp(scores.leftCols(current_minibatch_size), + minibatch.row(ngram_size-1), + output_probs, + minibatch_log_likelihood); + stop_timer(5); + log_likelihood += minibatch_log_likelihood; + } + + cerr << "Validation log-likelihood: "<< log_likelihood << endl; + cerr << " perplexity: "<< exp(-log_likelihood/validation_data_size) << endl; + + // If the validation perplexity decreases, halve the learning rate. + if (epoch > 0 && log_likelihood < current_validation_ll) + { + current_learning_rate /= 2; + } + current_validation_ll = log_likelihood; + } + + } + return 0; +} diff --git a/src/util.cpp b/src/util.cpp new file mode 100644 index 0000000..fe022c9 --- /dev/null +++ b/src/util.cpp @@ -0,0 +1,213 @@ +#include +#include +#include +#include + +#include +#include + +#include "maybe_omp.h" +#ifdef EIGEN_USE_MKL_ALL +#include +#endif + +#include "util.h" + +extern double drand48(); + +using namespace Eigen; +using namespace std; +using namespace boost::random; + +namespace nplm +{ + +void splitBySpace(const std::string &line, std::vector &items) +{ + string copy(line); + boost::trim_if(copy, boost::is_any_of(" \t")); + if (copy == "") + { + items.clear(); + return; + } + boost::split(items, copy, boost::is_any_of(" \t"), boost::token_compress_on); +} + +void readWordsFile(ifstream &TRAININ, vector &word_list) +{ + string line; + while (getline(TRAININ, line) && line != "") + { + vector words; + splitBySpace(line, words); + if (words.size() != 1) + { + cerr << "Error: vocabulary file must have only one word per line" << endl; + exit(-1); + } + word_list.push_back(words[0]); + } +} + +void readWordsFile(const string &file, vector &word_list) +{ + cerr << "Reading word list from: " << file<< endl; + + ifstream TRAININ; + TRAININ.open(file.c_str()); + if (! TRAININ) + { + cerr << "Error: can't read word list from file " << file<< endl; + exit(-1); + } + + readWordsFile(TRAININ, word_list); + TRAININ.close(); +} + +void writeWordsFile(const vector &words, ofstream &file) +{ + for (int i=0; i &words, const string &filename) +{ + ofstream OUT; + OUT.open(filename.c_str()); + if (! OUT) + { + cerr << "Error: can't write to file " << filename << endl; + exit(-1); + } + writeWordsFile(words, OUT); + OUT.close(); +} + +void readSentFile(const string &file, vector > &sentences) +{ + cerr << "Reading sentences from: " << file << endl; + + ifstream TRAININ; + TRAININ.open(file.c_str()); + if (! TRAININ) + { + cerr << "Error: can't read from file " << file<< endl; + exit(-1); + } + + string line; + while (getline(TRAININ, line)) + { + vector words; + splitBySpace(line, words); + sentences.push_back(words); + } + + TRAININ.close(); +} + +// Read a data file of unknown size into a flat vector. +// If this takes too much memory, we should create a vector of minibatches. +void readDataFile(const string &filename, int &ngram_size, vector &data, int minibatch_size) +{ + cerr << "Reading minibatches from file " << filename << ": "; + + ifstream DATAIN(filename.c_str()); + if (!DATAIN) + { + cerr << "Error: can't read data from file " << filename<< endl; + exit(-1); + } + + vector data_vector; + + string line; + long long int n_lines = 0; + while (getline(DATAIN, line)) + { + vector ngram; + splitBySpace(line, ngram); + + if (ngram_size == 0) + ngram_size = ngram.size(); + + if (ngram.size() != ngram_size) + { + cerr << "Error: expected " << ngram_size << " fields in instance, found " << ngram.size() << endl; + exit(-1); + } + + for (int i=0;i(ngram[i])); + + n_lines++; + if (minibatch_size && n_lines % (minibatch_size * 10000) == 0) + cerr << n_lines/minibatch_size << "..."; + } + cerr << "done." << endl; + DATAIN.close(); +} + +double logadd(double x, double y) +{ + if (x > y) + return x + log1p(std::exp(y-x)); + else + return y + log1p(std::exp(x-y)); +} + +#ifdef USE_CHRONO +void Timer::start(int i) +{ + m_start[i] = clock_type::now(); +} + +void Timer::stop(int i) +{ + m_total[i] += clock_type::now() - m_start[i]; +} + +void Timer::reset(int i) { m_total[i] = duration_type(); } + +double Timer::get(int i) const +{ + return boost::chrono::duration(m_total[i]).count(); +} + +Timer timer(20); +#endif + +int setup_threads(int n_threads) +{ + #ifdef _OPENMP + if (n_threads) + omp_set_num_threads(n_threads); + n_threads = omp_get_max_threads(); + if (n_threads > 1) + cerr << "Using " << n_threads << " threads" << endl; + + Eigen::initParallel(); + Eigen::setNbThreads(n_threads); + + #ifdef __INTEL_MKL__ + /* + // Set the threading layer to match the compiler. + // This lets MKL automatically go single-threaded in parallel regions. + #ifdef __INTEL_COMPILER + mkl_set_threading_layer(MKL_THREADING_INTEL); + #elif defined __GNUC__ + mkl_set_threading_layer(MKL_THREADING_GNU); + #endif + */ + mkl_set_num_threads(n_threads); + #endif + #endif + + return n_threads; +} + +} // namespace nplm diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..c774a72 --- /dev/null +++ b/src/util.h @@ -0,0 +1,219 @@ +#pragma once + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#ifdef USE_CHRONO +#include +#endif + +#include + +#include "maybe_omp.h" + +// Make matrices hashable + +namespace Eigen { + template + size_t hash_value(const DenseBase &m) + { + size_t h=0; + for (int i=0; i &items); +void readWordsFile(std::ifstream &TRAININ, std::vector &word_list); +void readWordsFile(const std::string &file, std::vector &word_list); +void writeWordsFile(const std::vector &words, std::ofstream &file); +void writeWordsFile(const std::vector &words, const std::string &filename); +void readDataFile(const std::string &filename, int &ngram_size, std::vector &data, int minibatch_size=0); +void readUnigramProbs(const std::string &unigram_probs_file, std::vector &unigram_probs); +void readSentFile(const std::string &file, std::vector > &sentences); + +// Functions that take non-const matrices as arguments +// are supposed to declare them const and then use this +// to cast away constness. +#define UNCONST(t,c,uc) Eigen::MatrixBase &uc = const_cast&>(c); + +template +void initMatrix(boost::random::mt19937 &engine, + const Eigen::MatrixBase &p_const, + bool init_normal, double range) +{ + UNCONST(Derived, p_const, p); + if (init_normal == 0) + // initialize with uniform distribution in [-range, range] + { + boost::random::uniform_real_distribution<> unif_real(-range, range); + for (int i = 0; i < p.rows(); i++) + { + for (int j = 0; j< p.cols(); j++) + { + p(i,j) = unif_real(engine); + } + } + + } + else + // initialize with gaussian distribution with mean 0 and stdev range + { + boost::random::normal_distribution unif_normal(0., range); + for (int i = 0; i < p.rows(); i++) + { + for (int j = 0; j < p.cols(); j++) + { + p(i,j) = unif_normal(engine); + } + } + } +} + +template +void readMatrix(std::ifstream &TRAININ, Eigen::MatrixBase ¶m_const) +{ + UNCONST(Derived, param_const, param); + + int i = 0; + std::string line; + std::vector fields; + + while (std::getline(TRAININ, line) && line != "") + { + splitBySpace(line, fields); + if (fields.size() != param.cols()) + { + std::ostringstream err; + err << "error: wrong number of columns (expected " << param.cols() << ", found " << fields.size() << ")"; + throw std::runtime_error(err.str()); + } + + if (i >= param.rows()) + { + std::ostringstream err; + err << "error: wrong number of rows (expected " << param.rows() << ", found " << i << ")"; + throw std::runtime_error(err.str()); + } + + for (int j=0; j(fields[j]); + } + i++; + } + + if (i != param.rows()) + { + std::ostringstream err; + err << "error: wrong number of rows (expected " << param.rows() << ", found more)"; + throw std::runtime_error(err.str()); + } +} + +template +void readMatrix(const std::string ¶m_file, const Eigen::MatrixBase ¶m_const) +{ + UNCONST(Derived, param_const, param); + std::cerr << "Reading data from file: " << param_file << std::endl; + + std::ifstream TRAININ(param_file.c_str()); + if (!TRAININ) + { + std::cerr << "Error: can't read training data from file " << param_file << std::endl; + exit(-1); + } + readMatrix(TRAININ, param); + TRAININ.close(); +} + +template +void writeMatrix(const Eigen::MatrixBase ¶m, const std::string &filename) +{ + std::cerr << "Writing parameters to " << filename << std::endl; + + std::ofstream OUT; + OUT.precision(16); + OUT.open(filename.c_str()); + if (! OUT) + { + std::cerr << "Error: can't write to file " << filename<< std::endl; + exit(-1); + } + writeMatrix(param, OUT); + OUT.close(); +} + +template +void writeMatrix(const Eigen::MatrixBase ¶m, std::ofstream &OUT) +{ + for (int row = 0;row < param.rows();row++) + { + int col; + for (col = 0;col < param.cols()-1;col++) + { + OUT< +double logsum(const Eigen::MatrixBase &v) +{ + int mi; + double m = v.maxCoeff(&mi); + double logz = 0.0; + for (int i=0; i m_start; + std::vector m_total; +public: + Timer() { } + Timer(int n) { resize(n); } + void resize(int n) { m_start.resize(n); m_total.resize(n); } + int size() const { return m_start.size(); } + void start(int i); + void stop(int i); + void reset(int i); + double get(int i) const; +}; + +extern Timer timer; +#define start_timer(x) timer.start(x) +#define stop_timer(x) timer.stop(x) +#else +#define start_timer(x) 0 +#define stop_timer(x) 0 +#endif + +int setup_threads(int n_threads); + +} // namespace nplm diff --git a/src/vocabulary.h b/src/vocabulary.h new file mode 100644 index 0000000..fee76f6 --- /dev/null +++ b/src/vocabulary.h @@ -0,0 +1,84 @@ +#ifndef VOCABULARY_H +#define VOCABULARY_H + +#include +#include +#include +#include + +namespace nplm +{ + +template +struct compare_second +{ + bool operator()(const T &lhs, const T &rhs) const { return lhs.second < rhs.second; } +}; + +class vocabulary { + std::vector m_words; + boost::unordered_map m_index; + int unk; +public: + vocabulary() + { + unk = insert_word(""); + } + + vocabulary(const std::vector &words) + : + m_words(words) + { + for (int i=0; i"]; + } + + int lookup_word(const std::string &word) const + { + boost::unordered_map::const_iterator pos = m_index.find(word); + if (pos != m_index.end()) + return pos->second; + else + return unk; + } + + int insert_word(const std::string &word) + { + int i = size(); + bool inserted = m_index.insert(make_pair(word, i)).second; + if (inserted) + { + m_words.push_back(word); + } + return i; + } + + int size() const { return m_words.size(); } + + // Inserts the most-frequent words from counts until vocab_size words are reached. + // counts is a collection of pair + template + int insert_most_frequent(const Map &counts, int vocab_size) + { + typedef std::pair stringint; + + std::priority_queue,compare_second > + q(compare_second(), std::vector(counts.begin(), counts.end())); + + int inserted = 0; + while (size() < vocab_size && !q.empty()) + { + insert_word(q.top().first); + q.pop(); + inserted++; + } + return inserted; + } + + const std::vector &words() const { return m_words; } +}; + +} // namespace nplm + +#endif -- cgit v1.2.3