The contraction method is a procedure that allows to establish non-trivial relations between Lie algebras and has had successful applications in both mathematics and theoretical physics. This work deals with generalizations of the contraction procedure with a main focus in the so called S-expansion method as it includes most of the other generalized contractions. Basically, the S-expansion combines a Lie algebra G with a finite abelian semigroup S in order to define new S-expanded algebras. After giving a description of the main ingredients used in this paper, we present a Java library that automatizes the S-expansion procedure. With this computational tool we are able to represent Lie algebras and semigroups, so we can perform S-expansions of Lie algebras using arbitrary semigroups. We explain how the library methods has been constructed and how they work; then we give a set of example programs aimed to solve different problems. They are presented so that any user can easily modify them to perform his own calculations, without being necessarily an expert in Java. Finally, some comments about further developments and possible new applications are made.