What part of speech is 'almost' in "these tiny flowers transform into pulp-filled pods almost the size of rugby balls"?
Now, before I get jumped on because almost is always an adverb, please allow me to explain.
If almost is an adverb, which it most definitely is (I checked several dictionaries and it is only listed as an adverb), then it must be modifying a verb, or an adjective or another adverb, but its relation is with the noun phrase the size, and really, so it seems, between pods and the size. Adverbs don't modify nouns. It appears to be functioning as a preposition, and indeed about or around, which are true prepositions, would produce equivalent meaning.
The only other option I can see is that almost is modifying the main verb transform which it is not - the flowers do not almost transform, they do indeed transform, so that cannot be the relation.
Ah, come to think of it, there does seem to be one more possibility, namely the demon ellipsis.
These tiny flowers transform into pulp-filled pods (that are) almost the size of rugby balls.
So, its a clause, where almost is modifying the elided verb. I think that's the answer but I still want to hear what folks have to say. Ellipsis seems to be a very strong factor in the evolution of grammar.
Some will say that adverbs can modify noun phrases, and some dictionaries do mention this use as rare but possible (e.g. Cambridge). However, dictionaries are hardly the arbiters of what is grammatical and others do not attribute this function to the adverb class (e.g. Lexico and Dictionary.com. Some sidestep the issue by saying they can modify "phrases". Ha!
It sees a rather bold step to alter the class definition of adverbs with the function of the adjective class, which breaks the distinction, the very usefulness of classes, and seems wrong to me. It seems more fitting to broaden the scope of words, as they evolve in usage, to include another class function, such as almost, which seems to be commonly used as both a preposition and an adjective.
I'm quite stuck with this one. The use is quite common and undeniably well understood. Perhaps this is the language changing again, and it's time to reconsider the scope of this word to include a prepositional function. But maybe someone more knowledgeable than I has a better explanation.
Original: These tiny flowers transform into pulp-filled pods almost the size of rugby balls.
=> These tiny flowers transform into pulp-filled pods (that are) almost the size of rugby balls.
that are the size, that are exactly the size, that are almost the size
"Almost" is an adverb that answers the question "to what degree" are they the same size.
I think it might be helpful to look at a top-down analysis of the structure:
[sentence] --> [subject] [predicate]
[subject] --> [noun-phrase] ("...flowers")
[predicate] --> [verb-phrase] ("transform...")
[verb-phrase] --> [verb] [adverb]
[verb] = "transform"
[adverb] --> [prep-phrase] ("into...")
[prep-phrase] --> [preposition] [noun-phrase]
[preposition] = "into"
[noun-phrase] = "pods..."
[noun-phrase] --> [noun] [dependent-adj-phrase]
[noun] = "pods"
[dependent-adj-phrase] = "Ø Ø almost the size of rugby balls"
We just reached the grammatically tricky part: the "zero" relative (i.e., an implicit "that/which are").
[dependent-adj-phrase] --> [relative-pronoun] [verb-phrase]
[relative-pronoun] = "Ø"
[verb-phrase] = "Ø almost the size of rugby balls"
[verb-phrase] --> [verb] [predicate-nominative]
[verb] = "Ø"
[predicate-nominative] = "...size..."
[predicate-nominative] --> [adverb] [determiner] [noun] [adj-phrase]
[adverb] = "almost"
[determiner] = "the"
[noun] = "size"
[adj-phrase] = "of rugby balls"
I think that is far enough to show how almost
fits in and why and how it is an adverb.