I've almost finished my homework.
この店の客はほとんど女性だ。
Most of the customers at this shop are women.
Used with a negative verb to mean 'hardly' or 'barely'. Emphasizes that something is almost not the case.
彼はほとんど食べなかった。
He hardly ate anything.
その話はほとんど信じられない。
That story is barely believable.
noun, noun which may take the genitive case particle 'no'
most; the majority; almost all
Used as a noun or with の to refer to the greater part of something. Often interchangeable with sense 1, but explicitly nominal.
参加者のほとんどが賛成した。
Most of the participants agreed.
ほとんどの人がその事実を知らない。
Almost all people don't know that fact.
My homework is almost finished.
He hardly ever talks.
Most of the students agreed.
She jogs almost every day.
ほとんど means 'almost all' or 'nearly', and can replace 大方 when describing something that is nearly complete or true.
ほとんど stresses quantity, meaning 'almost all', while 主に stresses which part or aspect is most important, not necessarily the majority.
ほとんど broadly means 'almost all' in any context, while 半ば in this sense is more narrowly used with words like 強制的に to mean 'nearly' or 'practically'.
Very rare kanji form; not recommended.