We implement an automatic mapper that can find the corresponding architectural module for a source code file. The mapper is based on multinomial naive Bayes, and it is trained using custom keywords for each architectural module. The mapper uses the path and file name of source code elements for prediction. We find that the needed keywords often match the module names; however, ambiguities and discrepancies exist. We evaluate the mapper using ten open-source systems with a mapping to an intended architecture and find that the mapper can successfully create a mapping with perfect precision. Still, it cannot cover all source code elements in most cases. However, other techniques can use the mapping as a foothold and automatically create further mappings. We also apply the approach to two cases where the architecture has been recovered from the implementation and find that the approach currently has limitations of applicability in such architectures.